1) processing a function for decoration int x float y a. Build symtab to use for two reasons symtab = new_symtab() slot = 0; insert(symtab, "int", "x", slot++) insert(symtab, "float", "y", slot++) reason 1: convert identifier nodes into var nodes an identifier looks like "x" a var node looks like { "var", slotnum } (type, slot, table) = id_info("x") e.g. type = "int", slot = 0, table = "local" varnode = make_varnode(slot, table) replace identifier node with varnode free identifier node reason 2: create the template for the stack frame num_vars = slot; template = malloc( num_vars * sizeof(struct var_slot) ) (each var_slot has a type and value ) foreach element in the hastable, (type, slot) = each(ht) template[slot] = type attach template to the function where the varlist had been record slot in the function discard hashtab NOW when you execute the function: clone template (using the template and the size) (voila : a stackframe) struct node *new_var_node(slot){ Blocks int i; f() { int i; for(){ int i } }