Inline arguments into message

thus removing indirection for access
does affect rather much, several commits
This commit is contained in:
2019-08-22 17:54:17 +03:00
parent c13d4fb017
commit 0a1b05b2ee
12 changed files with 36 additions and 28 deletions

View File

@ -15,7 +15,7 @@ module Parfait
def test_message_name_nil
last = @type.names.last
assert_equal :arguments , last , @type.names.inspect
assert_equal :arg6 , last , @type.names.inspect
assert_nil @mess.method
end
def test_message_next_set

View File

@ -7,15 +7,20 @@ module Parfait
super
@mess = @space.get_next_for(:Message)
end
def test_args_start
assert_equal 8 , Message.args_start_at
end
def test_length
assert_equal 9 , @mess.get_type.instance_length , @mess.get_type.inspect
assert_equal 15 , @mess.get_type.instance_length , @mess.get_type.inspect
end
def test_attribute_set
@mess.set_receiver( 55 ) # 55 is not parfait, hance not actually allowed
assert_equal 55 , @mess.receiver
end
def test_indexed
assert_equal 8 , @mess.get_type.variable_index(:arguments)
assert_equal 8 , @mess.get_type.variable_index(:arguments_given)
assert_equal 9 , @mess.get_type.variable_index(:arg1)
assert_equal 13 , @mess.get_type.variable_index(:arg5)
end
def test_next_message
assert_equal Message , @mess.next_message.class
@ -24,7 +29,7 @@ module Parfait
assert_equal NamedList , @mess.frame.class
end
def test_arguments
assert_equal NamedList , @mess.arguments.class
assert_equal Integer , @mess.arguments_given.class
end
def test_return_address
assert_nil @mess.return_address

View File

@ -5,7 +5,7 @@ module Parfait
def classes
[:BinaryCode,:Block,:CacheEntry,:Callable,:CallableMethod,:Class,
:DataObject,:Data4,:Data8,:Data16,:Dictionary,:Factory, :Integer,:FalseClass,
:DataObject,:Data4,:Data8,:Data16,:Data32,:Dictionary,:Factory, :Integer,:FalseClass,
:List,:Message, :MetaClass, :NamedList,:NilClass,:Object,:ReturnAddress,
:Space,:TrueClass,:Type,:VoolMethod,:Word]
end