Branch: Tag:

2018-07-16

2018-07-16 12:48:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Support inherit of CompilerEnvironment.

Fix some bugs triggered in the supporter subsystem when
executing in an inherited CompilerEnviroment.

2234:    */    new_frame->current_program = ce->prog;    add_ref(new_frame->current_program); -  new_frame->context = compilation_program->inherits + inherit; +  new_frame->context = ce->prog->inherits + inherit;    new_frame->current_storage = ce->storage + new_frame->context->storage_offset;   #ifdef PIKE_DEBUG    if (new_frame->context->prog != compilation_program) {
2281:   PMOD_EXPORT void exit_compiler(void)   {   #ifdef PIKE_DEBUG -  if ((Pike_fp->current_program != compilation_program) || -  (Pike_fp->fun != PC_COMPILE_FUN_NUM)) { +  if ((Pike_fp->context->prog != compilation_program) || +  (Pike_fp->fun != Pike_fp->context->identifier_level + PC_COMPILE_FUN_NUM)) {    Pike_fatal("exit_compiler(): Frame stack out of whack!\n");    }   #endif /* PIKE_DEBUG */