mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Minor test adjustments.
This commit is contained in:
parent
6a655bb0dd
commit
1f0f77aa95
@ -1042,6 +1042,7 @@ jobs:
|
||||
environment:
|
||||
EVM: "shanghai"
|
||||
SOLTEST_FLAGS: "--eof-version 1"
|
||||
BOOST_TEST_ARGS: "-t sem*"
|
||||
steps:
|
||||
- run:
|
||||
name: Build evmone based on EOF branch
|
||||
|
@ -17,7 +17,7 @@ contract C {
|
||||
// EVMVersion: >=byzantium
|
||||
// ----
|
||||
// constructor(), 20 wei
|
||||
// gas irOptimized: 184005
|
||||
// gas irOptimized: 179697
|
||||
// gas legacy: 294335
|
||||
// gas legacyOptimized: 173427
|
||||
// f(uint256): 20 -> 0x137aa4dfc0911524504fcd4d98501f179bc13b4a
|
||||
|
@ -10,13 +10,15 @@ function adjustContractCodeForArgSize(bytes memory x, uint16 argSize)
|
||||
{
|
||||
assembly {
|
||||
let memPos := add(x, 32)
|
||||
let numCodeSections := shr(240, mload(add(memPos, 7)))
|
||||
let dataSectionSizeOffset := add(memPos, add(10, mul(numCodeSections, 2)))
|
||||
let tmp := mload(dataSectionSizeOffset)
|
||||
let dataSectionSize := shr(240, tmp)
|
||||
dataSectionSize := add(dataSectionSize, argSize)
|
||||
if gt(dataSectionSize, 0xFFFF) { revert(0,0) }
|
||||
mstore(dataSectionSizeOffset, or(shr(16, shl(16, tmp)), shl(240, dataSectionSize)))
|
||||
if eq(shr(232, mload(memPos)), 0xef0001) {
|
||||
let numCodeSections := shr(240, mload(add(memPos, 7)))
|
||||
let dataSectionSizeOffset := add(memPos, add(10, mul(numCodeSections, 2)))
|
||||
let tmp := mload(dataSectionSizeOffset)
|
||||
let dataSectionSize := shr(240, tmp)
|
||||
dataSectionSize := add(dataSectionSize, argSize)
|
||||
if gt(dataSectionSize, 0xFFFF) { revert(0,0) }
|
||||
mstore(dataSectionSizeOffset, or(shr(16, shl(16, tmp)), shl(240, dataSectionSize)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,4 +45,5 @@ contract C {
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// createDSalted(bytes32,uint256): 42, 64 ->
|
||||
// gas legacy: 104365
|
||||
// gas irOptimized: 100021
|
||||
// gas legacy: 104455
|
Loading…
Reference in New Issue
Block a user