solidity/test/cmdlineTests/standard_generatedSources/output.json

105 lines
28 KiB
JSON
Raw Normal View History

2021-01-14 16:27:55 +00:00
{"contracts":{"a.sol":{"A":{"evm":{"bytecode":{"generatedSources":[],"object":"<BYTECODE REMOVED>"},"deployedBytecode":{"generatedSources":[{"ast":{"nodeType":"YulBlock","src":"0:3209:1","statements":[{"body":{"nodeType":"YulBlock","src":"126:521:1","statements":[{"nodeType":"YulAssignment","src":"136:90:1","value":{"arguments":[{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"218:6:1"}],"functionName":{"name":"array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr","nodeType":"YulIdentifier","src":"161:56:1"},"nodeType":"YulFunctionCall","src":"161:64:1"}],"functionName":{"name":"allocate_memory","nodeType":"YulIdentifier","src":"145:15:1"},"nodeType":"YulFunctionCall","src":"145:81:1"},"variableNames":[{"name":"array","nodeType":"YulIdentifier","src":"136:5:1"}]},{"nodeType":"YulVariableDeclaration","src":"235:16:1","value":{"name":"array","nodeType":"YulIdentifier","src":"246:5:1"},"variables":[{"name":"dst","nodeType":"YulTypedName","src":"239:3:1","type":""}]},{"expression":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"267:5:1"},{"name":"length","nodeType":"YulIdentifier","src":"274:6:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"260:6:1"},"nodeType":"YulFunctionCall","src":"260:21:1"},"nodeType":"YulExpressionStatement","src":"260:21:1"},{"nodeType":"YulAssignment","src":"282:23:1","value":{"arguments":[{"name":"array","nodeType":"YulIdentifier","src":"293:5:1"},{"kind":"number","nodeType":"YulLiteral","src":"300:4:1","type":"","value":"0x20"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"289:3:1"},"nodeType":"YulFunctionCall","src":"289:16:1"},"variableNames":[{"name":"dst","nodeType":"YulIdentifier","src":"282:3:1"}]},{"nodeType":"YulVariableDeclaration","src":"314:17:1","value":{"name":"offset","nodeType":"YulIdentifier","src":"325:6:1"},"variables":[{"name":"src","nodeType":"YulTypedName","src":"318:3:1","type":""}]},{"body":{"nodeType":"YulBlock","src":"380:16:1","statements":[{"expression":{"arguments":[{"kind":"number","nodeType":"YulLiteral","src":"389:1:1","type":"","value":"0"},{"kind":"number","nodeType":"YulLiteral","src":"392:1:1","type":"","value":"0"}],"functionName":{"name":"revert","nodeType":"YulIdentifier","src":"382:6:1"},"nodeType":"YulFunctionCall","src":"382:12:1"},"nodeType":"YulExpressionStatement","src":"382:12:1"}]},"condition":{"arguments":[{"arguments":[{"name":"src","nodeType":"YulIdentifier","src":"350:3:1"},{"arguments":[{"name":"length","nodeType":"YulIdentifier","src":"359:6:1"},{"kind":"number","nodeType":"YulLiteral","src":"367:4:1","type":"","value":"0x20"}],"functionName":{"name":"mul","nodeType":"YulIdentifier","src":"355:3:1"},"nodeType":"YulFunctionCall","src":"355:17:1"}],"functionName":{"name":"add","nodeType":"YulIdentifier","src":"346:3:1"},"nodeType":"YulFunctionCall","src":"346:27:1"},{"name":"end","nodeType":"YulIdentifier","src":"375:3:1"}],"functionName":{"name":"gt","nodeType":"YulIdentifier","src":"343:2:1"},"nodeType":"YulFunctionCall","src":"343:36:1"},"nodeType":"YulIf","src":"340:2:1"},{"body":{"nodeType":"YulBlock","src":"465:176:1","statements":[{"nodeType":"YulVariableDeclaration","src":"479:21:1","value":{"name":"src","nodeType":"YulIdentifier","src":"497:3:1"},"variables":[{"name":"elementPos","nodeType":"YulTypedName","src":"483:10:1","type":""}]},{"expression":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"520:3:1"},{"arguments":[{"name":"elementPos","nodeType":"YulIdentifier","src":"546:10:1"},{"name":"end","nodeType":"YulIdentifier","src":"558:3:1"}],"functionName":{"name":"abi_decode_t_uint256","nodeType":"YulIdentifier","src":"525:20:1"},"nodeType":"YulFunctionCall","src":"525:37:1"}],"functionName":{"name":"mstore","nodeType":"YulIdentifier","src":"513:6:1"},"nodeType":"YulFunctionCall","src":"513:50:1"},"nodeType":"YulExpressionStatement","src":"513:50:1"},{"nodeType":"YulAssignment","src":"576:21:1","value":{"arguments":[{"name":"dst","nodeType":"YulIdentifier","src":"587:3:1"},{"kind":"number","nodeType":"YulLiteral","src":"592:4:1","type":"","value":"
2020-05-28 12:01:07 +00:00
// uint256[]
function abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr(offset, length, end) -> array {
2021-01-14 16:27:55 +00:00
array := allocate_memory(array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(length))
2020-05-28 12:01:07 +00:00
let dst := array
mstore(array, length) dst := add(array, 0x20)
2020-05-28 12:01:07 +00:00
let src := offset
if gt(add(src, mul(length, 0x20)), end) { revert(0, 0) }
for { let i := 0 } lt(i, length) { i := add(i, 1) }
{
let elementPos := src
mstore(dst, abi_decode_t_uint256(elementPos, end))
dst := add(dst, 0x20)
src := add(src, 0x20)
}
}
// uint256[]
function abi_decode_t_array$_t_uint256_$dyn_memory_ptr(offset, end) -> array {
if iszero(slt(add(offset, 0x1f), end)) { revert(0, 0) }
let length := calldataload(offset)
array := abi_decode_available_length_t_array$_t_uint256_$dyn_memory_ptr(add(offset, 0x20), length, end)
}
2020-05-28 12:01:07 +00:00
function abi_decode_t_uint256(offset, end) -> value {
value := calldataload(offset)
validator_revert_t_uint256(value)
}
function abi_decode_tuple_t_array$_t_uint256_$dyn_memory_ptr(headStart, dataEnd) -> value0 {
if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }
{
2020-12-07 13:14:19 +00:00
2020-05-28 12:01:07 +00:00
let offset := calldataload(add(headStart, 0))
if gt(offset, 0xffffffffffffffff) { revert(0, 0) }
2020-12-07 13:14:19 +00:00
2020-05-28 12:01:07 +00:00
value0 := abi_decode_t_array$_t_uint256_$dyn_memory_ptr(add(headStart, offset), dataEnd)
}
}
function abi_encode_t_uint256_to_t_uint256_fromStack(value, pos) {
mstore(pos, cleanup_t_uint256(value))
}
function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart , value0) -> tail {
tail := add(headStart, 32)
abi_encode_t_uint256_to_t_uint256_fromStack(value0, add(headStart, 0))
}
2021-01-14 16:27:55 +00:00
function allocate_memory(size) -> memPtr {
memPtr := allocate_unbounded()
finalize_allocation(memPtr, size)
}
function allocate_unbounded() -> memPtr {
2020-05-28 12:01:07 +00:00
memPtr := mload(64)
}
function array_allocation_size_t_array$_t_uint256_$dyn_memory_ptr(length) -> size {
// Make sure we can allocate memory without overflow
2020-10-13 11:28:39 +00:00
if gt(length, 0xffffffffffffffff) { panic_error_0x41() }
2020-05-28 12:01:07 +00:00
size := mul(length, 0x20)
// add length slot
size := add(size, 0x20)
}
function cleanup_t_uint256(value) -> cleaned {
cleaned := value
}
2021-01-14 16:27:55 +00:00
function finalize_allocation(memPtr, size) {
let newFreePtr := add(memPtr, round_up_to_mul_of_32(size))
// protect against overflow
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }
mstore(64, newFreePtr)
}
2020-10-13 11:28:39 +00:00
function panic_error_0x41() {
mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)
mstore(4, 0x41)
revert(0, 0x24)
2020-09-24 13:45:45 +00:00
}
2021-01-14 18:50:02 +00:00
function round_up_to_mul_of_32(value) -> result {
result := and(add(value, 31), not(31))
}
2020-05-28 12:01:07 +00:00
function validator_revert_t_uint256(value) {
if iszero(eq(value, cleanup_t_uint256(value))) { revert(0, 0) }
}
}
","id":1,"language":"Yul","name":"#utility.yul"}]}}}}},"errors":[{"component":"general","errorCode":"3420","formattedMessage":"Warning: Source file does not specify required compiler version!
2020-12-01 13:46:26 +00:00
--> a.sol
2020-05-28 12:01:07 +00:00
","message":"Source file does not specify required compiler version!","severity":"warning","sourceLocation":{"end":-1,"file":"a.sol","start":-1},"type":"Warning"}],"sources":{"a.sol":{"id":0}}}