pike.git/
src/
peep.in
Branch:
Tag:
Non-build tags
All tags
No tags
2014-10-20
2014-10-20 17:59:00 by Martin Nilsson <nilsson@opera.com>
98b71c698a283f9485cc8ea0ec0e7a06457e2108 (
17
lines) (+
16
/-
1
)
[
Show
|
Annotate
]
Branch:
8.0
Always generate compile time error when divide by zero.
313:
OPER_INT(NUMBER,$1a) OPER_INT(NEG_NUMBER [!INT32_NEG_OVERFLOW($1a)], -$1a)
-
OPER_INT(CONST0,0)
+
OPER_INT(CONST1,1) OPER_INT(CONST_1,-1) OPER_INT(BIGNUM,0x7fffffff)
-
+
#undef OPER_INT
+
+
CONST0 MOD [ yyerror("Divide by constant 0"),1 ] :
+
CONST0 DIVIDE [ yyerror("Divide by constant 0"),1 ] :
+
+
CONST0 LSH : LSH_INT(0);
+
CONST0 RSH : RSH_INT(0);
+
CONST0 SUBTRACT : SUBTRACT_INT(0);
+
CONST0 ADD : ADD_INT(0);
+
CONST0 AND : AND_INT(0);
+
CONST0 OR : OR_INT(0);
+
CONST0 XOR : XOR_INT(0);
+
CONST0 MULTIPLY : MULTIPLY_INT(0);
+
+
// Some noops related to the above opcodes. // MOD_INT(1): POP_VALUE CONST0 // cf string % int ==> string LSH_INT(0):