2014-09-09 17:03:13 +02:00
|
|
|
module Virtual
|
2014-08-23 22:37:33 +02:00
|
|
|
# This implements instance variable get (not the opposite of Set, such a thing does not exists, their slots)
|
|
|
|
|
|
|
|
# Ivar get needs to acces the layout, find the index of the name, and shuffle the data to return register
|
|
|
|
# In short it's so complicated we implement it in ruby and stick the implementation here
|
2014-08-23 09:59:35 +02:00
|
|
|
class GetImplementation
|
|
|
|
def run block
|
|
|
|
block.codes.dup.each do |code|
|
2014-08-23 20:49:09 +02:00
|
|
|
next unless code.is_a? Virtual::InstanceGet
|
2014-08-23 09:59:35 +02:00
|
|
|
raise "Start coding"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2014-10-03 13:52:47 +02:00
|
|
|
Virtual::BootSpace.space.add_pass_after "Virtual::GetImplementation", "Virtual::SendImplementation"
|
2014-08-23 09:59:35 +02:00
|
|
|
end
|