From 448bc978c4f59558baf99538e508e035335fc93e Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Wed, 28 Aug 2024 17:09:29 +0200 Subject: [PATCH] Use _fetchDeployedCodeLen for both code types --- .../contracts/EvmInterpreterLoop.template.yul | 4 +--- system-contracts/contracts/EvmInterpreterPreprocessed.yul | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/system-contracts/contracts/EvmInterpreterLoop.template.yul b/system-contracts/contracts/EvmInterpreterLoop.template.yul index dc3346988..5880cd1f4 100644 --- a/system-contracts/contracts/EvmInterpreterLoop.template.yul +++ b/system-contracts/contracts/EvmInterpreterLoop.template.yul @@ -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 diff --git a/system-contracts/contracts/EvmInterpreterPreprocessed.yul b/system-contracts/contracts/EvmInterpreterPreprocessed.yul index 6caa979c2..654007bc3 100644 --- a/system-contracts/contracts/EvmInterpreterPreprocessed.yul +++ b/system-contracts/contracts/EvmInterpreterPreprocessed.yul @@ -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 @@ -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