pike.git
/
src
/
docode.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/docode.c:863:
n->u.node.b->u.sval.u.integer, n->u.node.a->u.sval.u.integer); return 1; case F_EXTERNAL: case F_GET_SET: { int level = 0; struct program_state *state = Pike_compiler; while (state && (state->new_program->id != n->u.integer.a)) {
-
state->new_program->flags |= PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT;
+
if ((flags & WANT_LVALUE) ||
+
(n->node_info & (OPT_EXTERNAL_DEPEND|OPT_NOT_CONST))) {
+
/* Not a reference to a locally bound external constant.
+
* We will thus need true parent pointers. */
+
state->new_program->flags |=
+
PROGRAM_USES_PARENT | PROGRAM_NEEDS_PARENT;
+
}
state = state->previous; level++; } if (!state) { my_yyerror("Program parent %d lost during compiling.", n->u.integer.a); emit1(F_NUMBER,0); } else if (flags & WANT_LVALUE) { if (n->u.integer.b == IDREF_MAGIC_THIS) { my_yyerror("this is not an lvalue."); }