MCPcopy Create free account
hub / github.com/argotorg/solidity / evaluateExpression

Method evaluateExpression

libsolidity/codegen/ir/IRGeneratorForStatements.cpp:318–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318IRVariable IRGeneratorForStatements::evaluateExpression(Expression const& _expression, Type const& _targetType)
319{
320 try
321 {
322 setLocation(_expression);
323
324 _expression.accept(*this);
325
326 setLocation(_expression);
327 IRVariable variable{m_context.newYulVariable(), _targetType};
328 define(variable, _expression);
329 return variable;
330 }
331 catch (langutil::UnimplementedFeatureError const& _error)
332 {
333 if (!boost::get_error_info<langutil::errinfo_sourceLocation>(_error))
334 _error << langutil::errinfo_sourceLocation(m_currentLocation);
335 BOOST_THROW_EXCEPTION(_error);
336 }
337}
338
339std::string IRGeneratorForStatements::constantValueFunction(VariableDeclaration const& _constant)
340{

Callers 3

constantValueFunctionMethod · 0.80
generateModifierMethod · 0.80

Calls 2

newYulVariableMethod · 0.80
acceptMethod · 0.45

Tested by

no test coverage detected