mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
YulRunner: Add support for memoryguard() and literal parameters
This commit is contained in:
parent
1730e43bf7
commit
53b67334c5
@ -475,6 +475,8 @@ u256 EVMInstructionInterpreter::evalBuiltin(
|
||||
);
|
||||
return 0;
|
||||
}
|
||||
else if (fun == "memoryguard")
|
||||
return _evaluatedArguments.at(0);
|
||||
else
|
||||
yulAssert(false, "Unknown builtin: " + fun);
|
||||
return 0;
|
||||
|
@ -351,7 +351,19 @@ void ExpressionEvaluator::evaluateArgs(
|
||||
if (!_literalArguments || !_literalArguments->at(_expr.size() - i - 1))
|
||||
visit(expr);
|
||||
else
|
||||
m_values = {0};
|
||||
{
|
||||
string literal = std::get<Literal>(expr).value.str();
|
||||
|
||||
try
|
||||
{
|
||||
m_values = {u256(literal)};
|
||||
}
|
||||
catch (exception&)
|
||||
{
|
||||
m_values = {u256(0)};
|
||||
}
|
||||
}
|
||||
|
||||
values.push_back(value());
|
||||
++i;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user