mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove once-off helper in ConstantOptimiser
For clarity. Makes code easier to understand.
This commit is contained in:
parent
2fc7928697
commit
4aa2d965dc
@ -129,7 +129,7 @@ bigint LiteralMethod::gasNeeded() const
|
|||||||
return combineGas(
|
return combineGas(
|
||||||
simpleRunGas({Instruction::PUSH1}),
|
simpleRunGas({Instruction::PUSH1}),
|
||||||
// PUSHX plus data
|
// PUSHX plus data
|
||||||
(m_params.isCreation ? GasCosts::txDataNonZeroGas : GasCosts::createDataGas) + dataGas(),
|
(m_params.isCreation ? GasCosts::txDataNonZeroGas : GasCosts::createDataGas) + dataGas(toCompactBigEndian(m_value, 1)),
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -79,8 +79,6 @@ protected:
|
|||||||
static bigint simpleRunGas(AssemblyItems const& _items);
|
static bigint simpleRunGas(AssemblyItems const& _items);
|
||||||
/// @returns the gas needed to store the given data literally
|
/// @returns the gas needed to store the given data literally
|
||||||
bigint dataGas(bytes const& _data) const;
|
bigint dataGas(bytes const& _data) const;
|
||||||
/// @returns the gas needed to store the value literally
|
|
||||||
bigint dataGas() const { return dataGas(toCompactBigEndian(m_value, 1)); }
|
|
||||||
static size_t bytesRequired(AssemblyItems const& _items);
|
static size_t bytesRequired(AssemblyItems const& _items);
|
||||||
/// @returns the combined estimated gas usage taking @a m_params into account.
|
/// @returns the combined estimated gas usage taking @a m_params into account.
|
||||||
bigint combineGas(
|
bigint combineGas(
|
||||||
|
Loading…
Reference in New Issue
Block a user