mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into breaking
This commit is contained in:
@@ -19,26 +19,26 @@ object "object" {
|
||||
mstore_internal(32:i32, _1, _1, _1, 1)
|
||||
eth.storageStore(0:i32, 32:i32)
|
||||
}
|
||||
function endian_swap_16(x) -> y
|
||||
function bswap16(x) -> y
|
||||
{
|
||||
y := i64.or(i64.and(i64.shl(x, 8), 0xff00), i64.and(i64.shr_u(x, 8), 0xff))
|
||||
}
|
||||
function endian_swap_32(x) -> y
|
||||
function bswap32(x) -> y
|
||||
{
|
||||
let hi := i64.shl(endian_swap_16(x), 16)
|
||||
y := i64.or(hi, endian_swap_16(i64.shr_u(x, 16)))
|
||||
let hi := i64.shl(bswap16(x), 16)
|
||||
y := i64.or(hi, bswap16(i64.shr_u(x, 16)))
|
||||
}
|
||||
function endian_swap(x) -> y
|
||||
function bswap64(x) -> y
|
||||
{
|
||||
let hi := i64.shl(endian_swap_32(x), 32)
|
||||
y := i64.or(hi, endian_swap_32(i64.shr_u(x, 32)))
|
||||
let hi := i64.shl(bswap32(x), 32)
|
||||
y := i64.or(hi, bswap32(i64.shr_u(x, 32)))
|
||||
}
|
||||
function mstore_internal(pos:i32, y1, y2, y3, y4)
|
||||
{
|
||||
i64.store(pos, endian_swap(y1))
|
||||
i64.store(i32.add(pos, 8:i32), endian_swap(y2))
|
||||
i64.store(i32.add(pos, 16:i32), endian_swap(y3))
|
||||
i64.store(i32.add(pos, 24:i32), endian_swap(y4))
|
||||
i64.store(pos, bswap64(y1))
|
||||
i64.store(i32.add(pos, 8:i32), bswap64(y2))
|
||||
i64.store(i32.add(pos, 16:i32), bswap64(y3))
|
||||
i64.store(i32.add(pos, 24:i32), bswap64(y4))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ Text representation:
|
||||
)
|
||||
)
|
||||
|
||||
(func $endian_swap_16
|
||||
(func $bswap16
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
@@ -74,27 +74,27 @@ Text representation:
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $endian_swap_32
|
||||
(func $bswap32
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(local $hi i64)
|
||||
(block $label__2
|
||||
(local.set $hi (i64.shl (call $endian_swap_16 (local.get $x)) (i64.const 16)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $endian_swap_16 (i64.shr_u (local.get $x) (i64.const 16)))))
|
||||
(local.set $hi (i64.shl (call $bswap16 (local.get $x)) (i64.const 16)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $bswap16 (i64.shr_u (local.get $x) (i64.const 16)))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $endian_swap
|
||||
(func $bswap64
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(local $hi i64)
|
||||
(block $label__3
|
||||
(local.set $hi (i64.shl (call $endian_swap_32 (local.get $x)) (i64.const 32)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $endian_swap_32 (i64.shr_u (local.get $x) (i64.const 32)))))
|
||||
(local.set $hi (i64.shl (call $bswap32 (local.get $x)) (i64.const 32)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $bswap32 (i64.shr_u (local.get $x) (i64.const 32)))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
@@ -107,10 +107,10 @@ Text representation:
|
||||
(param $y3 i64)
|
||||
(param $y4 i64)
|
||||
(block $label__4
|
||||
(i64.store (local.get $pos) (call $endian_swap (local.get $y1)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 8)) (call $endian_swap (local.get $y2)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 16)) (call $endian_swap (local.get $y3)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 24)) (call $endian_swap (local.get $y4)))
|
||||
(i64.store (local.get $pos) (call $bswap64 (local.get $y1)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 8)) (call $bswap64 (local.get $y2)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 16)) (call $bswap64 (local.get $y3)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 24)) (call $bswap64 (local.get $y4)))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ object "object" {
|
||||
x_7 := x_11
|
||||
}
|
||||
{
|
||||
let _5, _6, _7, _8 := iszero_170_789(_1, _1, _1, lt_172(x_4, x_5, x_6, x_7, _1, _1, _1, 10))
|
||||
let _5, _6, _7, _8 := iszero_169_788(_1, _1, _1, lt_171(x_4, x_5, x_6, x_7, _1, _1, _1, 10))
|
||||
if i32.eqz(i64.eqz(i64.or(i64.or(_5, _6), i64.or(_7, _8)))) { break }
|
||||
if i32.eqz(i64.eqz(i64.or(_3, i64.or(_1, eq(x_4, x_5, x_6, x_7, _1, _1, _1, 2))))) { break }
|
||||
if i32.eqz(i64.eqz(i64.or(_3, i64.or(_1, eq(x_4, x_5, x_6, x_7, _1, _1, _1, 4))))) { continue }
|
||||
@@ -67,7 +67,7 @@ object "object" {
|
||||
let r1_1, carry_2 := add_carry(x1, y1, carry_1)
|
||||
r1 := r1_1
|
||||
}
|
||||
function iszero_170_789(x1, x2, x3, x4) -> r1, r2, r3, r4
|
||||
function iszero_169_788(x1, x2, x3, x4) -> r1, r2, r3, r4
|
||||
{
|
||||
r4 := i64.extend_i32_u(i64.eqz(i64.or(i64.or(x1, x2), i64.or(x3, x4))))
|
||||
}
|
||||
@@ -87,7 +87,7 @@ object "object" {
|
||||
case 1:i32 { r := 0xffffffff:i32 }
|
||||
default { r := i64.ne(a, b) }
|
||||
}
|
||||
function lt_172(x1, x2, x3, x4, y1, y2, y3, y4) -> z4
|
||||
function lt_171(x1, x2, x3, x4, y1, y2, y3, y4) -> z4
|
||||
{
|
||||
let z:i32 := false
|
||||
switch cmp(x1, y1)
|
||||
@@ -106,40 +106,40 @@ object "object" {
|
||||
default { z := 1:i32 }
|
||||
z4 := i64.extend_i32_u(z)
|
||||
}
|
||||
function bswap16(x) -> y
|
||||
{
|
||||
y := i64.or(i64.and(i64.shl(x, 8), 0xff00), i64.and(i64.shr_u(x, 8), 0xff))
|
||||
}
|
||||
function bswap32(x) -> y
|
||||
{
|
||||
let hi := i64.shl(bswap16(x), 16)
|
||||
y := i64.or(hi, bswap16(i64.shr_u(x, 16)))
|
||||
}
|
||||
function bswap64(x) -> y
|
||||
{
|
||||
let hi := i64.shl(bswap32(x), 32)
|
||||
y := i64.or(hi, bswap32(i64.shr_u(x, 32)))
|
||||
}
|
||||
function calldataload(x1, x2, x3, x4) -> z1, z2, z3, z4
|
||||
{
|
||||
if i64.ne(0, i64.or(i64.or(x1, x2), x3)) { unreachable() }
|
||||
if i64.ne(0, i64.shr_u(x4, 32)) { unreachable() }
|
||||
eth.callDataCopy(0:i32, i32.wrap_i64(x4), 32:i32)
|
||||
let z1_1 := endian_swap(i64.load(0:i32))
|
||||
let z2_1 := endian_swap(i64.load(i32.add(0:i32, 8:i32)))
|
||||
let z3_1 := endian_swap(i64.load(i32.add(0:i32, 16:i32)))
|
||||
let z4_1 := endian_swap(i64.load(i32.add(0:i32, 24:i32)))
|
||||
let z1_1 := bswap64(i64.load(0:i32))
|
||||
let z2_1 := bswap64(i64.load(i32.add(0:i32, 8:i32)))
|
||||
let z3_1 := bswap64(i64.load(i32.add(0:i32, 16:i32)))
|
||||
let z4_1 := bswap64(i64.load(i32.add(0:i32, 24:i32)))
|
||||
z1 := z1_1
|
||||
z2 := z2_1
|
||||
z3 := z3_1
|
||||
z4 := z4_1
|
||||
}
|
||||
function endian_swap_16(x) -> y
|
||||
{
|
||||
y := i64.or(i64.and(i64.shl(x, 8), 0xff00), i64.and(i64.shr_u(x, 8), 0xff))
|
||||
}
|
||||
function endian_swap_32(x) -> y
|
||||
{
|
||||
let hi := i64.shl(endian_swap_16(x), 16)
|
||||
y := i64.or(hi, endian_swap_16(i64.shr_u(x, 16)))
|
||||
}
|
||||
function endian_swap(x) -> y
|
||||
{
|
||||
let hi := i64.shl(endian_swap_32(x), 32)
|
||||
y := i64.or(hi, endian_swap_32(i64.shr_u(x, 32)))
|
||||
}
|
||||
function mstore_internal(pos:i32, y1, y2, y3, y4)
|
||||
{
|
||||
i64.store(pos, endian_swap(y1))
|
||||
i64.store(i32.add(pos, 8:i32), endian_swap(y2))
|
||||
i64.store(i32.add(pos, 16:i32), endian_swap(y3))
|
||||
i64.store(i32.add(pos, 24:i32), endian_swap(y4))
|
||||
i64.store(pos, bswap64(y1))
|
||||
i64.store(i32.add(pos, 8:i32), bswap64(y2))
|
||||
i64.store(i32.add(pos, 16:i32), bswap64(y3))
|
||||
i64.store(i32.add(pos, 24:i32), bswap64(y4))
|
||||
}
|
||||
function sstore(x1, x2, x3, x4, y1, y2, y3, y4)
|
||||
{
|
||||
@@ -152,7 +152,7 @@ object "object" {
|
||||
|
||||
|
||||
Binary representation:
|
||||
0061736d0100000001480a60000060017e017e60027e7e017f60037e7e7e017e60047e7e7e7e017e60087e7e7e7e7e7e7e7e0060087e7e7e7e7e7e7e7e017e60057f7e7e7e7e0060027f7f0060037f7f7f0002310208657468657265756d0c73746f7261676553746f7265000808657468657265756d0c63616c6c44617461436f70790009030e0d0003060406020604010101070505030100010610037e0142000b7e0142000b7e0142000b071102066d656d6f72790200046d61696e00020af0070da302030b7e017f087e02404200210002402000200020002000100921012300210223012103230221040b20012105200221062003210720042108420121092000200084210a200a200020098484504545210b02400340200b45450d01024002402000200020002005200620072008200020002000420a10081005210c2300210d2301210e2302210f0b200c200d84200e200f8484504504400c030b200a20002005200620072008200020002000420210068484504504400c030b200a20002005200620072008200020002000420410068484504504400c010b0b024020052006200720082000200020002009100421102300211123012112230221130b201021052011210620122107201321080c000b0b20002000200020002005200620072008100e0b0b2901037e0240200020017c2105200520027c21032005200054200320055472ad21040b2004240020030b6c010b7e0240200320077c210c200c42007c210b024020022006200c200354200b200c5472ad1003210d2300210e0b200d210a024020012005200e1003210f230021100b200f2109024020002004201010032111230021120b201121080b20092400200a2401200b240220080b2401047e0240200020018420022003848450ad21070b20052400200624012007240220040b2d01017e024020002004510440200120055104402002200651044020032007510440420121080b0b0b0b0b20080b2701027f024002402000200154210320034101460440417f210205200020015221020b0b0b20020b8a0102017e047f0240410021090240200020041007210a200a41004604400240200120051007210b200b41004604400240200220061007210c200c41004604402003200754210905200c41014604404100210905410121090b0b0b05200b41014604404100210905410121090b0b0b05200a41014604404100210905410121090b0b0b2009ad21080b20080b7601087e024042002000200184200284520440000b42002003422088520440000b41002003a7412010014100290000100c2108410041086a290000100c2109410041106a290000100c210a410041186a290000100c210b2008210420092105200a2106200b21070b20052400200624012007240220040b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100a421086210220022000421088100a8421010b20010b1e01027e02402000100b422086210220022000422088100b8421010b20010b3200024020002001100c370000200041086a2002100c370000200041106a2003100c370000200041186a2004100c3700000b0b2300024041002000200120022003100d41202004200520062007100d4100412010000b0b
|
||||
0061736d0100000001480a60000060017e017e60027e7e017f60037e7e7e017e60047e7e7e7e017e60087e7e7e7e7e7e7e7e0060087e7e7e7e7e7e7e7e017e60057f7e7e7e7e0060027f7f0060037f7f7f0002310208657468657265756d0c73746f7261676553746f7265000808657468657265756d0c63616c6c44617461436f70790009030e0d0003060406020601010104070505030100010610037e0142000b7e0142000b7e0142000b071102066d656d6f72790200046d61696e00020af0070da302030b7e017f087e02404200210002402000200020002000100c21012300210223012103230221040b20012105200221062003210720042108420121092000200084210a200a200020098484504545210b02400340200b45450d01024002402000200020002005200620072008200020002000420a10081005210c2300210d2301210e2302210f0b200c200d84200e200f8484504504400c030b200a20002005200620072008200020002000420210068484504504400c030b200a20002005200620072008200020002000420410068484504504400c010b0b024020052006200720082000200020002009100421102300211123012112230221130b201021052011210620122107201321080c000b0b20002000200020002005200620072008100e0b0b2901037e0240200020017c2105200520027c21032005200054200320055472ad21040b2004240020030b6c010b7e0240200320077c210c200c42007c210b024020022006200c200354200b200c5472ad1003210d2300210e0b200d210a024020012005200e1003210f230021100b200f2109024020002004201010032111230021120b201121080b20092400200a2401200b240220080b2401047e0240200020018420022003848450ad21070b20052400200624012007240220040b2d01017e024020002004510440200120055104402002200651044020032007510440420121080b0b0b0b0b20080b2701027f024002402000200154210320034101460440417f210205200020015221020b0b0b20020b8a0102017e047f0240410021090240200020041007210a200a41004604400240200120051007210b200b41004604400240200220061007210c200c41004604402003200754210905200c41014604404100210905410121090b0b0b05200b41014604404100210905410121090b0b0b05200a41014604404100210905410121090b0b0b2009ad21080b20080b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100942108621022002200042108810098421010b20010b1e01027e02402000100a422086210220022000422088100a8421010b20010b7601087e024042002000200184200284520440000b42002003422088520440000b41002003a7412010014100290000100b2108410041086a290000100b2109410041106a290000100b210a410041186a290000100b210b2008210420092105200a2106200b21070b20052400200624012007240220040b3200024020002001100b370000200041086a2002100b370000200041106a2003100b370000200041186a2004100b3700000b0b2300024041002000200120022003100d41202004200520062007100d4100412010000b0b
|
||||
|
||||
Text representation:
|
||||
(module
|
||||
@@ -206,7 +206,7 @@ Text representation:
|
||||
(br_if $label__3 (i32.eqz (i32.eqz (local.get $_4))))
|
||||
(block $label__4
|
||||
(block
|
||||
(local.set $_5 (call $iszero_170_789 (local.get $_1) (local.get $_1) (local.get $_1) (call $lt_172 (local.get $x_4) (local.get $x_5) (local.get $x_6) (local.get $x_7) (local.get $_1) (local.get $_1) (local.get $_1) (i64.const 10))))
|
||||
(local.set $_5 (call $iszero_169_788 (local.get $_1) (local.get $_1) (local.get $_1) (call $lt_171 (local.get $x_4) (local.get $x_5) (local.get $x_6) (local.get $x_7) (local.get $_1) (local.get $_1) (local.get $_1) (i64.const 10))))
|
||||
(local.set $_6 (global.get $global_))
|
||||
(local.set $_7 (global.get $global__1))
|
||||
(local.set $_8 (global.get $global__2))
|
||||
@@ -310,7 +310,7 @@ Text representation:
|
||||
(local.get $r1)
|
||||
)
|
||||
|
||||
(func $iszero_170_789
|
||||
(func $iszero_169_788
|
||||
(param $x1 i64)
|
||||
(param $x2 i64)
|
||||
(param $x3 i64)
|
||||
@@ -377,7 +377,7 @@ Text representation:
|
||||
(local.get $r)
|
||||
)
|
||||
|
||||
(func $lt_172
|
||||
(func $lt_171
|
||||
(param $x1 i64)
|
||||
(param $x2 i64)
|
||||
(param $x3 i64)
|
||||
@@ -437,6 +437,43 @@ Text representation:
|
||||
(local.get $z4)
|
||||
)
|
||||
|
||||
(func $bswap16
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(block $label__15
|
||||
(local.set $y (i64.or (i64.and (i64.shl (local.get $x) (i64.const 8)) (i64.const 65280)) (i64.and (i64.shr_u (local.get $x) (i64.const 8)) (i64.const 255))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $bswap32
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(local $hi i64)
|
||||
(block $label__16
|
||||
(local.set $hi (i64.shl (call $bswap16 (local.get $x)) (i64.const 16)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $bswap16 (i64.shr_u (local.get $x) (i64.const 16)))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $bswap64
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(local $hi i64)
|
||||
(block $label__17
|
||||
(local.set $hi (i64.shl (call $bswap32 (local.get $x)) (i64.const 32)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $bswap32 (i64.shr_u (local.get $x) (i64.const 32)))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $calldataload
|
||||
(param $x1 i64)
|
||||
(param $x2 i64)
|
||||
@@ -451,16 +488,16 @@ Text representation:
|
||||
(local $z2_1 i64)
|
||||
(local $z3_1 i64)
|
||||
(local $z4_1 i64)
|
||||
(block $label__15
|
||||
(block $label__18
|
||||
(if (i64.ne (i64.const 0) (i64.or (i64.or (local.get $x1) (local.get $x2)) (local.get $x3))) (then
|
||||
(unreachable)))
|
||||
(if (i64.ne (i64.const 0) (i64.shr_u (local.get $x4) (i64.const 32))) (then
|
||||
(unreachable)))
|
||||
(call $eth.callDataCopy (i32.const 0) (i32.wrap_i64 (local.get $x4)) (i32.const 32))
|
||||
(local.set $z1_1 (call $endian_swap (i64.load (i32.const 0))))
|
||||
(local.set $z2_1 (call $endian_swap (i64.load (i32.add (i32.const 0) (i32.const 8)))))
|
||||
(local.set $z3_1 (call $endian_swap (i64.load (i32.add (i32.const 0) (i32.const 16)))))
|
||||
(local.set $z4_1 (call $endian_swap (i64.load (i32.add (i32.const 0) (i32.const 24)))))
|
||||
(local.set $z1_1 (call $bswap64 (i64.load (i32.const 0))))
|
||||
(local.set $z2_1 (call $bswap64 (i64.load (i32.add (i32.const 0) (i32.const 8)))))
|
||||
(local.set $z3_1 (call $bswap64 (i64.load (i32.add (i32.const 0) (i32.const 16)))))
|
||||
(local.set $z4_1 (call $bswap64 (i64.load (i32.add (i32.const 0) (i32.const 24)))))
|
||||
(local.set $z1 (local.get $z1_1))
|
||||
(local.set $z2 (local.get $z2_1))
|
||||
(local.set $z3 (local.get $z3_1))
|
||||
@@ -473,43 +510,6 @@ Text representation:
|
||||
(local.get $z1)
|
||||
)
|
||||
|
||||
(func $endian_swap_16
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(block $label__16
|
||||
(local.set $y (i64.or (i64.and (i64.shl (local.get $x) (i64.const 8)) (i64.const 65280)) (i64.and (i64.shr_u (local.get $x) (i64.const 8)) (i64.const 255))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $endian_swap_32
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(local $hi i64)
|
||||
(block $label__17
|
||||
(local.set $hi (i64.shl (call $endian_swap_16 (local.get $x)) (i64.const 16)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $endian_swap_16 (i64.shr_u (local.get $x) (i64.const 16)))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $endian_swap
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(local $hi i64)
|
||||
(block $label__18
|
||||
(local.set $hi (i64.shl (call $endian_swap_32 (local.get $x)) (i64.const 32)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $endian_swap_32 (i64.shr_u (local.get $x) (i64.const 32)))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $mstore_internal
|
||||
(param $pos i32)
|
||||
(param $y1 i64)
|
||||
@@ -517,10 +517,10 @@ Text representation:
|
||||
(param $y3 i64)
|
||||
(param $y4 i64)
|
||||
(block $label__19
|
||||
(i64.store (local.get $pos) (call $endian_swap (local.get $y1)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 8)) (call $endian_swap (local.get $y2)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 16)) (call $endian_swap (local.get $y3)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 24)) (call $endian_swap (local.get $y4)))
|
||||
(i64.store (local.get $pos) (call $bswap64 (local.get $y1)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 8)) (call $bswap64 (local.get $y2)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 16)) (call $bswap64 (local.get $y3)))
|
||||
(i64.store (i32.add (local.get $pos) (i32.const 24)) (call $bswap64 (local.get $y4)))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{"contracts":{"A":{"C":{"ewasm":{"wasm":"0061736d01000000013a0860000060017e017e60047e7e7e7e017f60087e7e7e7e7e7e7e7e00600c7e7e7e7e7e7e7e7e7e7e7e7e0060017f0060027f7f0060037f7f7f0002510408657468657265756d08636f6465436f7079000708657468657265756d06726576657274000608657468657265756d0c67657443616c6c56616c7565000508657468657265756d0666696e6973680006030a090002020401010103030503010001060100071102066d656d6f72790200046d61696e0004009d030c435f325f6465706c6f7965640061736d0100000001160460000060017e017e60047e7e7e7e017f60027f7f0002130108657468657265756d067265766572740003030504000201010503010001060100071102066d656d6f72790200046d61696e00010ab60204ca0104017e027f057e037f02404200210020002000200042c00010022101200141c0006a210220022001490440000b20001003421086210320032000421088100384422086210420042000422088100484210520022005370000200241086a2005370000200241106a20053700004280011003421086210620064280014210881003844220862107200241186a2007428001422088100484370000200020002000200010022108200020002000200010022109200941c0006a210a200a2009490440000b200a200810000b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100342108621022002200042108810038421010b20010b0aec0309dc0103017e027f057e02404200210020002000200042c00010052101200141c0006a210220022001490440000b2000100a210320022003370000200241086a2003370000200241106a2003370000200241186a428001100a370000410010024100290000100a2104410041086a290000100a2105410041106a290000100a210620042005842006410041186a290000100a84845045044020002000200020002000200020002000100c0b4290032107200020002000200020002000200042ce012000200020002007100720002000200020002000200020002007100b0b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b2601027f0240200020012002200310052105200541c0006a210420042005490440000b0b20040b25000240200020012002200310062004200520062007100520082009200a200b100510000b0b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100842108621022002200042108810088421010b20010b1e01027e02402000100942208621022002200042208810098421010b20010b1b000240200020012002200310062004200520062007100510030b0b1b000240200020012002200310062004200520062007100510010b0b","wast":"(module
|
||||
{"contracts":{"A":{"C":{"ewasm":{"wasm":"0061736d01000000013a0860000060017e017e60047e7e7e7e017f60087e7e7e7e7e7e7e7e00600c7e7e7e7e7e7e7e7e7e7e7e7e0060017f0060027f7f0060037f7f7f0002510408657468657265756d08636f6465436f7079000708657468657265756d06726576657274000608657468657265756d0c67657443616c6c56616c7565000508657468657265756d0666696e6973680006030a090002020101010403030503010001060100071102066d656d6f72790200046d61696e0004009d030c435f325f6465706c6f7965640061736d0100000001160460000060017e017e60047e7e7e7e017f60027f7f0002130108657468657265756d067265766572740003030504000201010503010001060100071102066d656d6f72790200046d61696e00010ab60204ca0104017e027f057e037f02404200210020002000200042c00010022101200141c0006a210220022001490440000b20001003421086210320032000421088100384422086210420042000422088100484210520022005370000200241086a2005370000200241106a20053700004280011003421086210620064280014210881003844220862107200241186a2007428001422088100484370000200020002000200010022108200020002000200010022109200941c0006a210a200a2009490440000b200a200810000b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100342108621022002200042108810038421010b20010b0aec0309dc0103017e027f057e02404200210020002000200042c00010052101200141c0006a210220022001490440000b20001009210320022003370000200241086a2003370000200241106a2003370000200241186a428001100937000041001002410029000010092104410041086a29000010092105410041106a2900001009210620042005842006410041186a290000100984845045044020002000200020002000200020002000100c0b4290032107200020002000200020002000200042ce012000200020002007100a20002000200020002000200020002007100b0b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b2601027f0240200020012002200310052105200541c0006a210420042005490440000b0b20040b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100742108621022002200042108810078421010b20010b1e01027e02402000100842208621022002200042208810088421010b20010b25000240200020012002200310062004200520062007100520082009200a200b100510000b0b1b000240200020012002200310062004200520062007100510030b0b1b000240200020012002200310062004200520062007100510010b0b","wast":"(module
|
||||
;; custom section for sub-module
|
||||
;; The Keccak-256 hash of the text representation of \"C_2_deployed\": f03f5b9154b9eb6803a947177e38e92e2860de95e90ba0e75eb71a58f18ed589
|
||||
;; The Keccak-256 hash of the text representation of \"C_2_deployed\": 0289c074ac70ccfdbeb7817862087cc066a9f7707de1a981bb8b5b12dd2ce4e9
|
||||
;; (@custom \"C_2_deployed\" \"0061736d0100000001160460000060017e017e60047e7e7e7e017f60027f7f0002130108657468657265756d067265766572740003030504000201010503010001060100071102066d656d6f72790200046d61696e00010ab60204ca0104017e027f057e037f02404200210020002000200042c00010022101200141c0006a210220022001490440000b20001003421086210320032000421088100384422086210420042000422088100484210520022005370000200241086a2005370000200241106a20053700004280011003421086210620064280014210881003844220862107200241186a2007428001422088100484370000200020002000200010022108200020002000200010022109200941c0006a210a200a2009490440000b200a200810000b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100342108621022002200042108810038421010b20010b\")
|
||||
(import \"ethereum\" \"codeCopy\" (func $eth.codeCopy (param i32 i32 i32)))
|
||||
(import \"ethereum\" \"revert\" (func $eth.revert (param i32 i32)))
|
||||
@@ -24,16 +24,16 @@
|
||||
(local.set $r (i32.add (local.get $p) (i32.const 64)))
|
||||
(if (i32.lt_u (local.get $r) (local.get $p)) (then
|
||||
(unreachable)))
|
||||
(local.set $_2 (call $endian_swap (local.get $_1)))
|
||||
(local.set $_2 (call $bswap64 (local.get $_1)))
|
||||
(i64.store (local.get $r) (local.get $_2))
|
||||
(i64.store (i32.add (local.get $r) (i32.const 8)) (local.get $_2))
|
||||
(i64.store (i32.add (local.get $r) (i32.const 16)) (local.get $_2))
|
||||
(i64.store (i32.add (local.get $r) (i32.const 24)) (call $endian_swap (i64.const 128)))
|
||||
(i64.store (i32.add (local.get $r) (i32.const 24)) (call $bswap64 (i64.const 128)))
|
||||
(call $eth.getCallValue (i32.const 0))
|
||||
(local.set $z1 (call $endian_swap (i64.load (i32.const 0))))
|
||||
(local.set $z2 (call $endian_swap (i64.load (i32.add (i32.const 0) (i32.const 8)))))
|
||||
(local.set $z3 (call $endian_swap (i64.load (i32.add (i32.const 0) (i32.const 16)))))
|
||||
(if (i32.eqz (i64.eqz (i64.or (i64.or (local.get $z1) (local.get $z2)) (i64.or (local.get $z3) (call $endian_swap (i64.load (i32.add (i32.const 0) (i32.const 24)))))))) (then
|
||||
(local.set $z1 (call $bswap64 (i64.load (i32.const 0))))
|
||||
(local.set $z2 (call $bswap64 (i64.load (i32.add (i32.const 0) (i32.const 8)))))
|
||||
(local.set $z3 (call $bswap64 (i64.load (i32.add (i32.const 0) (i32.const 16)))))
|
||||
(if (i32.eqz (i64.eqz (i64.or (i64.or (local.get $z1) (local.get $z2)) (i64.or (local.get $z3) (call $bswap64 (i64.load (i32.add (i32.const 0) (i32.const 24)))))))) (then
|
||||
(call $revert (local.get $_1) (local.get $_1) (local.get $_1) (local.get $_1) (local.get $_1) (local.get $_1) (local.get $_1) (local.get $_1))))
|
||||
(local.set $_3 (datasize \"C_2_deployed\"))
|
||||
(call $codecopy (local.get $_1) (local.get $_1) (local.get $_1) (local.get $_1) (local.get $_1) (local.get $_1) (local.get $_1) (dataoffset \"C_2_deployed\") (local.get $_1) (local.get $_1) (local.get $_1) (local.get $_3))
|
||||
@@ -77,6 +77,43 @@
|
||||
(local.get $r)
|
||||
)
|
||||
|
||||
(func $bswap16
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(block $label__3
|
||||
(local.set $y (i64.or (i64.and (i64.shl (local.get $x) (i64.const 8)) (i64.const 65280)) (i64.and (i64.shr_u (local.get $x) (i64.const 8)) (i64.const 255))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $bswap32
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(local $hi i64)
|
||||
(block $label__4
|
||||
(local.set $hi (i64.shl (call $bswap16 (local.get $x)) (i64.const 16)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $bswap16 (i64.shr_u (local.get $x) (i64.const 16)))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $bswap64
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(local $hi i64)
|
||||
(block $label__5
|
||||
(local.set $hi (i64.shl (call $bswap32 (local.get $x)) (i64.const 32)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $bswap32 (i64.shr_u (local.get $x) (i64.const 32)))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $codecopy
|
||||
(param $x1 i64)
|
||||
(param $x2 i64)
|
||||
@@ -90,48 +127,11 @@
|
||||
(param $z2 i64)
|
||||
(param $z3 i64)
|
||||
(param $z4 i64)
|
||||
(block $label__3
|
||||
(block $label__6
|
||||
(call $eth.codeCopy (call $to_internal_i32ptr (local.get $x1) (local.get $x2) (local.get $x3) (local.get $x4)) (call $u256_to_i32 (local.get $y1) (local.get $y2) (local.get $y3) (local.get $y4)) (call $u256_to_i32 (local.get $z1) (local.get $z2) (local.get $z3) (local.get $z4)))
|
||||
)
|
||||
)
|
||||
|
||||
(func $endian_swap_16
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(block $label__4
|
||||
(local.set $y (i64.or (i64.and (i64.shl (local.get $x) (i64.const 8)) (i64.const 65280)) (i64.and (i64.shr_u (local.get $x) (i64.const 8)) (i64.const 255))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $endian_swap_32
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(local $hi i64)
|
||||
(block $label__5
|
||||
(local.set $hi (i64.shl (call $endian_swap_16 (local.get $x)) (i64.const 16)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $endian_swap_16 (i64.shr_u (local.get $x) (i64.const 16)))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $endian_swap
|
||||
(param $x i64)
|
||||
(result i64)
|
||||
(local $y i64)
|
||||
(local $hi i64)
|
||||
(block $label__6
|
||||
(local.set $hi (i64.shl (call $endian_swap_32 (local.get $x)) (i64.const 32)))
|
||||
(local.set $y (i64.or (local.get $hi) (call $endian_swap_32 (i64.shr_u (local.get $x) (i64.const 32)))))
|
||||
|
||||
)
|
||||
(local.get $y)
|
||||
)
|
||||
|
||||
(func $return
|
||||
(param $x1 i64)
|
||||
(param $x2 i64)
|
||||
|
||||
Reference in New Issue
Block a user