just checking which part of unimplemented i hit

This commit is contained in:
Torsten Ruger
2014-09-14 21:26:30 +03:00
parent c51dbf51e1
commit bdd4a3d6ad
5 changed files with 40 additions and 15 deletions

View File

@ -89,6 +89,8 @@ module Virtual
class Set < Instruction
def initialize to , from
@to = to
# hard to find afterwards where it came from, so ensure it doesn't happen
raise "From must be slot or constant, not symbol #{from}" if from.is_a? Symbol
@from = from
end
attr_reader :to , :from

View File

@ -7,10 +7,10 @@ module Virtual
block.codes.dup.each do |code|
next unless code.is_a? MessageSend
me = code.me
next unless ( me.type == Reference)
raise "ahm" unless ( me.type == Reference)
if( me.is_a? Constant)
if( me.is_a? BootClass )
raise "unimplemented"
raise "unimplemented #{code}"
elsif( me.is_a? ObjectConstant )
clazz = me.clazz
method = clazz.get_instance_method code.name
@ -18,8 +18,10 @@ module Virtual
call = FunctionCall.new( method )
block.replace(code , call )
else
raise "unimplemented"
raise "unimplemented #{code}"
end
else
raise "unimplemented #{code.me}"
end
end
end