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.
165
2002/
11
/
26
16
:
55
:
55
grubba
Exp $
+
|| $Id: operators.c,v 1.
166
2002/
12
/
05
20
:
10
:
41
mast
Exp $
*/ #include "global.h" #include <math.h>
-
RCSID("$Id: operators.c,v 1.
165
2002/
11
/
26
16
:
55
:
55
grubba
Exp $");
+
RCSID("$Id: operators.c,v 1.
166
2002/
12
/
05
20
:
10
:
41
mast
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:1386:
sp++[0]=tmp; func(); } } static void speedup(INT32 args, void (*func)(void)) { switch(sp[-args].type) { /* This method can be used for types where a op b === b op a */ case T_MULTISET:
+
#ifndef PIKE_NEW_MULTISETS
{ int e=-1; while(args > 1) { struct svalue tmp; func(); args--; e++; if(e - args >= -1) { e=0; }else{ tmp=sp[e-args]; sp[e-args]=sp[-1]; sp[-1]=tmp; } } return; }
-
+
#endif
/* Binary balanced tree method for types where * a op b may or may not be equal to b op a */ case T_ARRAY: case T_MAPPING: r_speedup(args,func); return; default: