Branch: Tag:

2016-01-19

2016-01-19 21:45:36 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Added update_current_type().

This is an internal helper function that updates compiler_frame->
current_type with the type (compiler-) popped from the type stack.

168:   static node *find_versioned_identifier(struct pike_string *identifier,    int major, int minor);   static int call_handle_import(struct pike_string *s); + static void update_current_type();      static int inherit_depth;   static struct program_state *inherit_state = NULL;
1267:    */   simple_type: full_type    { -  if(Pike_compiler->compiler_frame->current_type) -  free_type(Pike_compiler->compiler_frame->current_type); -  Pike_compiler->compiler_frame->current_type = compiler_pop_type(); +  update_current_type();    }    ;   
4884:    return 0;   }    + /* Set compiler_frame->current_type from the type stack. */ + static void update_current_type() + { +  if(Pike_compiler->compiler_frame->current_type) +  free_type(Pike_compiler->compiler_frame->current_type); +  Pike_compiler->compiler_frame->current_type = compiler_pop_type(); + } +    void cleanup_compiler(void)   {   }