pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:2764:       CHECK_COMPILER();       /* We don't want to change thread, but we don't want to    * wait for the other threads to complete either.    */    low_init_threads_disable();       c->compilation_depth++;    -  if (!Pike_compiler->compiler_frame) { -  new_node_s_context(); -  } -  +     SET_SVAL_TYPE(tmp, T_PROGRAM);    if(!p)    {    p=low_allocate_program();    if(name)    {    tmp.u.program=p;    id=add_constant(name, &tmp, flags & ~ID_EXTERN);   #if 0    fprintf(stderr,"Compiling class %s, depth=%d\n",
pike.git/src/program.c:2819:    "pass=%d: threads_disabled:%d, compilation_depth:%d\n",    (long)th_self(), p, name ? name->str : "-",    Pike_compiler->compiler_pass,    threads_disabled, c->compilation_depth));       init_type_stack();      #define PUSH   #include "compilation.h"    +  ba_init(&Pike_compiler->node_allocator, sizeof(struct node_s), 512); +     Pike_compiler->parent_identifier=id;    Pike_compiler->compiler_pass = pass;       Pike_compiler->num_used_modules=0; /* FIXME: Duplicate? */       if(p->flags & PROGRAM_FINISHED)    {    yyerror("Pass2: Program already done");    }   
pike.git/src/program.c:3308:    Pike_compiler->last_identifier=0;    }       if(Pike_compiler->last_file)    {    free_string(Pike_compiler->last_file);    Pike_compiler->last_file=0;    }       unuse_modules(Pike_compiler->num_used_modules); +  +  free_all_nodes(); +  +  ba_destroy(&Pike_compiler->node_allocator);   }      int sizeof_variable(int run_time_type)   {    switch(run_time_type)    {    case T_FUNCTION:    case T_MIXED: return sizeof(struct svalue);    case T_FLOAT: return sizeof(FLOAT_TYPE);    case T_INT: return sizeof(INT_TYPE);
pike.git/src/program.c:4018: Inside #if defined(SHARED_NODES)
     #ifdef SHARED_NODES    /* free(node_hash.table); */   #endif /* SHARED_NODES */      #define POP   #include "compilation.h"       exit_type_stack();    -  free_all_nodes(); +        CDFPRINTF((stderr,    "th(%ld) %p end_first_pass(%d): "    "threads_disabled:%d, compilation_depth:%d\n",    (long)th_self(), prog, finish,    threads_disabled, c->compilation_depth));       c->compilation_depth--;       exit_threads_disable(NULL);