diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-04-20 23:43:30 -0600 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-04-20 23:43:30 -0600 |
commit | 04fd097fb51346f655c7bdc0c88b85e29359ef1c (patch) | |
tree | 246fb653f11e61306cb66249f4ecce451f7b8953 /st | |
parent | 35eae1492c94e353ba8a1a52bfbae9313808b357 (diff) |
Non-function live-interval computation algorithm
Diffstat (limited to 'st')
-rw-r--r-- | st/AbstractInstance.java | 6 | ||||
-rw-r--r-- | st/SymbolTable.java | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/st/AbstractInstance.java b/st/AbstractInstance.java index ddf7156..4e4287d 100644 --- a/st/AbstractInstance.java +++ b/st/AbstractInstance.java @@ -14,16 +14,16 @@ public abstract class AbstractInstance { this.scope = new ArrayList<>(); } - public String toString() { + @Override public String toString() { return this.name; } - public boolean equals(AbstractInstance other) { + @Override public boolean equals(AbstractInstance other) { return this.name == other.getName() && this.type == this.type; } - public int hashCode() { + @Override public int hashCode() { return this.name.hashCode(); } diff --git a/st/SymbolTable.java b/st/SymbolTable.java index de45a58..e3dd398 100644 --- a/st/SymbolTable.java +++ b/st/SymbolTable.java @@ -16,7 +16,7 @@ public class SymbolTable { this.active = new HashMap<>(); } - public String toString() { + @Override public String toString() { StringBuilder mapAsString = new StringBuilder("{"); for (String key : this.symt.keySet()) { mapAsString.append(key + ":" + this.symt.get(key).getType() + ", "); |