Merge pull request #3029 from ethereum/tanwisgas

Send all gas for 0.5.0.
This commit is contained in:
Alex Beregszaszi 2017-10-05 11:34:17 +01:00 committed by GitHub
commit 880be25811
2 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,9 @@ Features:
* Standard JSON: Support the ``outputSelection`` field for selective compilation of supplied sources.
* Syntax Checker: Unary ``+`` is now a syntax error as experimental 0.5.0 feature.
* Type Checker: Disallow non-pure constant state variables as experimental 0.5.0 feature.
* Code Generator: Always use all available gas for calls as experimental 0.5.0 feature
(previously, some amount was retained in order to work in pre-tangerine whistle
EVM versions)
Bugfixes:
* Parser: Fix source location of VariableDeclarationStatement.

View File

@ -1714,6 +1714,9 @@ void ExpressionCompiler::appendExternalFunctionCall(
if (_functionType.gasSet())
m_context << dupInstruction(m_context.baseToCurrentStackOffset(gasStackPos));
else if (m_context.experimentalFeatureActive(ExperimentalFeature::V050))
// Send all gas (requires tangerine whistle EVM)
m_context << Instruction::GAS;
else
{
// send all gas except the amount needed to execute "SUB" and "CALL"