diff --git a/lib/phisol/compiler/call_site.rb b/lib/phisol/compiler/call_site.rb index d1056770..399107b3 100644 --- a/lib/phisol/compiler/call_site.rb +++ b/lib/phisol/compiler/call_site.rb @@ -8,6 +8,7 @@ module Phisol if receiver me = process( receiver.to_a.first ) else + raise "revisit" if @method.class.name == :Integer me = Virtual::Self.new :int else diff --git a/lib/phisol/compiler/field_def.rb b/lib/phisol/compiler/field_def.rb index 6fa5aa40..e8d56c99 100644 --- a/lib/phisol/compiler/field_def.rb +++ b/lib/phisol/compiler/field_def.rb @@ -10,8 +10,8 @@ module Phisol if value value = process( value ) end - - Virtual::Return.new( type , value ) + # field_def is a statement, no return + return nil end end end diff --git a/lib/register/instructions/get_slot.rb b/lib/register/instructions/get_slot.rb index a1d072ca..1f7833b7 100644 --- a/lib/register/instructions/get_slot.rb +++ b/lib/register/instructions/get_slot.rb @@ -16,7 +16,7 @@ module Register # If you had a c array and index offset # the instruction would do register = array[index] - # The arguments are in the order that makes sense for the Instruciton name + # The arguments are in the order that makes sense for the Instruction name # So GetSlot means the slot (array and index) moves to the register (last argument) def initialize source , array , index , register super(source) diff --git a/lib/virtual/parfait_adapter.rb b/lib/virtual/parfait_adapter.rb index 6df1cabf..18da98a5 100644 --- a/lib/virtual/parfait_adapter.rb +++ b/lib/virtual/parfait_adapter.rb @@ -96,6 +96,7 @@ module Parfait def internal_object_set(index , value) raise "failed init for #{self.class}" unless @memory @memory[index] = value + value end def internal_object_grow(length) old_length = internal_object_length() diff --git a/test/elf/test_all.rb b/test/elf/test_all.rb new file mode 100644 index 00000000..fe02d821 --- /dev/null +++ b/test/elf/test_all.rb @@ -0,0 +1 @@ +require_relative "test_hello" diff --git a/test/compiler/test_hello.rb b/test/elf/test_hello.rb similarity index 100% rename from test/compiler/test_hello.rb rename to test/elf/test_hello.rb diff --git a/test/test_all.rb b/test/test_all.rb index e6bc93fe..603c1acb 100644 --- a/test/test_all.rb +++ b/test/test_all.rb @@ -1,5 +1,7 @@ require_relative "compiler/test_all" +require_relative "elf/test_all" + require_relative "parfait/test_all" require_relative "fragments/test_all"