pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:2741:    struct pike_string *name,    int flags,    int *idp)   {    struct compilation *c = THIS_COMPILATION;    int id=0;    struct svalue tmp;       CHECK_COMPILER();    - #ifdef WITH_FACETS -  if(Pike_compiler->compiler_pass == 1 && p) { -  p->facet_index = -1; -  p->facet_group = NULL; -  } - #endif -  +     /* 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();    }
pike.git/src/program.c:3117:    {    if(p->inherits[e].prog)    free_program(p->inherits[e].prog);    }    if(p->inherits[e].parent)    free_object(p->inherits[e].parent);    }       DOUBLEUNLINK(first_program, p);    - #ifdef WITH_FACETS -  if(p->facet_group) -  { -  free_object(p->facet_group); -  } - #endif -  +     if(p->flags & PROGRAM_OPTIMIZED)    {   #ifdef PIKE_USE_MACHINE_CODE    do {    /* NOTE: Assumes all BAR's are before any FOO. */   #define BAR(NUMTYPE,TYPE,ARGTYPE,NAME) \    if (p->NAME) mexec_free(p->NAME);   #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \    if (p->NAME) { \    dmfree(p->NAME); \
pike.git/src/program.c:4529: Inside #if 0
   parent_offset+=i->parent_offset;   #endif       return locate_parent_state(&state,    &i,    &parent_identifier,    depth);   }   #endif    - #ifdef WITH_FACETS - void check_for_facet_inherit(struct program *p) - { -  /* If the inherit statement comes before the facet keyword in the -  * class declaration the class will be temporarily marked as a -  * product-class, but this will be taken care of when the facet -  * keyword is found. */ -  if (!p) return; -  if (Pike_compiler->new_program->facet_group && -  p->facet_group != Pike_compiler->new_program->facet_group) -  yyerror("A class can not belong to two facet-groups."); -  if (p->flags & PROGRAM_IS_FACET) { -  if (Pike_compiler->new_program->flags & PROGRAM_IS_FACET) { -  if(Pike_compiler->new_program->facet_index != p->facet_index) -  yyerror("Facet class can't inherit from class in different facet."); -  } -  /* Otherwise this is a product class */ -  else { -  if( !Pike_compiler->new_program->facet_group ) { -  Pike_compiler->new_program->flags |= PROGRAM_IS_PRODUCT; -  add_ref(p->facet_group); -  Pike_compiler->new_program->facet_group = p->facet_group; -  } -  push_int(Pike_compiler->new_program->id); -  push_int(p->facet_index); -  push_int(p->id); -  safe_apply(p->facet_group, "add_product_class", 3); -  pop_stack(); -  } -  } -  /* The inherited class is not a facet class */ -  else if (p->flags & PROGRAM_IS_PRODUCT) { -  if (Pike_compiler->new_program->flags & PROGRAM_IS_FACET) { -  yyerror("Facet class can't inherit from product class."); -  } -  else if(Pike_compiler->new_program->flags & PROGRAM_IS_PRODUCT){ -  yyerror("Product class can't inherit from other product class."); -  } -  /* A class that inherits from a product class is also a product class */ -  else { -  Pike_compiler->new_program->flags |= PROGRAM_IS_PRODUCT; -  add_ref(p->facet_group); -  Pike_compiler->new_program->facet_group = p->facet_group; -  } -  } - } - #endif -  -  +    static void lower_inherit(struct program *p,    struct object *parent,    int parent_identifier,    int parent_offset,    INT32 flags,    struct pike_string *name)   {    int e;    ptrdiff_t inherit_offset, storage_offset;    struct inherit inherit;
pike.git/src/program.c:4665:    }       if (!(p->flags & (PROGRAM_FINISHED | PROGRAM_PASS_1_DONE))) {    yyerror ("Cannot inherit program in pass 1 "    "which is only a placeholder.");    yyerror ("(You probably have a cyclic symbol dependency that the "    "compiler cannot handle.)");    return;    }    - #ifdef WITH_FACETS -  /* Check if inherit is a facet inherit. */ -  check_for_facet_inherit(p); - #endif -  +     if (p == placeholder_program) {    yyerror("Trying to inherit placeholder program (resolver problem).");    return;    }       /* parent offset was increased by 42 for above test.. */    if(parent_offset)    parent_offset-=42;       inherit_offset = Pike_compiler->new_program->num_inherits;