mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12054 from ethereum/additionaltestuserdefinedsigned
Add one more test case.
This commit is contained in:
commit
fb8b068e32
@ -25,19 +25,19 @@ contract C {
|
||||
// ----
|
||||
// s() -> 0, 0, 0x00, 0
|
||||
// f((uint8,uint16,bytes2,uint8)): 1, 0xff, "ab", 15 ->
|
||||
// gas irOptimized: 110778
|
||||
// gas irOptimized: 44860
|
||||
// gas legacy: 112851
|
||||
// gas legacyOptimized: 110766
|
||||
// gas legacyOptimized: 44923
|
||||
// s() -> 1, 0xff, 0x6162000000000000000000000000000000000000000000000000000000000000, 15
|
||||
// g(uint16[]): 0x20, 3, 1, 2, 3 -> 0x20, 3, 1, 2, 3
|
||||
// gas irOptimized: 112669
|
||||
// gas irOptimized: 69306
|
||||
// gas legacy: 113715
|
||||
// gas legacyOptimized: 112488
|
||||
// gas legacyOptimized: 74255
|
||||
// small(uint256): 0 -> 1
|
||||
// small(uint256): 1 -> 2
|
||||
// h(bytes2[]): 0x20, 3, "ab", "cd", "ef" -> 0x20, 3, "ab", "cd", "ef"
|
||||
// gas irOptimized: 112797
|
||||
// gas irOptimized: 69510
|
||||
// gas legacy: 113414
|
||||
// gas legacyOptimized: 112572
|
||||
// gas legacyOptimized: 74342
|
||||
// l(uint256): 0 -> 0x6162000000000000000000000000000000000000000000000000000000000000
|
||||
// l(uint256): 1 -> 0x6364000000000000000000000000000000000000000000000000000000000000
|
||||
|
@ -25,19 +25,19 @@ contract C {
|
||||
// ----
|
||||
// s() -> 0, 0, 0x00, 0
|
||||
// f((uint8,uint16,bytes2,uint8)): 1, 0xff, "ab", 15 ->
|
||||
// gas irOptimized: 110788
|
||||
// gas irOptimized: 44551
|
||||
// gas legacy: 111668
|
||||
// gas legacyOptimized: 110908
|
||||
// gas legacyOptimized: 44671
|
||||
// s() -> 1, 0xff, 0x6162000000000000000000000000000000000000000000000000000000000000, 15
|
||||
// g(uint16[]): 0x20, 3, 1, 2, 3 -> 0x20, 3, 1, 2, 3
|
||||
// gas irOptimized: 113144
|
||||
// gas irOptimized: 69671
|
||||
// gas legacy: 114806
|
||||
// gas legacyOptimized: 113085
|
||||
// gas legacyOptimized: 74834
|
||||
// small(uint256): 0 -> 1
|
||||
// small(uint256): 1 -> 2
|
||||
// h(bytes2[]): 0x20, 3, "ab", "cd", "ef" -> 0x20, 3, "ab", "cd", "ef"
|
||||
// gas irOptimized: 113317
|
||||
// gas irOptimized: 69928
|
||||
// gas legacy: 114496
|
||||
// gas legacyOptimized: 113214
|
||||
// gas legacyOptimized: 74921
|
||||
// l(uint256): 0 -> 0x6162000000000000000000000000000000000000000000000000000000000000
|
||||
// l(uint256): 1 -> 0x6364000000000000000000000000000000000000000000000000000000000000
|
||||
|
@ -136,6 +136,19 @@ contract C {
|
||||
}
|
||||
}
|
||||
|
||||
function read_contents_asm() external returns (bytes32 rxa, bytes32 rya, bytes32 rxb, bytes32 ryb) {
|
||||
b.a = MyInt64.wrap(-2);
|
||||
b.b = MyInt64.wrap(-3);
|
||||
HalfSlot memory x = b;
|
||||
MyInt64 y = b.a;
|
||||
MyInt64 z = b.b;
|
||||
assembly {
|
||||
rxa := mload(x)
|
||||
rya := y
|
||||
rxb := mload(add(x, 0x20))
|
||||
ryb := z
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
@ -165,3 +178,4 @@ contract C {
|
||||
// storage_rd() -> 7, 0
|
||||
// set_rd(int96,address): 39614081257132168796771975167, 1461501637330902918203684832716283019655932542975 ->
|
||||
// read_slot(uint256): 7 -> -39614081257132168796771975169
|
||||
// read_contents_asm() -> 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd
|
||||
|
Loading…
Reference in New Issue
Block a user