pike.git / src / treeopt.in

version» Context lines:

pike.git/src/treeopt.in:1609:    0),    $1));    }   }   ;      // convert all X_EQ(1,2) to $1 = $1 X $2   F_ADD_EQ(0,1) :   {    struct pike_type *type = $0->type; +  int oper = $0->tree_info & OPT_SIDE_EFFECT ? F_ASSIGN_SELF : F_ASSIGN;    add_ref(type); -  $$ = mknode( F_ASSIGN, mksoftcastnode(type,mkopernode( "`+", $0, $1 )), $0 ); +  $$ = mknode( oper, mksoftcastnode(type,mkopernode( "`+", $0, $1 )), $0 );   };      F_SUB_EQ(0,1) :   {    struct pike_type *type = $0->type; -  +  int oper = $0->tree_info & OPT_SIDE_EFFECT ? F_ASSIGN_SELF : F_ASSIGN;    add_ref(type); -  $$ = mknode( F_ASSIGN, mksoftcastnode(type,mkopernode( "`-", $0, $1 )), $0 ); +  $$ = mknode( oper, mksoftcastnode(type,mkopernode( "`-", $0, $1 )), $0 );   };      F_AND_EQ(0,1) :   {    struct pike_type *type = $0->type; -  +  int oper = $0->tree_info & OPT_SIDE_EFFECT ? F_ASSIGN_SELF : F_ASSIGN;    add_ref(type); -  $$ = mknode( F_ASSIGN, mksoftcastnode(type,mkopernode( "`&", $0, $1 )), $0 ); +  $$ = mknode( oper, mksoftcastnode(type,mkopernode( "`&", $0, $1 )), $0 );   };      F_OR_EQ(0,1) :   {    struct pike_type *type = $0->type; -  +  int oper = $0->tree_info & OPT_SIDE_EFFECT ? F_ASSIGN_SELF : F_ASSIGN;    add_ref(type); -  $$ = mknode( F_ASSIGN, mksoftcastnode(type,mkopernode( "`|", $0, $1 )), $0 ); +  $$ = mknode( oper, mksoftcastnode(type,mkopernode( "`|", $0, $1 )), $0 );   };      F_XOR_EQ(0,1) :   {    struct pike_type *type = $0->type; -  +  int oper = $0->tree_info & OPT_SIDE_EFFECT ? F_ASSIGN_SELF : F_ASSIGN;    add_ref(type); -  $$ = mknode( F_ASSIGN, mksoftcastnode(type,mkopernode( "`^", $0, $1 )), $0 ); +  $$ = mknode( oper, mksoftcastnode(type,mkopernode( "`^", $0, $1 )), $0 );   };      F_LSH_EQ(0,1) :   {    struct pike_type *type = $0->type; -  +  int oper = $0->tree_info & OPT_SIDE_EFFECT ? F_ASSIGN_SELF : F_ASSIGN;    add_ref(type); -  $$ = mknode( F_ASSIGN, mksoftcastnode(type,mkopernode( "`<<", $0, $1)), $0 ); +  $$ = mknode( oper, mksoftcastnode(type,mkopernode( "`<<", $0, $1)), $0 );   }; -  +    F_RSH_EQ(0,1) :   {    struct pike_type *type = $0->type; -  +  int oper = $0->tree_info & OPT_SIDE_EFFECT ? F_ASSIGN_SELF : F_ASSIGN;    add_ref(type); -  $$ = mknode( F_ASSIGN, mksoftcastnode(type,mkopernode( "`>>", $0, $1)), $0 ); +  $$ = mknode( oper, mksoftcastnode(type,mkopernode( "`>>", $0, $1)), $0 );   };      F_MULT_EQ(0,1):   {    struct pike_type *type = $0->type; -  +  int oper = $0->tree_info & OPT_SIDE_EFFECT ? F_ASSIGN_SELF : F_ASSIGN;    add_ref(type); -  $$ = mknode( F_ASSIGN, mksoftcastnode(type,mkopernode( "`*", $0, $1 )), $0 ); +  $$ = mknode( oper, mksoftcastnode(type,mkopernode( "`*", $0, $1 )), $0 );   };      F_MOD_EQ(0,1) :   {    struct pike_type *type = $0->type; -  +  int oper = $0->tree_info & OPT_SIDE_EFFECT ? F_ASSIGN_SELF : F_ASSIGN;    add_ref(type); -  $$ = mknode( F_ASSIGN, mksoftcastnode(type,mkopernode( "`%", $0, $1 )), $0 ); +  $$ = mknode( oper, mksoftcastnode(type,mkopernode( "`%", $0, $1 )), $0 );   };      F_DIV_EQ(0,1) :   {    struct pike_type *type = $0->type; -  +  int oper = $0->tree_info & OPT_SIDE_EFFECT ? F_ASSIGN_SELF : F_ASSIGN;    add_ref(type); -  $$ = mknode( F_ASSIGN, mksoftcastnode(type,mkopernode( "`/", $0, $1 )), $0 ); +  $$ = mknode( oper, mksoftcastnode(type,mkopernode( "`/", $0, $1 )), $0 );   };