| 367 | } |
| 368 | |
| 369 | argument instruction::eval(bool check_eval) const |
| 370 | { |
| 371 | if(op.name() == "@literal") |
| 372 | { |
| 373 | return this->get_literal().get_argument(); |
| 374 | } |
| 375 | if(is_context_free(op)) |
| 376 | { |
| 377 | if(check_eval and not this->can_eval()) |
| 378 | return {}; |
| 379 | std::vector<argument> args; |
| 380 | std::transform(this->inputs().begin(), |
| 381 | this->inputs().end(), |
| 382 | std::back_inserter(args), |
| 383 | [](auto arg) { return arg->eval(false); }); |
| 384 | return normalized_operator().compute(result, args); |
| 385 | } |
| 386 | return {}; |
| 387 | } |
| 388 | |
| 389 | void instruction::finalize(context& ctx) |
| 390 | { |
nothing calls this directly
no test coverage detected