pike.git
/
src
/
docode.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/docode.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"
-
RCSID("$Id: docode.c,v 1.
110
2001/
03
/
17
20
:
55
:
55
grubba
Exp $");
+
RCSID("$Id: docode.c,v 1.
111
2001/
04
/
14
09
:
44
:
19
hubbe
Exp $");
#include "las.h" #include "program.h" #include "pike_types.h" #include "stralloc.h" #include "interpret.h" #include "constants.h" #include "array.h" #include "pike_macros.h" #include "pike_error.h" #include "pike_memory.h"
pike.git/src/docode.c:1654:
{ if(n->u.sval.u.object == Pike_compiler->fake_object) { emit1(F_LFUN,n->u.sval.subtype); return 1; } if(n->u.sval.u.object->next == n->u.sval.u.object) { int x=0;
+
#if 0
struct object *o; for(o=Pike_compiler->fake_object;o!=n->u.sval.u.object;o=o->parent) x++;
-
+
#else
+
struct program_state *state=Pike_compiler;
+
for(;state->fake_object!=n->u.sval.u.object;state=state->previous)
+
x++;
+
#endif
emit2(F_EXTERNAL, n->u.sval.subtype, x); Pike_compiler->new_program->flags |= PROGRAM_USES_PARENT; return 1; } } #ifdef PIKE_DEBUG case T_OBJECT: if(n->u.sval.u.object->next == n->u.sval.u.object) fatal("Internal error: Pointer to parent cannot be a compile time constant!\n");