pike.git
/
src
/
operators.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/operators.c:3782:
push_float( pow( a, b ) ); return; } default: stack_swap(); convert_stack_top_to_bignum(); stack_swap(); /* fallthrough again (this is the slow path).. */ case TWO_TYPES(T_OBJECT,T_INT):
+
case TWO_TYPES(T_OBJECT,T_FLOAT):
case TWO_TYPES(T_OBJECT,T_OBJECT):
-
+
case TWO_TYPES(T_INT,T_OBJECT):
+
case TWO_TYPES(T_FLOAT,T_OBJECT):
if( !call_lfun( LFUN_POW, LFUN_RPOW ) )
-
Pike
_
error
(
"Illegal
argument
1
to
`**.\n"
);
+
{
+
if( TYPEOF(sp[-2]) != PIKE
_
T_OBJECT )
+
{
+
stack_swap
(
);
+
convert_stack_top_
to
_bignum();
+
stack_swap(
);
+
if( call_lfun( LFUN_POW, LFUN_RPOW ) )
return; }
-
+
Pike_error("Illegal argument 1 to `** (object missing implementation of `**).\n");
}
-
+
return;
+
}
+
}
/*! @decl mixed `*(mixed arg1) *! @decl mixed `*(object arg1, mixed arg2, mixed ... extras) *! @decl mixed `*(mixed arg1, object arg2) *! @decl array `*(array arg1, int arg2) *! @decl array `*(array arg1, float arg2) *! @decl string `*(string arg1, int arg2) *! @decl string `*(string arg1, float arg2) *! @decl string `*(array(string) arg1, string arg2)
pike.git/src/operators.c:5922:
"function(array(array(1=mixed)),array(1=mixed):array(1))|" "function(int...:int)|" "!function(int...:mixed)&function(float|int...:float)|" "function(string*,string:string)|" "function(array(0=mixed),int:array(0))|" "function(array(0=mixed),float:array(0))|" "function(string,int:string) "function(string,float:string) */ ADD_EFUN2("`**", f_exponent,
-
tOr4
(tFunc(tInt tInt,tInt),
+
tOr7
(tFunc(tInt tInt,tInt),
tFunc(tFloat tFloat, tFloat),
-
+
tFunc(tOr(tInt,tFloat) tObj, tOr3(tFloat,tInt,tFloat)),
tFunc(tInt tFloat, tFloat),
-
+
tFunc(tObj tMix, tOr3(tFloat,tInt,tObj)),
+
tFunc(tMix tObj, tOr3(tFloat,tInt,tObj)),
tFunc(tFloat tInt, tFloat)), OPT_TRY_OPTIMIZE,0,0); ADD_EFUN2("`*", f_multiply, tOr9(tIfnot(tFuncV(tNone,tNot(tOr(tObj,tMix)),tMix), tFuncV(tNone,tOr(tMix,tVoid),tMix)), tFunc(tArr(tArr(tSetvar(1,tMix))) tArr(tSetvar(1,tMix)),tArr(tVar(1))), tFuncV(tInt,tInt,tInt), tIfnot(tFuncV(tNone,tNot(tFlt),tMix),