From 349352faa9dbabcbbcc002847bede579a6a71975 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Fri, 16 Oct 2015 13:12:52 +0300 Subject: [PATCH] minor --- lib/phisol/compiler/assignment.rb | 2 +- lib/phisol/compiler/field_def.rb | 2 +- test/compiler/statements/test_return.rb | 2 +- test/compiler/test_all.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/phisol/compiler/assignment.rb b/lib/phisol/compiler/assignment.rb index 1664643c..d6bc9d2d 100644 --- a/lib/phisol/compiler/assignment.rb +++ b/lib/phisol/compiler/assignment.rb @@ -3,7 +3,7 @@ module Phisol def on_assignment statement reset_regs # statements reset registers, ie have all at their disposal - puts statement.inspect + #puts statement.inspect name , value = *statement name = name.to_a.first v = process(value) diff --git a/lib/phisol/compiler/field_def.rb b/lib/phisol/compiler/field_def.rb index f0667a30..da5a78dd 100644 --- a/lib/phisol/compiler/field_def.rb +++ b/lib/phisol/compiler/field_def.rb @@ -4,7 +4,7 @@ module Phisol def on_field_def statement reset_regs # field_def is a statement, no return and all regs - puts statement.inspect + #puts statement.inspect type , name , value = *statement @method.ensure_local( name, type ) unless( @method.has_arg(name)) # if there is a value assigned, process it as am assignemnt statement (kind of call on_assign) diff --git a/test/compiler/statements/test_return.rb b/test/compiler/statements/test_return.rb index 5d4fd74a..bbfc3330 100644 --- a/test/compiler/statements/test_return.rb +++ b/test/compiler/statements/test_return.rb @@ -39,7 +39,7 @@ class Object end end HERE - @expect = [[Virtual::MethodEnter,LoadConstant, GetSlot] , [Virtual::MethodReturn]] + @expect = [[Virtual::MethodEnter,LoadConstant, SetSlot,GetSlot] , [Virtual::MethodReturn]] check end diff --git a/test/compiler/test_all.rb b/test/compiler/test_all.rb index 272825eb..8e460a88 100644 --- a/test/compiler/test_all.rb +++ b/test/compiler/test_all.rb @@ -2,4 +2,4 @@ require_relative "expressions/test_all" require_relative "statements/test_all" -require_relative "fragments/test_all" +#require_relative "fragments/test_all"