2014-10-30
2014-10-30 15:32:33 by Per Hedbor <ph@opera.com>
-
89424bfaa34ee5639b0ab2fedccebec96703ffa8
(25 lines)
(+25/-0)
[
Show
| Annotate
]
Branch: 8.0
Fixed for(i;i<x;i++); crash
The code will no longer generate invalid F_LT/GT etc nodes when asked
to, instead it will generate a function call to the correct efun.
I still do not know why this worked in pike 7.8.
Next step: Make treeopt.in F_LT match CALL(&f_lt,ARGS(...))
758: Inside #if defined(PIKE_DEBUG)
case F_GET_SET:
Pike_fatal("Attempt to create an F_GET_SET-node with mknode()!\n");
#endif /* PIKE_DEBUG */
+
+ #define OPERNODE(X,Y) case X: return mkopernode(("`" #Y), a, b )
+ OPERNODE(F_LT,<);
+ OPERNODE(F_GT,>);
+ OPERNODE(F_LE,<=);
+ OPERNODE(F_GE,>=);
+ OPERNODE(F_EQ,==);
+ OPERNODE(F_NE,!=);
+ OPERNODE(F_ADD,+);
+ OPERNODE(F_SUBTRACT,-);
+ OPERNODE(F_DIVIDE,/);
+ OPERNODE(F_MULTIPLY,*);
+ OPERNODE(F_MOD,%);
+ OPERNODE(F_LSH,<<);
+ OPERNODE(F_RSH,>>);
+ OPERNODE(F_OR,|);
+ OPERNODE(F_AND,&);
+ OPERNODE(F_XOR,^);
+ OPERNODE(F_NOT,!);
+ OPERNODE(F_COMPL,~);
+ #if 0
+ OPERNODE(F_NEGATE,-);
+ #endif
+ #undef OPERNODE
}
check_tree(a,0);