test compatibility layer

test from and to std/parfait objects
for list and word for now
moved some of that code to virtual, out of parfait
This commit is contained in:
Torsten Ruger
2015-05-18 10:47:29 +03:00
parent f7eb888c36
commit cfc2c474b2
9 changed files with 86 additions and 25 deletions

View File

@ -71,7 +71,7 @@ module Virtual
# attr_reader :string
def self.compile_string expression , method
value = Parfait.new_word(expression.string)
value = Virtual.new_word(expression.string)
to = Return.new(Reference , value)
Machine.instance.space.add_object value
method.add_code Set.new( to , value )

View File

@ -8,7 +8,7 @@ module Virtual
me = Compiler.compile( expession.receiver , method )
method.add_code NewMessage.new
method.add_code Set.new(NewSelf.new(me.type), me)
method.add_code Set.new(NewName.new(), Parfait.new_word(expession.name))
method.add_code Set.new(NewName.new(), Virtual.new_word(expession.name))
compiled_args = []
expession.args.each_with_index do |arg , i|
#compile in the running method, ie before passing control