| 316 | } |
| 317 | |
| 318 | IRVariable 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 | |
| 339 | std::string IRGeneratorForStatements::constantValueFunction(VariableDeclaration const& _constant) |
| 340 | { |
no test coverage detected