pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:5046:
#endif CDFPRINTF("th(%ld) %p inherit %p\n", (long) th_self(), Pike_compiler->new_program, p); if(!p) { yyerror("Illegal program pointer."); return; }
-
if (Pike_compiler->compiler_pass
!
= COMPILER_PASS_
FIRST
) {
+
if (Pike_compiler->compiler_pass =
=
COMPILER_PASS_
EXTRA
) {
struct program *old_p =
-
Pike_compiler->new_program->inherits[Pike_compiler->num_inherits+1].prog;
+
Pike_compiler->new_program->
+
inherits[Pike_compiler->num_inherits+1].prog;
Pike_compiler->num_inherits += old_p->num_inherits; if (old_p != p) { yyerror("Got different program for inherit in second pass " "(resolver problem)."); }
-
+
return;
+
}
+
if (Pike_compiler->compiler_pass == COMPILER_PASS_LAST) {
+
struct program *old_p =
+
Pike_compiler->new_program->
+
inherits[Pike_compiler->num_inherits+1].prog;
+
Pike_compiler->num_inherits += old_p->num_inherits;
-
+
if (old_p != p) {
+
yyerror("Got different program for inherit in second pass "
+
"(resolver problem).");
+
}
+
if (!(p->flags & PROGRAM_FINISHED)) { /* Require that the inherited program really is finished in pass * 2. Otherwise we might not have all definitions when we * fixate our program. * * FIXME: Maybe this can be relaxed by registering a dependency * and delaying compilation here? */ yyerror ("Cannot inherit program in pass 2 " "which is not fully compiled yet.");