pike.git/src/program.c:3660: Inside #if defined(PIKE_DEBUG)
for(d=0;d<p->inherits[e].inherit_level;d++) fprintf(stderr," ");
fprintf(stderr,"inherited program: %d\n",p->inherits[e].prog->id);
if(p->inherits[e].name)
{
for(d=0;d<p->inherits[e].inherit_level;d++) fprintf(stderr," ");
fprintf(stderr,"name : %s\n",p->inherits[e].name->str);
}
+ if (p->inherits[e].annotations) {
+ union msnode *node = low_multiset_first(p->inherits[e].annotations->msd);
+ fprintf(stderr, "annotations:\n");
+ while (node) {
+ if (TYPEOF(node->i.ind) != T_DELETED) {
+ low_push_multiset_index(node);
+ safe_pike_fprintf(stderr, " %O\n", Pike_sp-1);
+ pop_stack();
+ }
+ node = low_multiset_next(node);
+ }
+ }
+
for(d=0;d<p->inherits[e].inherit_level;d++) fprintf(stderr," ");
fprintf(stderr,"inherit_level: %d\n",p->inherits[e].inherit_level);
for(d=0;d<p->inherits[e].inherit_level;d++) fprintf(stderr," ");
fprintf(stderr,"identifier_level: %d\n",p->inherits[e].identifier_level);
for(d=0;d<p->inherits[e].inherit_level;d++) fprintf(stderr," ");
fprintf(stderr,"parent_identifier: %d\n",p->inherits[e].parent_identifier);
for(d=0;d<p->inherits[e].inherit_level;d++) fprintf(stderr," ");
pike.git/src/program.c:3718: Inside #if defined(PIKE_DEBUG)
}
fprintf(stderr,"All sorted identifiers:\n");
for(q=0;q<(int)p->num_identifier_index;q++)
{
e=p->identifier_index[q];
fprintf(stderr,"%3d (%3d):",e,q);
for(d=0;d<INHERIT_FROM_INT(p,e)->inherit_level;d++) fprintf(stderr," ");
fprintf(stderr,"%s;\n", ID_FROM_INT(p,e)->name->str);
}
+ if (p->annotations) {
+ fprintf(stderr, "All identifier annotations:\n");
+ for (q = 0; q < p->num_annotations; q++) {
+ struct multiset *l = p->annotations[q];
+ union msnode *node;
+ if (!l) continue;
+ fprintf(stderr, " Identifier #%d: %s\n",
+ q, p->identifiers[q].name->str);
+ for (node = low_multiset_first(l->msd);
+ node;
+ node = low_multiset_next(node)) {
+ low_push_multiset_index(node);
+ safe_pike_fprintf(stderr, " %O\n", Pike_sp-1);
+ pop_stack();
+ }
+ }
+ }
+
fprintf(stderr,"$$$$$ dump_program_desc for %p done\n", p);
}
#endif
static void toss_compilation_resources(void)
{
if(Pike_compiler->fake_object)
{
if( ((struct parent_info *)Pike_compiler->fake_object->storage)->parent )
{
pike.git/src/program.c:3899: Inside #if defined(PIKE_DEBUG)
struct inherit *inh = p->inherits + d;
fprintf(stderr, "%*s %4d: %5d %7d %8d %12"PRINTPTRDIFFT"d %6d %8d %10d %11"PRINTSIZET"d\n",
indent, "",
d, inh->inherit_level,
inh->prog ? inh->prog->id : -1,
inh->identifier_level, inh->storage_offset,
inh->parent_identifier, inh->parent_offset,
inh->parent ? inh->parent->program_id : -1,
inh->identifier_ref_offset);
+
+ if (inh->annotations) {
+ union msnode *node = low_multiset_first(inh->annotations->msd);
+ int i;
+ for (i = 0; node; (node = low_multiset_next(node)), i++) {
+ fprintf(stderr, "%*s annotation #%d: ", indent, "", i);
+ low_push_multiset_index(node);
+ safe_pike_fprintf(stderr, "%O\n", Pike_sp-1);
+ pop_stack();
}
-
+ }
+ }
fprintf(stderr, "\n"
"%*sIdentifier table:\n"
"%*s ####: Flags Offset Type Name\n",
indent, "", indent, "");
for (d=0; d < p->num_identifiers; d++) {
struct identifier *id = p->identifiers + d;
fprintf(stderr,
"%*s %4d: %5x %6"PRINTPTRDIFFT"d %4d \"%s\"\n"
"%*s %s:%ld\n",
indent, "",
d, id->identifier_flags, id->func.offset,
id->run_time_type, id->name->str,
indent, "",
p->num_strings?p->strings[id->filename_strno]->str:"-",
(long)id->linenumber);
-
+ if ((d < p->num_annotations) && p->annotations[d]) {
+ union msnode *node = low_multiset_first(p->annotations[d]->msd);
+ int i;
+ for (i = 0; node; (node = low_multiset_next(node)), i++) {
+ fprintf(stderr, "%*s annotation #%d: ", indent, "", i);
+ low_push_multiset_index(node);
+ safe_pike_fprintf(stderr, "%O\n", Pike_sp-1);
+ pop_stack();
}
-
+ }
+ }
fprintf(stderr, "\n"
"%*sVariable table:\n"
"%*s ####: Index\n",
indent, "", indent, "");
for (d = 0; d < p->num_variable_index; d++) {
fprintf(stderr, "%*s %4d: %5d\n",
indent, "",
d, p->variable_index[d]);
}