mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Print auxiliary data in the assembly
This commit is contained in:
parent
3273e865ec
commit
585b3ea3e3
@ -1,8 +1,9 @@
|
||||
### 0.4.12 (unreleased)
|
||||
|
||||
Features:
|
||||
* Assembly: renamed ``SHA3`` to ``KECCAK256``.
|
||||
* Assembly: Add ``CREATE2`` (EIP86), ``RETURNDATASIZE`` and ``RETURNDATACOPY`` (EIP211) instructions.
|
||||
* Assembly: Display auxiliary data in the assembly output.
|
||||
* Assembly: Renamed ``SHA3`` to ``KECCAK256``.
|
||||
* AST: export all attributes to JSON format.
|
||||
* Inline Assembly: Present proper error message when not supplying enough arguments to a functional
|
||||
instruction.
|
||||
|
@ -216,6 +216,9 @@ ostream& Assembly::streamAsm(ostream& _out, string const& _prefix, StringMap con
|
||||
}
|
||||
}
|
||||
|
||||
if (m_auxiliaryData.size() > 0)
|
||||
_out << endl << _prefix << "auxdata: 0x" << toHex(m_auxiliaryData) << endl;
|
||||
|
||||
return _out;
|
||||
}
|
||||
|
||||
@ -317,6 +320,9 @@ Json::Value Assembly::streamAsmJson(ostream& _out, StringMap const& _sourceCodes
|
||||
root[".data"] = data;
|
||||
}
|
||||
|
||||
if (m_auxiliaryData.size() > 0)
|
||||
root[".auxdata"] = toHex(m_auxiliaryData);
|
||||
|
||||
_out << root;
|
||||
|
||||
return root;
|
||||
|
@ -205,7 +205,8 @@ BOOST_AUTO_TEST_CASE(basic_compilation)
|
||||
" /* \"fileA\":0:14 contract A { } */\n mstore(0x40, 0x60)\n jumpi(tag_1, iszero(callvalue))\n"
|
||||
" invalid\ntag_1:\ntag_2:\n dataSize(sub_0)\n dup1\n dataOffset(sub_0)\n 0x0\n codecopy\n 0x0\n"
|
||||
" return\nstop\n\nsub_0: assembly {\n /* \"fileA\":0:14 contract A { } */\n"
|
||||
" mstore(0x40, 0x60)\n tag_1:\n invalid\n}\n");
|
||||
" mstore(0x40, 0x60)\n tag_1:\n invalid\n\n"
|
||||
" auxdata: 0xa165627a7a72305820e4855da8c6a5e8a35933acba62e02f4842146bb9655b81cb06547caf8ea743b40029\n}\n");
|
||||
BOOST_CHECK(contract["evm"]["gasEstimates"].isObject());
|
||||
BOOST_CHECK(dev::jsonCompactPrint(contract["evm"]["gasEstimates"]) ==
|
||||
"{\"creation\":{\"codeDepositCost\":\"10200\",\"executionCost\":\"62\",\"totalCost\":\"10262\"}}");
|
||||
|
Loading…
Reference in New Issue
Block a user