mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 12:46:31 +00:00
locals stuff
This commit is contained in:
parent
fa81c17c25
commit
632e8385f3
@ -23,6 +23,7 @@ class LocalsFnRoot implements Locals {
|
|||||||
allocSym(ident: string) {
|
allocSym(ident: string) {
|
||||||
this.symLocalMap[ident] = this.localIdCounter;
|
this.symLocalMap[ident] = this.localIdCounter;
|
||||||
this.localIdCounter++;
|
this.localIdCounter++;
|
||||||
|
this.reserveId(this.localIdCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
symId(ident: string): number {
|
symId(ident: string): number {
|
||||||
@ -50,6 +51,7 @@ class LocalLeaf implements Locals {
|
|||||||
allocSym(ident: string) {
|
allocSym(ident: string) {
|
||||||
this.symLocalMap[ident] = this.localIdCounter;
|
this.symLocalMap[ident] = this.localIdCounter;
|
||||||
this.localIdCounter++;
|
this.localIdCounter++;
|
||||||
|
this.reserveId(this.localIdCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
symId(ident: string): number {
|
symId(ident: string): number {
|
||||||
@ -176,4 +178,3 @@ export class Lowerer {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user