MLOAD has side-effects, treat it like that in the optimiser

This commit is contained in:
Alex Beregszaszi 2017-06-30 01:14:58 +01:00
parent b3be9d6fdc
commit 32d6c1c316
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ Features:
* Static Analyzer: Warn about deprecation of ``callcode``.
Bugfixes:
* Assembly: mark ``MLOAD`` to have side effects in the optimiser.
* Code generator: Use ``REVERT`` instead of ``INVALID`` for generated input validation routines.
* Type Checker: Fix address literals not being treated as compile-time constants.
* Type Checker: Disallow invoking the same modifier multiple times.

View File

@ -216,7 +216,7 @@ static const std::map<Instruction, InstructionInfo> c_instructionInfo =
{ Instruction::DIFFICULTY, { "DIFFICULTY", 0, 0, 1, false, Tier::Base } },
{ Instruction::GASLIMIT, { "GASLIMIT", 0, 0, 1, false, Tier::Base } },
{ Instruction::POP, { "POP", 0, 1, 0, false, Tier::Base } },
{ Instruction::MLOAD, { "MLOAD", 0, 1, 1, false, Tier::VeryLow } },
{ Instruction::MLOAD, { "MLOAD", 0, 1, 1, true, Tier::VeryLow } },
{ Instruction::MSTORE, { "MSTORE", 0, 2, 0, true, Tier::VeryLow } },
{ Instruction::MSTORE8, { "MSTORE8", 0, 2, 0, true, Tier::VeryLow } },
{ Instruction::SLOAD, { "SLOAD", 0, 1, 1, false, Tier::Special } },