pike.git / src / treeopt.in

version» Context lines:

pike.git/src/treeopt.in:517:      F_COMMA_EXPR(-, 0):    $0;      F_COMMA_EXPR(0, -):    $0;      F_COMMA_EXPR(F_CONSTANT, 0 = +):    $0;    - F_COMMA_EXPR(+[node_is_tossable($$)], 0 = +): + // A, B ==> B + // If A is tossable and either + // A is a void expression, or + // B is not a void expression. + F_COMMA_EXPR(1 = +[node_is_tossable($$)], +  0 = +[($$->type != void_type_string) || +  ($1->type == void_type_string)]):    $0;    - F_COMMA_EXPR(F_COMMA_EXPR(0, F_CONSTANT), 1 = +): + F_COMMA_EXPR(F_COMMA_EXPR(0, F_CONSTANT), +  1 = +[$$->type != void_type_string]):    F_COMMA_EXPR($0, $1);    - F_COMMA_EXPR(F_COMMA_EXPR(0, +[node_is_tossable($$)]), 1 = +): + // A, B, C ==> A, C + // If B is tossable and either + // B is a void expression, or + // C is not a void expression. + F_COMMA_EXPR(F_COMMA_EXPR(0, 2 = +[node_is_tossable($$)]), +  1 = +[($$->type != void_type_string) || +  ($2->type == void_type_string)]):    F_COMMA_EXPR($0, $1);      // Join adjacent F_POP_VALUE's, but not if it would cause the stack to   // be deeper across an apply, since that could cause excessive stack   // consumption, e.g. if the apply in some way recurses back into the   // same function. With this limitation, it's doubtful whether this   // optimization have any noticeable effect, however.   //   // NOTE: These two rules work only since F_RETURN, F_BREAK and F_CONTINUE   // have been stripped of F_POP_VALUE by rules above.