Skip to content

Commit

Permalink
Use _fetchDeployedCodeLen for both code types
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov committed Aug 28, 2024
1 parent 89245ad commit 448bc97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 1 addition & 3 deletions system-contracts/contracts/EvmInterpreterLoop.template.yul
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,7 @@ for { } true { } {
evmGasLeft := chargeGas(evmGasLeft, 2500)
}

switch _isEVM(addr)
case 0 { sp := pushStackItemWithoutCheck(sp, extcodesize(addr)) }
default { sp := pushStackItemWithoutCheck(sp, _fetchDeployedCodeLen(addr)) }
sp := pushStackItemWithoutCheck(sp, _fetchDeployedCodeLen(addr))
ip := add(ip, 1)
}
case 0x3C { // OP_EXTCODECOPY
Expand Down
8 changes: 2 additions & 6 deletions system-contracts/contracts/EvmInterpreterPreprocessed.yul
Original file line number Diff line number Diff line change
Expand Up @@ -2010,9 +2010,7 @@ object "EVMInterpreter" {
evmGasLeft := chargeGas(evmGasLeft, 2500)
}

switch _isEVM(addr)
case 0 { sp := pushStackItemWithoutCheck(sp, extcodesize(addr)) }
default { sp := pushStackItemWithoutCheck(sp, _fetchDeployedCodeLen(addr)) }
sp := pushStackItemWithoutCheck(sp, _fetchDeployedCodeLen(addr))
ip := add(ip, 1)
}
case 0x3C { // OP_EXTCODECOPY
Expand Down Expand Up @@ -4969,9 +4967,7 @@ object "EVMInterpreter" {
evmGasLeft := chargeGas(evmGasLeft, 2500)
}

switch _isEVM(addr)
case 0 { sp := pushStackItemWithoutCheck(sp, extcodesize(addr)) }
default { sp := pushStackItemWithoutCheck(sp, _fetchDeployedCodeLen(addr)) }
sp := pushStackItemWithoutCheck(sp, _fetchDeployedCodeLen(addr))
ip := add(ip, 1)
}
case 0x3C { // OP_EXTCODECOPY
Expand Down

0 comments on commit 448bc97

Please sign in to comment.