* */
| 395 | * |
| 396 | */ |
| 397 | void |
| 398 | FunctionInvocationBinary::indented_output(std::ostream &out, int indent) const |
| 399 | { |
| 400 | if (has_simple_params()) { |
| 401 | output_tab(out, indent); |
| 402 | Output(out); |
| 403 | return; |
| 404 | } |
| 405 | output_open_encloser("(", out, indent); |
| 406 | // special case for mutated array subscripts, see ArrayVariable::rnd_mutate |
| 407 | // the rational is we don't need overflow check for this addition because |
| 408 | // the induction variable is small --- less than the size of array, which |
| 409 | // by default is 10 at most |
| 410 | if (eFunc == eAdd && op_flags == 0) { |
| 411 | param_value[0]->indented_output(out, indent); |
| 412 | out << " + "; |
| 413 | outputln(out); |
| 414 | param_value[1]->indented_output(out, indent); |
| 415 | } |
| 416 | else { |
| 417 | switch (eFunc) { |
| 418 | case eAdd: |
| 419 | case eSub: |
| 420 | case eMul: |
| 421 | case eMod: |
| 422 | case eDiv: |
| 423 | case eLShift: |
| 424 | case eRShift: |
| 425 | if (CGOptions::avoid_signed_overflow()) { |
| 426 | output_tab(out, indent); |
| 427 | out << op_flags->to_string(eFunc); |
| 428 | outputln(out); |
| 429 | output_open_encloser("(", out, indent); |
| 430 | if (CGOptions::math_notmp()) { |
| 431 | output_tab(out, indent); |
| 432 | out << tmp_var1 << ", "; |
| 433 | } |
| 434 | outputln(out); |
| 435 | param_value[0]->indented_output(out, indent); |
| 436 | out << ", "; |
| 437 | outputln(out); |
| 438 | if (CGOptions::math_notmp()) { |
| 439 | output_tab(out, indent); |
| 440 | out << tmp_var2 << ", "; |
| 441 | } |
| 442 | outputln(out); |
| 443 | param_value[1]->indented_output(out, indent); |
| 444 | output_close_encloser(")", out, indent); |
| 445 | break; |
| 446 | } |
| 447 | // fallthrough! |
| 448 | |
| 449 | default: |
| 450 | param_value[0]->indented_output(out, indent); |
| 451 | out << " "; |
| 452 | OutputStandardFuncName(eFunc, out); |
| 453 | out << " "; |
| 454 | outputln(out); |
nothing calls this directly
no test coverage detected