v->scope = InScope;
v->in_scope = c->in_scope;
c->in_scope = v;
+ ## variable init
return v;
}
values. The local frame doesn't get values until the interpreted phase
is started, so there is no need to allocate until the size is known.
+We initialize the `frame_pos` to an impossible value, so that we can
+tell if it was set or not later.
+
###### variable fields
- short frame_pos;
- short global;
+ short frame_pos;
+ short global;
+
+###### variable init
+ v->frame_pos = -1;
###### parse context
if (e->to_free) {
struct variable *v;
do_indent(indent, "/* FREE");
- for (v = e->to_free; v; v = v->next_free)
- printf(" %.*s(%c%d+%d)", v->name->name.len, v->name->name.txt,
- v->global ? 'G':'L',
- v->frame_pos, v->type ? v->type->size:0);
+ for (v = e->to_free; v; v = v->next_free) {
+ printf(" %.*s", v->name->name.len, v->name->name.txt);
+ if (v->frame_pos >= 0)
+ printf("(%d+%d)", v->frame_pos,
+ v->type ? v->type->size:0);
+ }
printf(" */\n");
}
}