diff options
author | chriseth <chris@ethereum.org> | 2017-10-05 17:56:36 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-10-05 17:56:36 +0800 |
commit | 69ea5c43f3ef2fe08bed0edbe1d45d4553cbbee4 (patch) | |
tree | 7f2ef7935d73ff61d04b41c3b9f8c25a1780b40d | |
parent | 19274c78904632d568bf56e95603d22ef091ce77 (diff) | |
download | dexon-solidity-69ea5c43f3ef2fe08bed0edbe1d45d4553cbbee4.tar.gz dexon-solidity-69ea5c43f3ef2fe08bed0edbe1d45d4553cbbee4.tar.zst dexon-solidity-69ea5c43f3ef2fe08bed0edbe1d45d4553cbbee4.zip |
Send all gas for 0.5.0.
-rw-r--r-- | Changelog.md | 3 | ||||
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Changelog.md b/Changelog.md index 8ebc30d0..c78a26e0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,9 @@ Features: * Parser: Better error message for unexpected trailing comma in parameter lists. * 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. diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index c2bf0f5c..fe37baac 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -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" |