spaces(indent);
printf("VAR ");
print_type(&v->type);
- printf(" %s", (char *) v->a_name);
+ printf(" %s (at %p)", (char *) v->a_name, (void *) v);
if (v->initializer) {
printf(" :=\n");
slang_print_tree(v->initializer, indent + 3);
print_binary(const slang_operation *op, const char *oper, int indent)
{
assert(op->num_children == 2);
+#if 0
printf("binary at %p locals=%p outer=%p\n",
(void *) op,
(void *) op->locals,
(void *) op->locals->outer_scope);
+#endif
slang_print_tree(&op->children[0], indent + 3);
spaces(indent);
printf("%s at %p locals=%p outer=%p\n",
case SLANG_OPER_BLOCK_NEW_SCOPE:
spaces(indent);
- printf("{{ // new scope locals=%p: ", (void*)op->locals);
+ printf("{{ // new scope locals=%p outer=%p: ",
+ (void *) op->locals,
+ (void *) op->locals->outer_scope);
{
int i;
for (i = 0; i < op->locals->num_variables; i++) {
return;
#endif
- printf("FUNCTION %s (\n",
- (char *) f->header.a_name);
+ printf("FUNCTION %s ( scope=%p\n",
+ (char *) f->header.a_name, (void *) f->parameters);
for (i = 0; i < f->param_count; i++) {
print_variable(f->parameters->variables[i], 3);