| 460 | } |
| 461 | |
| 462 | bool |
| 463 | FunctionInvocationBinary::visit_facts(vector<const Fact*>& inputs, CGContext& cg_context) const |
| 464 | { |
| 465 | bool skippable = IsOrderedStandardFunc(eFunc); |
| 466 | assert(param_value.size() == 2); |
| 467 | if (skippable) { |
| 468 | const Expression* value = param_value[0]; |
| 469 | if (value->visit_facts(inputs, cg_context)) { |
| 470 | vector<const Fact*> inputs_copy = inputs; |
| 471 | value = param_value[1]; |
| 472 | if (value->visit_facts(inputs, cg_context)) { |
| 473 | // the second parameter may or may not be evaludated, thus need to |
| 474 | // merge with the post-param0 env. |
| 475 | merge_facts(inputs, inputs_copy); |
| 476 | return true; |
| 477 | } |
| 478 | } |
| 479 | return false; |
| 480 | } |
| 481 | // for other binary invocations, use the standard visitor |
| 482 | return FunctionInvocation::visit_facts(inputs, cg_context); |
| 483 | } |
| 484 | |
| 485 | /////////////////////////////////////////////////////////////////////////////// |
| 486 |
nothing calls this directly
no test coverage detected