locals stuff

This commit is contained in:
SimonFJ20 2024-12-10 10:57:59 +01:00
parent fa81c17c25
commit 632e8385f3

View File

@ -23,6 +23,7 @@ class LocalsFnRoot implements Locals {
allocSym(ident: string) {
this.symLocalMap[ident] = this.localIdCounter;
this.localIdCounter++;
this.reserveId(this.localIdCounter);
}
symId(ident: string): number {
@ -50,6 +51,7 @@ class LocalLeaf implements Locals {
allocSym(ident: string) {
this.symLocalMap[ident] = this.localIdCounter;
this.localIdCounter++;
this.reserveId(this.localIdCounter);
}
symId(ident: string): number {
@ -176,4 +178,3 @@ export class Lowerer {
);
}
}