public Scope PushEntry(EntryKind loc, String name, ExprType type) {
Scope scope = new Scope(this);
switch (loc) {
case EntryKind.STACK:
scope.esp_pos -= Utils.RoundUp(type.SizeOf, 4);
scope.locals.Add(new Utils.StoreEntry(name, type, scope.esp_pos));
break;
case EntryKind.GLOBAL:
scope.globals.Add(new Utils.StoreEntry(name, type, 0));
break;
case EntryKind.TYPEDEF:
scope.typedefs.Add(new Utils.StoreEntry(name, type, 0));
break;
default:
return null;
}
return scope;
}