pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:1:
/*\ ||| This file a part of Pike, and is copyright by Fredrik Hubinette ||| Pike is distributed as GPL (General Public License) ||| See the files COPYING and DISCLAIMER for more information. \*/ /**/ #include "global.h" #include <math.h>
-
RCSID("$Id: operators.c,v 1.
118
2001/02/
04
02
:
08
:
19
hubbe Exp $");
+
RCSID("$Id: operators.c,v 1.
119
2001/02/
25
17
:
55:
08 hubbe Exp $");
#include "interpret.h" #include "svalue.h" #include "multiset.h" #include "mapping.h" #include "array.h" #include "stralloc.h" #include "opcodes.h" #include "operators.h" #include "language.h" #include "pike_memory.h"
pike.git/src/operators.c:467:
switch(count_args(CDR(n))) { case 1: do_docode(CDR(n),0); return 1; case 2: first_arg=my_get_arg(&_CDR(n), 0); second_arg=my_get_arg(&_CDR(n), 1);
-
do_docode(CDR(n),DO_NOT_COPY);
+
do_docode(CDR(n),DO_NOT_COPY
_TOPLEVEL
);
if(first_arg[0]->type == float_type_string && second_arg[0]->type == float_type_string) { emit0(F_ADD_FLOATS); } else if(first_arg[0]->type == int_type_string && second_arg[0]->type == int_type_string) { emit0(F_ADD_INTS); }
pike.git/src/operators.c:866:
static int generate_minus(node *n) { 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);
+
do_docode(CDR(n),DO_NOT_COPY
_TOPLEVEL
);
emit0(F_SUBTRACT); return 1; } return 0; } PMOD_EXPORT void o_and(void) { if(sp[-1].type != sp[-2].type) {
pike.git/src/operators.c:1561:
/* FIXME: Not appropriate if too many args. */ SIMPLE_TOO_FEW_ARGS_ERROR("`<<", 2); } o_lsh(); } static int generate_lsh(node *n) { if(count_args(CDR(n))==2) {
-
do_docode(CDR(n),DO_NOT_COPY);
+
do_docode(CDR(n),DO_NOT_COPY
_TOPLEVEL
);
emit0(F_LSH); return 1; } return 0; } PMOD_EXPORT void o_rsh(void) { if(sp[-2].type != T_INT || sp[-1].type != T_INT) {
pike.git/src/operators.c:2129:
assign_svalue(s,sp-1); pop_n_elems(sp-s-1); } } } static int generate_divide(node *n) { if(count_args(CDR(n))==2) {
-
do_docode(CDR(n),DO_NOT_COPY);
+
do_docode(CDR(n),DO_NOT_COPY
_TOPLEVEL
);
emit0(F_DIVIDE); return 1; } return 0; } PMOD_EXPORT void o_mod(void) { if(sp[-2].type != sp[-1].type && !float_promote()) {
pike.git/src/operators.c:2253:
/* FIXME: Not appropriate when too many args. */ SIMPLE_TOO_FEW_ARGS_ERROR("`%", 2); } o_mod(); } static int generate_mod(node *n) { if(count_args(CDR(n))==2) {
-
do_docode(CDR(n),DO_NOT_COPY);
+
do_docode(CDR(n),DO_NOT_COPY
_TOPLEVEL
);
emit0(F_MOD); return 1; } return 0; } PMOD_EXPORT void o_not(void) { switch(sp[-1].type) {