pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:3546:
if(id_to_program_cache[p->id & (ID_TO_PROGRAM_CACHE_SIZE-1)]==p) id_to_program_cache[p->id & (ID_TO_PROGRAM_CACHE_SIZE-1)]=0; if(p->strings) for(e=0; e<p->num_strings; e++) if(p->strings[e]) free_string(p->strings[e]); if (p->annotations) { for (e = 0; e < p->num_annotations; e++) {
-
do_free_
array
(p->annotations[e]);
+
do_free_
multiset
(p->annotations[e]);
} } if(p->identifiers) { for(e=0; e<p->num_identifiers; e++) { if(p->identifiers[e].name) free_string(p->identifiers[e].name); if(p->identifiers[e].type)
pike.git/src/program.c:4306:
* the Pike.Annotation interface. */ static void add_annotation(int id, struct svalue *val) { while (Pike_compiler->new_program->num_annotations <= id) { add_to_annotations(NULL); } if (val) { if (Pike_compiler->new_program->annotations[id]) {
-
Pike
_
compiler->new_program->annotations[id] =
-
append_array
(Pike_compiler->new_program->annotations[id], val);
+
multiset
_
add
(Pike_compiler->new_program->annotations[id], val);
} else { push_svalue(val);
-
Pike_compiler->new_program->annotations[id] =
aggregate
_
array(
1
)
;
+
f_aggregate_multiset(1);
+
Pike_compiler->new_program->annotations[id] =
Pike
_
sp[-
1
].u.multiset
;
+
Pike_sp--;
} } } void compiler_add_annotations(int id, node *annotations) { while(annotations) { node *val_node = CAR(annotations); annotations = CDR(annotations); if (val_node->token != F_CONSTANT) continue;
pike.git/src/program.c:7983:
if ((TYPEOF(*val) != T_PROGRAM) || !(val->u.program->flags & PROGRAM_USES_PARENT)) { if (inherit_annotations && (TYPEOF(ITEM(inherit_annotations)[ref->inherit_offset]) == PIKE_T_MULTISET)) { inh_ann = ITEM(inherit_annotations)[ref->inherit_offset].u.multiset; ref_push_multiset(inh_ann); } if ((p2->num_annotations > ref->identifier_offset) && p2->annotations[ref->identifier_offset]) {
-
ref_push_
array
(p2->annotations[ref->identifier_offset]);
-
f_mkmultiset(1);
+
ref_push_
multiset
(p2->annotations[ref->identifier_offset]);
if (inh_ann) { f_add(2); } } else if (!inh_ann) { push_int(0); } n++; } } else { /* FIXME: Prototype constant. */
pike.git/src/program.c:9084:
gc_mark_multiset_as_referenced(p->inherits[e].annotations); } #if defined (PIKE_DEBUG) || defined (DO_PIKE_CLEANUP) for (e = p->num_identifiers - 1; e >= 0; e--) gc_mark_type_as_referenced (p->identifiers[e].type); #endif for (e = p->num_annotations-1; e >= 0; e--) { if (p->annotations[e])
-
gc_mark_
array
_as_referenced(p->annotations[e]);
+
gc_mark_
multiset
_as_referenced(p->annotations[e]);
} } GC_LEAVE; } void real_gc_cycle_check_program(struct program *p, int weak) { GC_CYCLE_ENTER(p, T_PROGRAM, weak) { int e; if (!(p->flags & PROGRAM_AVOID_CHECK))
pike.git/src/program.c:9113:
if(e && p->inherits[e].prog) gc_cycle_check_program(p->inherits[e].prog, 0); if (p->inherits[e].annotations) gc_cycle_check_multiset(p->inherits[e].annotations, 0); } for (e = p->num_annotations - 1; e >= 0; e--) { if (p->annotations[e])
-
gc_cycle_check_
array
(p->annotations[e], 0);
+
gc_cycle_check_
multiset
(p->annotations[e], 0);
} /* Strong ref follows. It must be last. */ if(p->parent) gc_cycle_check_program(p->parent, 0); } } GC_CYCLE_LEAVE; } static void gc_check_program(struct program *p)
pike.git/src/program.c:9288:
p->inherits[e].prog=0; } if (p->inherits[e].annotations) { free_multiset(p->inherits[e].annotations); p->inherits[e].annotations = NULL; } } for (e = 0; e < p->num_annotations; e++) {
-
do_free_
array
(p->annotations[e]);
+
do_free_
multiset
(p->annotations[e]);
p->annotations[e] = NULL; } gc_free_extra_ref(p); SET_NEXT_AND_FREE(p, free_program); #ifdef PIKE_DEBUG if (first) gc_internal_program = next; #endif }else{ next=p->next;