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.
101
2000/
08
/
31
14
:
43
:
00
grubba Exp $");
+
RCSID("$Id: operators.c,v 1.
102
2000/
09
/
22
12
:
25
:
59
grubba 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:1691:
switch(args) { case 0: SIMPLE_TOO_FEW_ARGS_ERROR("`*", 1); case 1: return; case 2: o_multiply(); return; default: if(sp[-args].type==T_OBJECT) { CALL_OPERATOR(LFUN_MULTIPLY, args); } else {
-
while(
-
-
args
>
0)
o_multiply
();
+
INT32 i =
-args
,
j
=
-1;
+
/* Reverse the arguments */
+
while
(
i < j
)
{
+
struct svalue tmp = sp[i]
;
+
sp[i++] = sp[j];
+
sp[j--] = tmp;
}
-
+
while(--args > 0) {
+
/* Restore the order, and multiply */
+
stack_swap();
+
o_multiply();
} }
-
+
}
+
}
static int generate_multiply(node *n) { switch(count_args(CDR(n))) { case 1: do_docode(CDR(n),0); return 1; case 2: