div10 test for interpreter

This commit is contained in:
Torsten Ruger
2018-03-24 12:21:46 +02:00
parent 30d2cd3af7
commit 2c137e8c97
4 changed files with 60 additions and 3 deletions

View File

@ -80,7 +80,7 @@ module Parfait
raise "frame must be a type, not:#{frame}" unless frame.is_a?(Type)
found = get_method( method_name )
if found
puts "redefining method #{method_name}" #TODO, this surely must get more complicated
#puts "redefining method #{method_name}" #TODO, this surely must get more complicated
raise "attempt to redifine method for different type " unless self == found.for_type
found.init(arguments , frame)
return found

View File

@ -122,7 +122,7 @@ module Risc
def execute_LoadConstant
to = @instruction.register
value = @instruction.constant
#value = value.object_id unless value.is_a?(Fixnum)
value = value.value if value.is_a?(Mom::Constant)
set_register( to , value )
true
end