pike.git
/
src
/
builtin.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/builtin.cmod:1:
/* -*- c -*- || 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: builtin.cmod,v 1.
133
2003/04/
27
16
:
17
:
33
mast Exp $
+
|| $Id: builtin.cmod,v 1.
134
2003/04/
28
00
:
32
:
42
mast Exp $
*/ #include "global.h" #include "interpret.h" #include "svalue.h" #include "opcodes.h" #include "pike_macros.h" #include "object.h" #include "program.h" #include "array.h"
pike.git/src/builtin.cmod:850:
id = ID_FROM_INT(p, e); if (IDENTIFIER_IS_CONSTANT(id->identifier_flags) && is_eq( & PROG_FROM_INT(p, e)->constants[id->func.offset].sval, func)) REF_RETURN id->name; } #ifdef PIKE_DEBUG if (d_flag>5) { fprintf(stderr,
-
"Failed to find symbol for program
0x
%
08p\n
"
+
"Failed to find symbol for program %
p\n
"
"Parent program info:\n", func->u.program); dump_program_tables(func->u.program->parent, 0); } #endif } break; } case PIKE_T_FUNCTION:
pike.git/src/builtin.cmod:1485:
/* Handle varargs... */ if (function && (function->identifier_flags & IDENTIFIER_VARARGS) && (f->locals + numargs < stack_top) && (f->locals[numargs].type == T_ARRAY)) { varargs = f->locals[numargs].u.array->size; } if (numargs + varargs) { bf->args = allocate_array_no_init(numargs + varargs, 0);
+
bf->args->type_field =
assign_svalues_no_free(bf->args->item, f->locals, numargs, BIT_MIXED); if (varargs) {
-
+
bf->args->type_field |=
assign_svalues_no_free(bf->args->item + numargs, f->locals[numargs].u.array->item, varargs, BIT_MIXED); } } } }
-
+
res->type_field = BIT_OBJECT;
/* NOTE: res has already been pushed on the stack. */ } /*! @decl array(Pike.BacktraceFrame) backtrace() *! *! FIXME: This documentation is not up to date! *! *! Get a description of the current call stack. *! *! The description is returned as an array with one entry for each call
pike.git/src/builtin.cmod:2743:
static void low_automap(int d, int depth, struct svalue *fun, struct svalue *real_args, INT32 args) { INT32 x,e,tmp,size=0x7fffffff; struct svalue *tmpargs=Pike_sp - args; struct array *ret;
+
TYPE_FIELD types;
for(e=0;e<args;e++) { if(real_args[e].type==T_OBJECT && real_args[e].u.object->prog == automap_marker_program && OBJ2_AUTOMAP_MARKER(real_args[e].u.object)->depth >= d) { if(tmpargs[e].type != T_ARRAY) index_error("__automap__", Pike_sp-args,
pike.git/src/builtin.cmod:2769:
size=tmp; } } #ifdef PIKE_DEBUG if(size == 0x7fffffff) Pike_fatal("No automap markers found in low_automap\n"); #endif push_array(ret=allocate_array(size));
+
types = 0;
for(x=0;x<size;x++) { for(e=0;e<args;e++) { if(real_args[e].type==T_OBJECT && real_args[e].u.object->prog == automap_marker_program && OBJ2_AUTOMAP_MARKER(real_args[e].u.object)->depth >= d) { #ifdef PIKE_DEBUG
pike.git/src/builtin.cmod:2792:
push_svalue(ITEM(tmpargs[e].u.array)+x); }else{ push_svalue(tmpargs+e); } } if(d == depth) apply_svalue(fun,args); else low_automap(d+1,depth,fun,real_args,args);
-
dmalloc
_
touch
_
svalue(Pike
_
sp-1
);
-
ITEM(ret)[x]
=*--Pike_sp
;
+
stack
_
pop
_
to_no_free
(
ITEM(ret
)
+ x)
;
+
types |= 1 <<
ITEM(ret)[x]
.type
;
}
-
+
ret->type_field = types;
stack_unlink(args); } PIKEFUN array __automap__(mixed fun, mixed ... tmpargs) efun; { int e,depth=-1; check_stack(args);