solidity/test/cmdlineTests/standard_ewasm_requested/output.json

155 lines
5.2 KiB
JSON
Raw Normal View History

2021-06-08 14:35:37 +00:00
{"contracts":{"A":{"C":{"ewasm":{"wasm":"<BYTECODE REMOVED>","wast":"(module
;; custom section for sub-module
2021-06-08 14:35:37 +00:00
;; The Keccak-256 hash of the text representation of <REMOVED>
;; (@custom \"C_3_deployed\" \"<BYTECODE REMOVED>\")
2019-07-09 13:19:50 +00:00
(import \"ethereum\" \"codeCopy\" (func $eth.codeCopy (param i32 i32 i32)))
(import \"ethereum\" \"revert\" (func $eth.revert (param i32 i32)))
(import \"ethereum\" \"getCallValue\" (func $eth.getCallValue (param i32)))
2019-07-09 13:19:50 +00:00
(import \"ethereum\" \"finish\" (func $eth.finish (param i32 i32)))
(memory $memory (export \"memory\") 1)
(export \"main\" (func $main))
(func $main
2021-04-23 14:53:57 +00:00
(local $p i32)
(local $r i32)
2021-04-23 14:53:57 +00:00
(local $hi i64)
(local $y i64)
(local $z3 i64)
2021-04-23 14:53:57 +00:00
(local $_1 i64)
2020-05-25 21:33:59 +00:00
(block $label_
2021-09-15 15:01:40 +00:00
(local.set $p (call $u256_to_i32_716))
2021-04-23 14:53:57 +00:00
(local.set $r (i32.add (local.get $p) (i32.const 64)))
(if (i32.lt_u (local.get $r) (local.get $p)) (then
2020-05-25 21:33:59 +00:00
(unreachable)))
2021-04-23 14:53:57 +00:00
(local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 0)))) (i64.const 32)))
(local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 0) (i64.const 32)))))))
(i64.store (local.get $r) (local.get $y))
(i64.store (i32.add (local.get $r) (i32.const 8)) (local.get $y))
(i64.store (i32.add (local.get $r) (i32.const 16)) (local.get $y))
(i64.store (i32.add (local.get $r) (i32.const 24)) (call $bswap64))
(call $eth.getCallValue (i32.const 0))
2021-04-23 14:53:57 +00:00
(local.set $z3 (i64.load (i32.const 8)))
(if (i32.eqz (i64.eqz (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.or (local.get $z3) (i64.load (i32.const 0)))))) (then
2021-09-15 15:01:40 +00:00
(call $eth.revert (call $to_internal_i32ptr_334) (call $u256_to_i32_333))))
2021-04-23 14:53:57 +00:00
(local.set $_1 (datasize \"C_3_deployed\"))
2021-09-15 15:01:40 +00:00
(call $eth.codeCopy (call $to_internal_i32ptr) (call $u256_to_i32 (dataoffset \"C_3_deployed\")) (call $u256_to_i32 (local.get $_1)))
(call $eth.finish (call $to_internal_i32ptr) (call $u256_to_i32 (local.get $_1)))
2020-05-25 21:33:59 +00:00
)
2019-07-09 13:19:50 +00:00
)
2021-09-15 15:01:40 +00:00
(func $u256_to_i32_333
(result i32)
2020-11-26 17:52:25 +00:00
(local $v i32)
2021-04-23 14:53:57 +00:00
(local $_1 i64)
2021-04-13 10:13:45 +00:00
(block $label__1
2021-04-23 14:53:57 +00:00
(local.set $_1 (i64.const 0))
(if (i64.ne (local.get $_1) (i64.or (i64.or (local.get $_1) (local.get $_1)) (local.get $_1))) (then
2020-11-26 17:52:25 +00:00
(unreachable)))
2021-04-23 14:53:57 +00:00
(if (i64.ne (local.get $_1) (i64.shr_u (local.get $_1) (i64.const 32))) (then
2020-05-25 21:33:59 +00:00
(unreachable)))
2021-04-23 14:53:57 +00:00
(local.set $v (i32.wrap_i64 (local.get $_1)))
2020-05-25 21:33:59 +00:00
)
2020-11-26 17:52:25 +00:00
(local.get $v)
)
(func $u256_to_i32
2021-04-23 14:53:57 +00:00
(param $x4 i64)
2020-11-26 17:52:25 +00:00
(result i32)
(local $v i32)
2021-04-13 10:13:45 +00:00
(block $label__2
2021-04-23 14:53:57 +00:00
(if (i64.ne (i64.const 0) (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.const 0))) (then
2020-11-26 17:52:25 +00:00
(unreachable)))
2021-04-23 14:53:57 +00:00
(if (i64.ne (i64.const 0) (i64.shr_u (local.get $x4) (i64.const 32))) (then
2020-11-26 17:52:25 +00:00
(unreachable)))
2021-04-23 14:53:57 +00:00
(local.set $v (i32.wrap_i64 (local.get $x4)))
2020-11-26 17:52:25 +00:00
)
(local.get $v)
)
2021-09-15 15:01:40 +00:00
(func $u256_to_i32_716
(result i32)
2021-04-23 14:53:57 +00:00
(local $v i32)
2021-04-13 10:13:45 +00:00
(block $label__3
2021-04-23 14:53:57 +00:00
(if (i64.ne (i64.const 0) (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.const 0))) (then
(unreachable)))
(if (i64.ne (i64.const 0) (i64.shr_u (i64.const 64) (i64.const 32))) (then
(unreachable)))
(local.set $v (i32.wrap_i64 (i64.const 64)))
2020-05-25 21:33:59 +00:00
)
2021-04-23 14:53:57 +00:00
(local.get $v)
2019-07-09 13:19:50 +00:00
)
2021-09-15 15:01:40 +00:00
(func $to_internal_i32ptr_334
(result i32)
2021-04-23 14:53:57 +00:00
(local $r i32)
(local $p i32)
2021-04-13 10:13:45 +00:00
(block $label__4
2021-09-15 15:01:40 +00:00
(local.set $p (call $u256_to_i32_333))
2021-04-23 14:53:57 +00:00
(local.set $r (i32.add (local.get $p) (i32.const 64)))
(if (i32.lt_u (local.get $r) (local.get $p)) (then
(unreachable)))
2020-05-25 21:33:59 +00:00
)
2021-04-23 14:53:57 +00:00
(local.get $r)
2019-07-09 13:19:50 +00:00
)
2021-09-15 15:01:40 +00:00
(func $to_internal_i32ptr
2021-04-29 09:43:27 +00:00
(result i32)
(local $r i32)
(local $v i32)
(block $label__5
(if (i64.ne (i64.const 0) (i64.or (i64.or (i64.const 0) (i64.const 0)) (i64.const 0))) (then
(unreachable)))
(if (i64.ne (i64.const 0) (i64.shr_u (i64.const 128) (i64.const 32))) (then
(unreachable)))
(local.set $v (i32.wrap_i64 (i64.const 128)))
(local.set $r (i32.add (local.get $v) (i32.const 64)))
(if (i32.lt_u (local.get $r) (local.get $v)) (then
(unreachable)))
)
(local.get $r)
)
2021-04-23 14:53:57 +00:00
(func $bswap16
(param $x i32)
(result i32)
(local $y i32)
2021-04-29 09:43:27 +00:00
(block $label__6
2021-04-23 14:53:57 +00:00
(local.set $y (i32.or (i32.and (i32.shl (local.get $x) (i32.const 8)) (i32.const 65280)) (i32.and (i32.shr_u (local.get $x) (i32.const 8)) (i32.const 255))))
2020-11-26 17:52:25 +00:00
)
(local.get $y)
)
2021-04-23 14:53:57 +00:00
(func $bswap32
(param $x i32)
(result i32)
(local $y i32)
(local $hi i32)
2021-04-29 09:43:27 +00:00
(block $label__7
2021-04-23 14:53:57 +00:00
(local.set $hi (i32.shl (call $bswap16 (local.get $x)) (i32.const 16)))
(local.set $y (i32.or (local.get $hi) (call $bswap16 (i32.shr_u (local.get $x) (i32.const 16)))))
2020-11-26 17:52:25 +00:00
)
(local.get $y)
)
(func $bswap64
(result i64)
(local $y i64)
(local $hi i64)
2021-04-29 09:43:27 +00:00
(block $label__8
2021-04-23 14:53:57 +00:00
(local.set $hi (i64.shl (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.const 128)))) (i64.const 32)))
(local.set $y (i64.or (local.get $hi) (i64.extend_i32_u (call $bswap32 (i32.wrap_i64 (i64.shr_u (i64.const 128) (i64.const 32)))))))
2020-05-25 21:33:59 +00:00
)
(local.get $y)
)
)
2019-11-26 15:41:58 +00:00
"}}}},"sources":{"A":{"id":0}}}