Compare commits

...

3 commits
master ... gc2

Author SHA1 Message Date
9ce7bf5b9d WIP move old ISBPL.java to ISBPL_old.java (rewrite in progress) 2022-08-02 14:39:07 +02:00
5e74e8baf7 gitignore 2022-08-02 13:13:41 +02:00
93b88a01eb things about gc 2022-08-02 13:10:58 +02:00
2 changed files with 9 additions and 5 deletions

3
.gitignore vendored
View file

@ -3,3 +3,6 @@ test*.isbpl
*.jar *.jar
*.bf.isbpl *.bf.isbpl
rust-interpreter rust-interpreter
.idea
*.iml
out

View file

@ -2485,7 +2485,7 @@ class ISBPLFrame {
public ISBPL context; public ISBPL context;
public ISBPLFrame parent; public ISBPLFrame parent;
public HashMap<String, ISBPLCallable> map = new HashMap<>(); public HashMap<String, ISBPLCallable> map = new HashMap<>();
public HashMap<Object, ISBPLObject> variables = new HashMap<>(); public HashMap<String, ISBPLObject> variables = new HashMap<>();
public String name; public String name;
public ISBPLFrame(String name, ISBPL context) { public ISBPLFrame(String name, ISBPL context) {
@ -2518,10 +2518,9 @@ class ISBPLFrame {
} }
public void define(String name, ISBPLObject value) { public void define(String name, ISBPLObject value) {
Object var = new Object(); variables.put(name, value);
variables.put(var, value); add(name, (stack) -> stack.push(variables.get(name)));
add(name, (stack) -> stack.push(variables.get(var))); add("=" + name, (stack) -> variables.put(name, stack.pop()));
add("=" + name, (stack) -> variables.put(var, stack.pop()));
} }
public HashMap<String, ISBPLCallable> all() { public HashMap<String, ISBPLCallable> all() {
@ -2530,3 +2529,5 @@ class ISBPLFrame {
return r; return r;
} }
} }
public interface