Branch: Tag:

2008-07-14

2008-07-14 21:39:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed old bug which over-optimized recursive calls of local functions containing scoped functions.

Rev: src/docode.c:1.203

2:   || 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: docode.c,v 1.202 2008/06/30 13:47:23 mast Exp $ + || $Id: docode.c,v 1.203 2008/07/14 21:39:20 grubba Exp $   */      #include "global.h"
458: Inside #if 1
   *    * * Check if id is an alternate reference to the current function.    * -  * * Check that the function isn't varargs. +  * * Check that the function isn't varargs or contains scoped functions. +  * +  * * Check that the current function doesn't contain scoped functions.    */    if((Pike_compiler->compiler_frame->current_function_number >= 0) &&    ((id == Pike_compiler->compiler_frame->current_function_number) ||
467: Inside #if 1
   Pike_compiler->new_program->    identifier_references[Pike_compiler->compiler_frame->    current_function_number].identifier_offset))) && -  (!(Pike_compiler->new_program-> +  !(Pike_compiler->new_program->    identifiers[ref->identifier_offset].identifier_flags & -  IDENTIFIER_VARARGS))) +  (IDENTIFIER_VARARGS|IDENTIFIER_SCOPE_USED)) && +  !(Pike_compiler->compiler_frame->lexical_scope & SCOPE_SCOPE_USED))    {    int n=count_args(args);    if(n == Pike_compiler->compiler_frame->num_args)