@@ -298,7 +298,7 @@ unsigned GasMeter::runGas(Instruction _instruction, langutil::EVMVersion _evmVer
298298
299299 if (auto gasCost = gasCostForTier (instructionInfo (_instruction, _evmVersion).gasPriceTier ))
300300 return *gasCost;
301- assertThrow (false , OptimizerException , " Invalid gas tier for instruction " + instructionInfo (_instruction, _evmVersion).name );
301+ solAssert (false , " Invalid gas tier for instruction " + instructionInfo (_instruction, _evmVersion).name );
302302}
303303
304304unsigned GasMeter::pushGas (u256 _value, langutil::EVMVersion _evmVersion)
@@ -314,7 +314,7 @@ unsigned GasMeter::swapGas(size_t _depth, langutil::EVMVersion _evmVersion)
314314 if (_depth <= 16 )
315315 return runGas (evmasm::swapInstruction (static_cast <unsigned >(_depth)), _evmVersion);
316316 auto gasCost = gasCostForTier (instructionInfo (evmasm::Instruction::SWAPN, _evmVersion).gasPriceTier );
317- assertThrow (gasCost.has_value (), OptimizerException , " Expected gas cost for SWAPN to be defined." );
317+ solAssert (gasCost.has_value (), " Expected gas cost for SWAPN to be defined." );
318318 return *gasCost;
319319}
320320
@@ -323,7 +323,7 @@ unsigned GasMeter::dupGas(size_t _depth, langutil::EVMVersion _evmVersion)
323323 if (_depth <= 16 )
324324 return runGas (evmasm::swapInstruction (static_cast <unsigned >(_depth)), _evmVersion);
325325 auto gasCost = gasCostForTier (instructionInfo (evmasm::Instruction::DUPN, _evmVersion).gasPriceTier );
326- assertThrow (gasCost.has_value (), OptimizerException , " Expected gas cost for DUPN to be defined." );
326+ solAssert (gasCost.has_value (), " Expected gas cost for DUPN to be defined." );
327327 return *gasCost;
328328}
329329
@@ -337,14 +337,14 @@ u256 GasMeter::dataGas(bytes const& _data, bool _inCreation, langutil::EVMVersio
337337 }
338338 else
339339 gas = bigint (GasCosts::createDataGas) * _data.size ();
340- assertThrow (gas < bigint (u256 (-1 )), OptimizerException , " Gas cost exceeds 256 bits." );
340+ solAssert (gas < bigint (u256 (-1 )), " Gas cost exceeds 256 bits." );
341341 return u256 (gas);
342342}
343343
344344
345345u256 GasMeter::dataGas (uint64_t _length, bool _inCreation, langutil::EVMVersion _evmVersion)
346346{
347347 bigint gas = bigint (_length) * (_inCreation ? GasCosts::txDataNonZeroGas (_evmVersion) : GasCosts::createDataGas);
348- assertThrow (gas < bigint (u256 (-1 )), OptimizerException , " Gas cost exceeds 256 bits." );
348+ solAssert (gas < bigint (u256 (-1 )), " Gas cost exceeds 256 bits." );
349349 return u256 (gas);
350350}
0 commit comments