mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove EWASM backend.
This commit is contained in:
@@ -8,8 +8,5 @@ contract C {
|
||||
return (abi.encode(""), abi.encodePacked(""));
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x40, 0xa0, 0x40, 0x20, 0x0, 0x0
|
||||
|
||||
@@ -7,8 +7,5 @@ contract C {
|
||||
return abi.encode(1, -2);
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f() -> 0x20, 0x40, 0x1, -2
|
||||
|
||||
@@ -44,7 +44,6 @@ contract C {
|
||||
require(y[0] == "e");
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// f0() -> 0x20, 0x0
|
||||
// f1() -> 0x20, 0x40, 0x1, 0x2
|
||||
|
||||
@@ -3,8 +3,6 @@ pragma abicoder v2;
|
||||
contract C {
|
||||
function f(bool b) public pure returns (bool) { return b; }
|
||||
}
|
||||
// ====
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(bool): true -> true
|
||||
// f(bool): false -> false
|
||||
|
||||
-2
@@ -5,8 +5,6 @@ contract C {
|
||||
return 23;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// 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 #
|
||||
|
||||
@@ -13,7 +13,6 @@ contract C {
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// f(uint256[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8 -> 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8
|
||||
// f(uint256[][]): 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8, 9 -> 0x20, 2, 0x40, 0xa0, 2, 5, 6, 2, 7, 8
|
||||
|
||||
@@ -22,7 +22,6 @@ contract C {
|
||||
return abi.encode(s);
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// f_memory(uint256[],uint256[2]): 0x20, 1, 2 -> 0x60, 0x01, 0x02, 1, 2
|
||||
// f_memory(uint256[],uint256[2]): 0x40, 1, 2, 5, 6 -> 0x60, 1, 2, 2, 5, 6
|
||||
|
||||
-1
@@ -16,7 +16,6 @@ contract C {
|
||||
return a[which];
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// f_memory(uint256[][]): 0x20, 2, 0x40, 0x40, 2, 1, 2 -> 0x20, 2, 0x40, 0xa0, 2, 1, 2, 2, 1, 2
|
||||
// f_memory(uint256[][]): 0x20, 2, 0x40, 0x60, 2, 1, 2 -> 0x20, 2, 0x40, 0xa0, 2, 1, 2, 1, 2
|
||||
|
||||
@@ -33,7 +33,6 @@ contract C {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ----
|
||||
// f((uint256[])): 0x20, 0x20, 0 -> 0x20, 0x60, 0x20, 0x20, 0
|
||||
// f((uint256[])): 0x20, 0x20, 1 -> FAILURE
|
||||
|
||||
-1
@@ -23,7 +23,6 @@ contract C {
|
||||
return abi.encode(s[i][j].a);
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// revertStrings: debug
|
||||
// ----
|
||||
|
||||
@@ -39,7 +39,6 @@ contract C {
|
||||
return (a[which], b[0]);
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// f_memory(uint256[]): 0x80, 9, 9, 9, 0 -> 0x20, 0
|
||||
// f_memory(uint256[]): 0x80, 9, 9, 9, 1, 7 -> 0x20, 1, 7
|
||||
|
||||
@@ -6,8 +6,6 @@ contract C {
|
||||
assembly { v := a w := b x := c y := d z := e}
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// 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
|
||||
|
||||
@@ -6,8 +6,6 @@ contract C {
|
||||
assembly { x := e }
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f(uint8): 0 -> 0
|
||||
// f(uint8): 1 -> 1
|
||||
|
||||
-1
@@ -7,7 +7,6 @@ contract C {
|
||||
return f(a, b);
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// f(uint256[],bytes): 0x40, 0x80, 1, 0xFF, 6, "123456" -> 0x20, 0xc0, 0x40, 0x80, 1, 0xff, 6, "123456"
|
||||
// g(uint256[],bytes): 0x40, 0x80, 1, 0xffff, 8, "12345678" -> 0x20, 0xc0, 0x40, 0x80, 1, 0xffff, 8, "12345678"
|
||||
|
||||
-1
@@ -11,7 +11,6 @@ contract C {
|
||||
return (a, b);
|
||||
}
|
||||
}
|
||||
|
||||
// ----
|
||||
// f(uint256[],uint256[1]): 0x40, 0xff, 1, 0xffff -> 0x20, 0x80, 0x40, 0xff, 1, 0xffff
|
||||
// g(uint256[],uint256[1]): 0x40, 0xff, 1, 0xffff -> 0x20, 0x80, 0x40, 0xff, 1, 0xffff
|
||||
|
||||
@@ -6,8 +6,6 @@ contract C {
|
||||
q = s;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f((int256,uint256,bytes16)): 0xff010, 0xff0002, "abcd" -> 0xff010, 0xff0002, "abcd"
|
||||
// f((int256,uint256,bytes16)): 0xff010, 0xff0002, 0x1111222233334444555566667777888800000000000000000000000000000000 -> 0xff010, 0xff0002, left(0x11112222333344445555666677778888)
|
||||
|
||||
@@ -9,7 +9,5 @@ contract C {
|
||||
d = uint16(s.d);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f((uint256,uint8,uint8,bytes2)): 1, 2, 3, "ab" -> 1, 2, 3, 0x6162
|
||||
|
||||
@@ -10,8 +10,6 @@ contract C {
|
||||
}
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f((int16,uint8,bytes2)): 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01, 0xff, "ab" -> 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01, 0xff, "ab"
|
||||
// f((int16,uint8,bytes2)): 0xff010, 0xff, "ab" -> FAILURE
|
||||
|
||||
-2
@@ -6,8 +6,6 @@ contract C {
|
||||
function g(S calldata) external pure returns (uint r) { r = 2; }
|
||||
function h(S calldata s) external pure returns (uint r) { s.x; r = 3; }
|
||||
}
|
||||
// ====
|
||||
// compileToEwasm: also
|
||||
// ----
|
||||
// f((function)): "01234567890123456789abcd" -> 1
|
||||
// f((function)): "01234567890123456789abcdX" -> FAILURE
|
||||
|
||||
Reference in New Issue
Block a user