Branch: Tag:

2008-06-25

2008-06-25 16:11:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed some bugs in handling of combined implicit and explicit create().

Rev: src/language.yacc:1.436

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: language.yacc,v 1.435 2008/06/24 15:48:02 mast Exp $ + || $Id: language.yacc,v 1.436 2008/06/25 16:11:41 grubba Exp $   */      %pure_parser
806:    Pike_compiler->new_program->identifiers + e;    add_ref(id->type);    add_local_name(empty_pike_string, id->type, 0); +  /* Note: add_local_name() above will return e. */ +  Pike_compiler->compiler_frame->variable[e].flags |= +  LOCAL_VAR_IS_USED;    }    } else {    for (e = 0; e < Pike_compiler->num_create_args; e++) {
813:    Pike_compiler->new_program->identifiers + e;    add_ref(id->type);    add_local_name(empty_pike_string, id->type, 0); +  /* Note: add_local_name() above will return e. */ +  Pike_compiler->compiler_frame->variable[e].flags |= +  LOCAL_VAR_IS_USED;    }    }    $<number>$ = e;
2731:    MAKE_CONST_STRING(create_string, "create");    if (((ref_id = isidentifier(create_string)) < 0) ||    (ref = PTR_FROM_INT(Pike_compiler->new_program, ref_id))->inherit_offset || -  (id = ID_FROM_PTR(Pike_compiler->new_program, ref))->func.offset == -1) { +  (((id = ID_FROM_PTR(Pike_compiler->new_program, ref))->func.offset == -1) && +  (Pike_compiler->compiler_pass == 2))) {    int e;    node *create_code = NULL;    struct pike_type *type = NULL;