MCPcopy Create free account
hub / github.com/csmith-project/csmith / visit_facts

Method visit_facts

src/FunctionInvocationBinary.cpp:462–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462bool
463FunctionInvocationBinary::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

Callers

nothing calls this directly

Calls 2

merge_factsFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected