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:
@@ -14,9 +14,9 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// creation:
|
||||
// codeDepositCost: 1116400
|
||||
// executionCost: 1160
|
||||
// totalCost: 1117560
|
||||
// codeDepositCost: 1173600
|
||||
// executionCost: 1221
|
||||
// totalCost: 1174821
|
||||
// external:
|
||||
// a(): 1130
|
||||
// b(uint256): infinite
|
||||
|
||||
@@ -17,9 +17,9 @@ contract C {
|
||||
// optimize-yul: true
|
||||
// ----
|
||||
// creation:
|
||||
// codeDepositCost: 615400
|
||||
// executionCost: 651
|
||||
// totalCost: 616051
|
||||
// codeDepositCost: 587400
|
||||
// executionCost: 619
|
||||
// totalCost: 588019
|
||||
// external:
|
||||
// a(): 1029
|
||||
// b(uint256): 2084
|
||||
|
||||
@@ -30,6 +30,7 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f0() -> 0x20, 0x0
|
||||
// f1() -> 0x20, 0x40, 0x1, 0x2
|
||||
|
||||
@@ -7,5 +7,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x21, 0x40, 0x7, "abcdefg"
|
||||
|
||||
@@ -7,5 +7,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x20, 0x40, 0x1, -2
|
||||
|
||||
@@ -5,5 +5,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint256,uint256[],uint256): 6, 0x60, 9, 0x8000000000000000000000000000000000000000000000000000000000000002, 1, 2 -> FAILURE
|
||||
// f(uint256,uint256[],uint256): 6, 0x60, 9, 0x8000000000000000000000000000000000000000000000000000000000000002, 1, 2 -> FAILURE
|
||||
|
||||
@@ -8,5 +8,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint256,uint256): 42, 23 -> 42, 23, 42, 23
|
||||
|
||||
@@ -11,5 +11,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x40, 0xa0, 0x40, 0x20, 0x0, 0x0
|
||||
|
||||
@@ -10,5 +10,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x20, 0x40, 0x1, -2
|
||||
|
||||
@@ -5,6 +5,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(bool): true -> true
|
||||
// f(bool): false -> false
|
||||
|
||||
@@ -15,6 +15,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// EVMVersion: >homestead
|
||||
// ----
|
||||
// f(uint256[][1]): 32, 32, 0 -> true
|
||||
|
||||
+1
@@ -7,6 +7,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint256[][2][]): 0x20, 0x01, 0x20, 0x40, 0x60, 0x00, 0x00 -> 23 # this is the common encoding for x.length == 1 && x[0][0].length == 0 && x[0][1].length == 0 #
|
||||
// f(uint256[][2][]): 0x20, 0x01, 0x20, 0x00, 0x00 -> 23 # exotic, but still valid encoding #
|
||||
|
||||
@@ -8,6 +8,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint16,int16,address,bytes3,bool): 1, 2, 3, "a", true -> 1, 2, 3, "a", true
|
||||
// f(uint16,int16,address,bytes3,bool): 0xffffff, 0x1ffff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, "abcd", 1 -> FAILURE
|
||||
|
||||
@@ -8,6 +8,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint8): 0 -> 0
|
||||
// f(uint8): 1 -> 1
|
||||
|
||||
@@ -8,6 +8,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f((int256,uint256,bytes16)): 0xff010, 0xff0002, "abcd" -> 0xff010, 0xff0002, "abcd"
|
||||
// f((int256,uint256,bytes16)): 0xff010, 0xff0002, 0x1111222233334444555566667777888800000000000000000000000000000000 -> 0xff010, 0xff0002, left(0x11112222333344445555666677778888)
|
||||
|
||||
@@ -11,5 +11,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f((uint256,uint8,uint8,bytes2)): 1, 2, 3, "ab" -> 1, 2, 3, 0x6162
|
||||
|
||||
@@ -3,5 +3,6 @@ contract Lotto {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// ticketPrice() -> 555
|
||||
|
||||
@@ -4,5 +4,6 @@ contract Lotto {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// ticketPrice() -> 500
|
||||
|
||||
@@ -10,5 +10,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test() -> 0
|
||||
|
||||
@@ -20,6 +20,7 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint256): 0 -> FAILURE, hex"4e487b71", 0x12
|
||||
// g(uint256): 0 -> FAILURE, hex"4e487b71", 0x12
|
||||
|
||||
@@ -9,6 +9,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// div(uint256,uint256): 7, 2 -> 3
|
||||
// div(uint256,uint256): 7, 0 -> FAILURE, hex"4e487b71", 0x12 # throws #
|
||||
|
||||
@@ -13,5 +13,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint256[2]): 42, 23 -> 42, 23
|
||||
|
||||
@@ -13,6 +13,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint256[][]): 0x20, 0x0 -> 42 # valid access stub #
|
||||
// f(uint256[][]): 0x20, 0x1 -> FAILURE # invalid on argument decoding #
|
||||
|
||||
@@ -22,5 +22,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f((uint256,uint256)[]): 0x20, 0x2, 0x1, 0x2, 0x3, 0x4 -> 2, 1, 2, 3, 4
|
||||
|
||||
@@ -8,6 +8,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint256[],uint256,uint256): 0x80, 0, 0, 0, 1, 42 ->
|
||||
// f(uint256[],uint256,uint256): 0x80, 0, 1, 0, 1, 42 ->
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract c {
|
||||
function test1(uint256[][] calldata c) external returns (uint256, uint256) {
|
||||
uint256[][] memory a1 = c;
|
||||
assert(a1[0][0] == c[0][0]);
|
||||
assert(a1[0][1] == c[0][1]);
|
||||
return (a1.length, a1[0][0] + a1[1][1]);
|
||||
}
|
||||
|
||||
function test2(uint256[][2] calldata c) external returns (uint256, uint256) {
|
||||
uint256[][2] memory a2 = c;
|
||||
assert(a2[0][0] == c[0][0]);
|
||||
assert(a2[0][1] == c[0][1]);
|
||||
return (a2[0].length, a2[0][0] + a2[1][1]);
|
||||
}
|
||||
|
||||
function test3(uint256[2][] calldata c) external returns (uint256, uint256) {
|
||||
uint256[2][] memory a3 = c;
|
||||
assert(a3[0][0] == c[0][0]);
|
||||
assert(a3[0][1] == c[0][1]);
|
||||
return (a3.length, a3[0][0] + a3[1][1]);
|
||||
}
|
||||
|
||||
function test4(uint256[2][2] calldata c) external returns (uint256) {
|
||||
uint256[2][2] memory a4 = c;
|
||||
assert(a4[0][0] == c[0][0]);
|
||||
assert(a4[0][1] == c[0][1]);
|
||||
return (a4[0][0] + a4[1][1]);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65
|
||||
// test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65
|
||||
// test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65
|
||||
// test4(uint256[2][2]): 23, 42, 23, 42 -> 65
|
||||
@@ -10,28 +10,28 @@ contract c {
|
||||
a1 = c;
|
||||
assert(a1[0][0] == c[0][0]);
|
||||
assert(a1[0][1] == c[0][1]);
|
||||
return (a1.length, a1[1][0] + a1[1][1]);
|
||||
return (a1.length, a1[0][0] + a1[1][1]);
|
||||
}
|
||||
|
||||
function test2(uint256[][2] calldata c) external returns (uint256, uint256) {
|
||||
a2 = c;
|
||||
assert(a2[0][0] == c[0][0]);
|
||||
assert(a2[0][1] == c[0][1]);
|
||||
return (a2[0].length, a2[1][0] + a2[1][1]);
|
||||
return (a2[0].length, a2[0][0] + a2[1][1]);
|
||||
}
|
||||
|
||||
function test3(uint256[2][] calldata c) external returns (uint256, uint256) {
|
||||
a3 = c;
|
||||
assert(a3[0][0] == c[0][0]);
|
||||
assert(a3[0][1] == c[0][1]);
|
||||
return (a3.length, a3[1][0] + a3[1][1]);
|
||||
return (a3.length, a3[0][0] + a3[1][1]);
|
||||
}
|
||||
|
||||
function test4(uint256[2][2] calldata c) external returns (uint256) {
|
||||
a4 = c;
|
||||
assert(a4[0][0] == c[0][0]);
|
||||
assert(a4[0][1] == c[0][1]);
|
||||
return (a4[1][0] + a4[1][1]);
|
||||
return (a4[0][0] + a4[1][1]);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
@@ -39,5 +39,5 @@ contract c {
|
||||
// ----
|
||||
// test1(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 23, 42 -> 2, 65
|
||||
// test2(uint256[][2]): 0x20, 0x40, 0x40, 2, 23, 42 -> 2, 65
|
||||
// test3(uint256[2][]): 0x20, 2, 0x40, 0x40, 23, 42 -> 2, 65
|
||||
// test3(uint256[2][]): 0x20, 2, 23, 42, 23, 42 -> 2, 65
|
||||
// test4(uint256[2][2]): 23, 42, 23, 42 -> 65
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract C {
|
||||
struct S {
|
||||
uint128 a;
|
||||
uint64 b;
|
||||
uint128 c;
|
||||
}
|
||||
function f(S[3] calldata c) public returns (uint128, uint64, uint128) {
|
||||
S[3] memory m = c;
|
||||
return (m[2].a, m[1].b, m[0].c);
|
||||
}
|
||||
function g(S[] calldata c) public returns (uint128, uint64, uint128) {
|
||||
S[] memory m = c;
|
||||
return (m[2].a, m[1].b, m[0].c);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f((uint128, uint64, uint128)[3]): 0, 0, 12, 0, 11, 0, 10, 0, 0 -> 10, 11, 12
|
||||
// g((uint128, uint64, uint128)[]): 0x20, 3, 0, 0, 12, 0, 11, 0, 10, 0, 0 -> 10, 11, 12
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract C {
|
||||
struct S {
|
||||
uint256[] a;
|
||||
}
|
||||
|
||||
function f(S[] calldata c) external returns (uint256, uint256) {
|
||||
S[] memory s = c;
|
||||
assert(s.length == c.length);
|
||||
for (uint i = 0; i < s.length; i++) {
|
||||
assert(s[i].a.length == c[i].a.length);
|
||||
for (uint j = 0; j < s[i].a.length; j++) {
|
||||
assert(s[i].a[j] == c[i].a[j]);
|
||||
}
|
||||
}
|
||||
return (s[1].a.length, s[1].a[0]);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: true
|
||||
// ----
|
||||
// f((uint256[])[]): 0x20, 3, 0x60, 0x60, 0x60, 0x20, 3, 1, 2, 3 -> 3, 1
|
||||
+7
@@ -9,6 +9,13 @@ contract C {
|
||||
|
||||
function f(S[] calldata c) external returns (uint256, uint256) {
|
||||
s = c;
|
||||
assert(s.length == c.length);
|
||||
for (uint i = 0; i < s.length; i++) {
|
||||
assert(s[i].a.length == c[i].a.length);
|
||||
for (uint j = 0; j < s[i].a.length; j++) {
|
||||
assert(s[i].a[j] == c[i].a[j]);
|
||||
}
|
||||
}
|
||||
return (s[1].a.length, s[1].a[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,5 +12,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 1, 2, 3
|
||||
|
||||
@@ -8,5 +8,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> "a"
|
||||
|
||||
@@ -5,5 +5,8 @@ contract C {
|
||||
return data[0];
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> "a"
|
||||
|
||||
@@ -21,5 +21,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f((uint256,uint256)[]): 0x20, 0x2, 0x1, 0x2, 0x3, 0x4 -> 2, 1, 2, 3, 4
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
contract C {
|
||||
function f(uint256[2] calldata c) public returns (uint256, uint256) {
|
||||
uint256[2] memory m1 = c;
|
||||
return (m1[0], m1[1]);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256[2]): 43, 57 -> 43, 57
|
||||
@@ -7,5 +7,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(bytes): 0x20, 0x08, "abcdefgh" -> "a"
|
||||
|
||||
@@ -11,5 +11,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f(uint256[][]): 0x20, 0x1, 0x20, 0x2, 0x17, 0x2a -> 0x1, 0x40, 0x2, 0x17, 0x2a
|
||||
|
||||
+1
@@ -19,6 +19,7 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// one() -> 3
|
||||
// two() -> FAILURE, hex"4e487b71", 0x51
|
||||
|
||||
@@ -11,5 +11,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 2, 3, 4
|
||||
|
||||
@@ -6,5 +6,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 7
|
||||
|
||||
@@ -21,6 +21,7 @@ contract C {
|
||||
}}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> FAILURE, hex"4e487b71", 0x41
|
||||
// g() -> FAILURE, hex"4e487b71", 0x41
|
||||
|
||||
@@ -31,5 +31,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 7
|
||||
|
||||
@@ -14,6 +14,7 @@ contract A {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test() -> false
|
||||
// testIt() -> FAILURE, hex"4e487b71", 0x32
|
||||
|
||||
@@ -8,5 +8,6 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test(uint256[8],uint256[],uint256[5],uint256,uint256,uint256): 1, 2, 3, 4, 5, 6, 7, 8, 0x220, 21, 22, 23, 24, 25, 0, 1, 2, 3, 11, 12, 13 -> 1, 12, 23
|
||||
|
||||
@@ -9,6 +9,7 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// storage: empty
|
||||
// fill() ->
|
||||
|
||||
@@ -35,6 +35,7 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// setIDStatic(uint256): 0xb ->
|
||||
// getID(uint256): 0x2 -> 0xb
|
||||
|
||||
@@ -7,5 +7,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(bytes32): "789" -> 32, 16, 8
|
||||
|
||||
@@ -17,6 +17,7 @@ contract c {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// length() -> 4
|
||||
// set(uint256,uint256): 3, 4 -> true
|
||||
|
||||
@@ -32,6 +32,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test(uint256,uint256): 10, 0 -> 11
|
||||
// test(uint256,uint256): 10, 1 -> 12
|
||||
|
||||
@@ -6,5 +6,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 3
|
||||
|
||||
@@ -12,5 +12,6 @@ contract Test {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07
|
||||
|
||||
@@ -13,5 +13,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 1, 2, 3, 4, 5
|
||||
|
||||
@@ -6,5 +6,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 4
|
||||
|
||||
+1
@@ -9,5 +9,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 3, 6
|
||||
|
||||
+3
@@ -8,5 +8,8 @@ contract C {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x40, 0x80, 0x3, "ray", 0x2, "mi"
|
||||
|
||||
@@ -7,6 +7,7 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint256): 0 -> 0x20, 0x4, "This"
|
||||
// f(uint256): 1 -> 0x20, 0x2, "is"
|
||||
|
||||
@@ -8,5 +8,6 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test() -> FAILURE, hex"4e487b71", 0x31
|
||||
|
||||
@@ -10,5 +10,6 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test() -> 3
|
||||
|
||||
@@ -14,5 +14,6 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test() -> 2, 1, 1
|
||||
|
||||
@@ -11,5 +11,6 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test() -> FAILURE, hex"4e487b71", 0x31
|
||||
|
||||
@@ -10,5 +10,6 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test() -> 3
|
||||
|
||||
@@ -11,6 +11,7 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test() ->
|
||||
// storage: empty
|
||||
|
||||
@@ -15,5 +15,6 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test() -> false
|
||||
|
||||
@@ -9,6 +9,7 @@ contract c {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// storage: empty
|
||||
// fill() ->
|
||||
|
||||
@@ -11,5 +11,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 6
|
||||
|
||||
@@ -11,5 +11,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 5
|
||||
|
||||
@@ -15,6 +15,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint256): 0 -> 2
|
||||
// f(uint256): 1 -> 18
|
||||
|
||||
+1
@@ -7,5 +7,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45
|
||||
|
||||
@@ -11,6 +11,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x3737373737373737373737373737373737373737373737373737373737373738
|
||||
// g() -> 0x3737373737373737373737373737373737373737373737373737373737373739
|
||||
|
||||
@@ -4,5 +4,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0
|
||||
|
||||
@@ -21,6 +21,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x26121ff000000000000000000000000000000000000000000000000000000000
|
||||
// g() -> 0x26121ff000000000000000000000000000000000000000000000000000000000
|
||||
|
||||
@@ -6,5 +6,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470
|
||||
|
||||
@@ -5,5 +5,6 @@ contract test {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// foo(uint256): 0x0 -> 0x2fbebd3800000000000000000000000000000000000000000000000000000000
|
||||
|
||||
+1
@@ -9,5 +9,6 @@ contract test {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// foo(uint256): 0x0 -> 0x2fbebd3800000000000000000000000000000000000000000000000000000000
|
||||
|
||||
@@ -36,6 +36,7 @@ contract test {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 3
|
||||
// g() -> 0
|
||||
|
||||
@@ -18,6 +18,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f((uint8,bytes1)): 0x12, hex"3400000000000000000000000000000000000000000000000000000000000000" -> 0x12, hex"3400000000000000000000000000000000000000000000000000000000000000" # double check that the valid case goes through #
|
||||
// f((uint8,bytes1)): 0x1234, hex"5678000000000000000000000000000000000000000000000000000000000000" -> FAILURE
|
||||
|
||||
@@ -13,6 +13,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(bool): 0x0 -> 0x0
|
||||
// f(bool): 0x1 -> 0x1
|
||||
|
||||
@@ -28,6 +28,7 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x1122334455667788990011223344556677889900
|
||||
// g() -> 0x1122334455667788990011223344556677889900
|
||||
|
||||
@@ -15,6 +15,7 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(address): 0xffff1234567890123456789012345678901234567890 -> FAILURE # We input longer data on purpose.#
|
||||
// g(address): 0xffff1234567890123456789012345678901234567890 -> FAILURE
|
||||
|
||||
@@ -12,5 +12,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> "\xff\xff\xff\xff"
|
||||
|
||||
@@ -12,5 +12,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(bytes2,uint16): "abc", 0x40102 -> FAILURE # We input longer data on purpose. #
|
||||
|
||||
@@ -10,5 +10,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// test() -> 0xff, 0xff
|
||||
|
||||
@@ -10,5 +10,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x00
|
||||
|
||||
@@ -18,6 +18,7 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x20, 3, "\x03\x01\x02"
|
||||
// g() -> 0x20, 3, "\x03\x01\x02"
|
||||
|
||||
@@ -26,6 +26,7 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x20, 3, "\x03\x01\x02"
|
||||
// g() -> 0x20, 3, "\x03\x01\x02"
|
||||
|
||||
@@ -7,5 +7,6 @@ contract Foo {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// constructor() ->
|
||||
|
||||
@@ -34,8 +34,9 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x20, 3, "\x03\x01\x02"
|
||||
// g() -> 0x20, 3, "\x03\x01\x02"
|
||||
// h() -> 5
|
||||
// i() -> 0x20, 3, "\x03\x01\x02"
|
||||
// i() -> 0x20, 3, "\x03\x01\x02"
|
||||
|
||||
@@ -22,5 +22,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x0d, 0x59, 0x59, 0x59
|
||||
|
||||
@@ -8,5 +8,6 @@ contract Foo {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// getX() -> 56
|
||||
|
||||
@@ -16,6 +16,7 @@ contract B {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// testIt() ->
|
||||
// test() -> 2
|
||||
|
||||
@@ -17,5 +17,6 @@ contract Test {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// getName() -> "abc"
|
||||
|
||||
+1
@@ -27,5 +27,6 @@ contract Test {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// getName() -> "def\x00\x00\x00"
|
||||
|
||||
+1
@@ -16,6 +16,7 @@ contract Derived is Base {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// getBMember() -> 5
|
||||
// getDMember() -> 6
|
||||
|
||||
@@ -4,5 +4,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// constructor(), 27 wei ->
|
||||
|
||||
@@ -18,6 +18,7 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// use(uint256): 3 -> 6
|
||||
// result_in_constructor() -> 4
|
||||
|
||||
@@ -19,6 +19,7 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// use(uint16): 3 -> 0xfff9
|
||||
// result_in_constructor() -> 0xfffb
|
||||
|
||||
+1
@@ -16,5 +16,6 @@ contract C {
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// t() -> 7
|
||||
|
||||
@@ -9,6 +9,7 @@ contract B is A {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: true
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// constructor() ->
|
||||
// y() -> 42
|
||||
|
||||
@@ -12,6 +12,7 @@ contract B is A {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: true
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// constructor() ->
|
||||
// y() -> 42
|
||||
|
||||
@@ -10,5 +10,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(bytes): 0x20, 0x04, "dead" -> true
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user