pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:1:
/* || 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: program.c,v 1.
597
2005/
11
/
06
21
:
42
:
54
grubba
Exp $
+
|| $Id: program.c,v 1.
598
2005/
12
/
31
03
:
35
:
58
nilsson
Exp $
*/ #include "global.h" #include "program.h" #include "object.h" #include "dynamic_buffer.h" #include "pike_types.h" #include "stralloc.h" #include "las.h" #include "lex.h"
pike.git/src/program.c:2141:
*/ void low_start_new_program(struct program *p, int pass, struct pike_string *name, int flags, int *idp) { int id=0; struct svalue tmp;
+
#ifdef WITH_FACETS
if(Pike_compiler->compiler_pass == 1 && p) { p->facet_class = 0; p->facet_index = -1; p->facet_group = NULL; }
-
+
#endif
#if 0 #ifdef SHARED_NODES if (!node_hash.table) { node_hash.table = malloc(sizeof(node *)*32831); if (!node_hash.table) { Pike_fatal("Out of memory!\n"); } MEMSET(node_hash.table, 0, sizeof(node *)*32831); node_hash.size = 32831;
pike.git/src/program.c:2500:
{ 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 defined(PIKE_USE_MACHINE_CODE) && defined(VALGRIND_DISCARD_TRANSLATIONS) if(p->program) { VALGRIND_DISCARD_TRANSLATIONS(p->program, p->num_program*sizeof(p->program[0])); } #endif /* PIKE_USE_MACHINE_CODE && VALGRIND_DISCARD_TRANSLATIONS */ if(p->flags & PROGRAM_OPTIMIZED) { #ifdef PIKE_USE_MACHINE_CODE
pike.git/src/program.c:3739:
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 && 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 && p->facet_class == PROGRAM_IS_FACET_CLASS) {
pike.git/src/program.c:3787:
yyerror("Product class can't inherit from other prodcut class."); } /* A class that inherits from a product class is also a product class */ else if(Pike_compiler->new_program->facet_class!=PROGRAM_IS_FACET_CLASS) { Pike_compiler->new_program->facet_class = PROGRAM_IS_PRODUCT_CLASS; add_ref(p->facet_group); Pike_compiler->new_program->facet_group = p->facet_group; } } }
+
#endif
/* * make this program inherit another program */ void low_inherit(struct program *p, struct object *parent, int parent_identifier, int parent_offset, INT32 flags,
pike.git/src/program.c:3823:
#endif CDFPRINTF((stderr, "th(%ld) %p inherit %p\n", (long) th_self(), Pike_compiler->new_program, p)); if(!p) { yyerror("Illegal program pointer."); 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; } if(p->flags & PROGRAM_NEEDS_PARENT) { struct program_state *state=Pike_compiler;