From b281c24a3937bb2c11d62e39ea84996ce26ef501 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Wed, 21 May 2014 19:27:27 +0300 Subject: [PATCH] move towards locals (not hardcoding registers) --- lib/core/kernel.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/kernel.rb b/lib/core/kernel.rb index 359f0555..601754a3 100644 --- a/lib/core/kernel.rb +++ b/lib/core/kernel.rb @@ -82,10 +82,10 @@ module Core fibo_function = Vm::Function.new(:fibo , [Vm::Integer , Vm::Integer] , Vm::Integer ) result = fibo_function.args[0] int = fibo_function.args[1] - count = Vm::Integer.new(2) + count = fibo_function.new_local loop_block = Vm::Block.new("loop", nil) - f1 = Vm::Integer.new(3) - f2 = Vm::Integer.new(4) + f1 = fibo_function.new_local + f2 = fibo_function.new_local b = fibo_function.body.scope binding b.a int == 1