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

Method visit_unordered_params

src/FunctionInvocation.cpp:457–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455}
456
457bool
458FunctionInvocation::visit_unordered_params(vector<const Fact*>& inputs, CGContext& cg_context) const
459{
460 vector<const Fact*> inputs_copy = inputs;
461 vector<const Fact*> tmp;
462 vector<intvec> orders = permute_param_oders();
463 size_t i, j;
464 assert(orders.size() > 0);
465 // visit function calls with all possible orders
466 for (i=0; i<orders.size(); i++) {
467 intvec& order = orders[i];
468 inputs = inputs_copy;
469 for (j=0; j<order.size(); j++) {
470 int param_id = order[j];
471 const Expression* value = param_value[param_id];
472 if (!value->visit_facts(inputs, cg_context)) {
473 return false;
474 }
475 }
476 if (i==0) {
477 tmp = inputs;
478 }
479 else {
480 merge_facts(tmp, inputs);
481 }
482 }
483 inputs = tmp;
484 return true;
485}
486
487CVQualifiers
488FunctionInvocation::get_qualifiers(void) const

Callers

nothing calls this directly

Calls 3

merge_factsFunction · 0.85
sizeMethod · 0.80
visit_factsMethod · 0.45

Tested by

no test coverage detected