diff options
author | Himbeer <himbeer@disroot.org> | 2024-08-30 18:58:41 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-08-30 18:58:41 +0200 |
commit | 56ccd1992d5a0e420200b36e394f9ee39458e9eb (patch) | |
tree | 3270ecf3ace1401d3bd2d51c944efb3d67412bfe /decl.go | |
parent | fa461715a9a4fbca6bd012c0f2b8e35631ec12e8 (diff) |
Drop the incrementing name concept for variables
Since the stack can be written to any number of times it is not
necessary to abide by SSA rules. This significantly simplifies the IL
structure which can help with debugging IL generation.
Diffstat (limited to 'decl.go')
-rw-r--r-- | decl.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/decl.go b/decl.go deleted file mode 100644 index 32adbae..0000000 --- a/decl.go +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-FileCopyrightText: 2024 Himbeer <himbeer@disroot.org> -// -// SPDX-License-Identifier: GPL-3.0-or-later - -package main - -import ( - "fmt" -) - -type mutInfo struct { - id string - nameIndex int -} - -func (m mutInfo) name() string { - return fmt.Sprintf("%%%s%d", m.id, m.nameIndex-1) -} - -func (m *mutInfo) nextName() string { - defer func() { m.nameIndex++ }() - return fmt.Sprintf("%%%s%d", m.id, m.nameIndex) -} - -var locals = map[string]map[string]mutInfo{} |