pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:1:
/* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: operators.c,v 1.
243
2008/08/28
15
:
15
:
42
grubba Exp $
+
|| $Id: operators.c,v 1.
244
2008/08/28
20
:
11
:
47
grubba Exp $
*/ #include "global.h" #include <math.h> #include "interpret.h" #include "svalue.h" #include "multiset.h" #include "mapping.h" #include "array.h" #include "stralloc.h"
pike.git/src/operators.c:2107:
Pike_fatal("Couldn't generate comparison!\n" "efun->function: %p\n" "f_eq: %p\n" "f_ne: %p\n" "f_lt: %p\n" "f_le: %p\n" "f_gt: %p\n" "f_ge: %p\n", CAR(n)->u.sval.u.efun->function, f_eq, f_ne, f_lt, f_le, f_gt, f_ge);
+
modify_stack_depth(-1);
return 1; } return 0; } static int float_promote(void) { if(sp[-2].type==T_INT && sp[-1].type==T_FLOAT) { sp[-2].u.float_number=(FLOAT_TYPE)sp[-2].u.integer;
pike.git/src/operators.c:2418:
switch(count_args(CDR(n))) { case 1: do_docode(CDR(n),DO_NOT_COPY); emit0(F_NEGATE); return 1; case 2: do_docode(CDR(n),DO_NOT_COPY_TOPLEVEL); emit0(F_SUBTRACT);
+
modify_stack_depth(-1);
return 1; } return 0; } PMOD_EXPORT void o_and(void) { if(sp[-1].type != sp[-2].type) { if(call_lfun(LFUN_AND, LFUN_RAND))
pike.git/src/operators.c:2761:
struct compilation *c = THIS_COMPILATION; switch(count_args(CDR(n))) { case 1: do_docode(CDR(n),0); return 1; case 2: do_docode(CDR(n),0); emit0(F_AND);
+
modify_stack_depth(-1);
return 1; default: return 0; } } PMOD_EXPORT void o_or(void) { if(sp[-1].type != sp[-2].type)
pike.git/src/operators.c:3002:
struct compilation *c = THIS_COMPILATION; switch(count_args(CDR(n))) { case 1: do_docode(CDR(n),0); return 1; case 2: do_docode(CDR(n),0); emit0(F_OR);
+
modify_stack_depth(-1);
return 1; default: return 0; } } PMOD_EXPORT void o_xor(void) {
pike.git/src/operators.c:3248:
struct compilation *c = THIS_COMPILATION; switch(count_args(CDR(n))) { case 1: do_docode(CDR(n),0); return 1; case 2: do_docode(CDR(n),0); emit0(F_XOR);
+
modify_stack_depth(-1);
return 1; default: return 0; } } PMOD_EXPORT void o_lsh(void) { #ifdef AUTO_BIGNUM
pike.git/src/operators.c:3327:
o_lsh(); } static int generate_lsh(node *n) { struct compilation *c = THIS_COMPILATION; if(count_args(CDR(n))==2) { do_docode(CDR(n),DO_NOT_COPY_TOPLEVEL); emit0(F_LSH);
+
modify_stack_depth(-1);
return 1; } return 0; } PMOD_EXPORT void o_rsh(void) { if(sp[-2].type != T_INT || sp[-1].type != T_INT) { int args = 2;
pike.git/src/operators.c:3409:
o_rsh(); } static int generate_rsh(node *n) { if(count_args(CDR(n))==2) { struct compilation *c = THIS_COMPILATION; do_docode(CDR(n),DO_NOT_COPY); emit0(F_RSH);
+
modify_stack_depth(-1);
return 1; } return 0; } #define TWO_TYPES(X,Y) (((X)<<8)|(Y)) PMOD_EXPORT void o_multiply(void) { int args = 2;
pike.git/src/operators.c:3698:
struct compilation *c = THIS_COMPILATION; switch(count_args(CDR(n))) { case 1: do_docode(CDR(n),0); return 1; case 2: do_docode(CDR(n),0); emit0(F_MULTIPLY);
+
modify_stack_depth(-1);
return 1; default: return 0; } } PMOD_EXPORT void o_divide(void) { if(sp[-2].type!=sp[-1].type && !float_promote())
pike.git/src/operators.c:4062:
} } static int generate_divide(node *n) { if(count_args(CDR(n))==2) { struct compilation *c = THIS_COMPILATION; do_docode(CDR(n),DO_NOT_COPY_TOPLEVEL); emit0(F_DIVIDE);
+
modify_stack_depth(-1);
return 1; } return 0; } PMOD_EXPORT void o_mod(void) { if(sp[-2].type != sp[-1].type && !float_promote()) { if(call_lfun(LFUN_MOD, LFUN_RMOD))
pike.git/src/operators.c:4243:
o_mod(); } static int generate_mod(node *n) { if(count_args(CDR(n))==2) { struct compilation *c = THIS_COMPILATION; do_docode(CDR(n),DO_NOT_COPY_TOPLEVEL); emit0(F_MOD);
+
modify_stack_depth(-1);
return 1; } return 0; } PMOD_EXPORT void o_not(void) { switch(sp[-1].type) { case T_INT: