summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/src/tonkadur/wyrd/v1/compiler/fate/v1/ComputationCompiler.java8
-rw-r--r--src/core/src/tonkadur/wyrd/v1/compiler/util/registers/RegisterContext.java4
-rw-r--r--src/core/src/tonkadur/wyrd/v1/compiler/util/registers/RegisterManager.java5
3 files changed, 12 insertions, 5 deletions
diff --git a/src/core/src/tonkadur/wyrd/v1/compiler/fate/v1/ComputationCompiler.java b/src/core/src/tonkadur/wyrd/v1/compiler/fate/v1/ComputationCompiler.java
index 948542c..145a947 100644
--- a/src/core/src/tonkadur/wyrd/v1/compiler/fate/v1/ComputationCompiler.java
+++ b/src/core/src/tonkadur/wyrd/v1/compiler/fate/v1/ComputationCompiler.java
@@ -959,11 +959,9 @@ implements tonkadur.fate.v1.lang.meta.ComputationVisitor
name = a.get_car().get_name();
r =
- /* These are free by the unbind below */
- compiler.registers().reserve
+ reserve
(
- TypeCompiler.compile(compiler, a.get_car().get_type()),
- init_instructions
+ TypeCompiler.compile(compiler, a.get_car().get_type())
);
compiler.registers().bind(name, r);
@@ -985,7 +983,7 @@ implements tonkadur.fate.v1.lang.meta.ComputationVisitor
for (final String name: names)
{
- compiler.registers().unbind(name, init_instructions);
+ compiler.registers().unbind_but_do_not_free(name);
}
}
diff --git a/src/core/src/tonkadur/wyrd/v1/compiler/util/registers/RegisterContext.java b/src/core/src/tonkadur/wyrd/v1/compiler/util/registers/RegisterContext.java
index e83707b..b8440ae 100644
--- a/src/core/src/tonkadur/wyrd/v1/compiler/util/registers/RegisterContext.java
+++ b/src/core/src/tonkadur/wyrd/v1/compiler/util/registers/RegisterContext.java
@@ -151,7 +151,11 @@ class RegisterContext
public void unbind (final String name, final List<Instruction> instr_holder)
{
release(aliased_registers.get(name), instr_holder);
+ unbind_but_do_not_free(name);
+ }
+ public void unbind_but_do_not_free(final String name)
+ {
aliased_registers.remove(name);
if (!hierarchical_aliases.isEmpty())
diff --git a/src/core/src/tonkadur/wyrd/v1/compiler/util/registers/RegisterManager.java b/src/core/src/tonkadur/wyrd/v1/compiler/util/registers/RegisterManager.java
index 2d12e0a..b241386 100644
--- a/src/core/src/tonkadur/wyrd/v1/compiler/util/registers/RegisterManager.java
+++ b/src/core/src/tonkadur/wyrd/v1/compiler/util/registers/RegisterManager.java
@@ -162,6 +162,11 @@ public class RegisterManager
context.peekFirst().unbind(name, instr_holder);
}
+ public void unbind_but_do_not_free (final String name)
+ {
+ context.peekFirst().unbind_but_do_not_free(name);
+ }
+
public Register get_context_register (final String name)
{
final Register result;