concludes static message setup

This commit is contained in:
Torsten Ruger 2018-04-06 23:11:08 +03:00
parent 1ddbde1191
commit eea92399ee
2 changed files with 47 additions and 12 deletions

View File

@ -49,18 +49,20 @@ module Mom
message[:next_message] << next_message
next_message[:caller] << message
type << typed_method[:arguments_type]
named_list << next_message[:arguments]
type << typed_method[:arguments_type]
named_list[:type] << type
type << typed_method[:frame_type]
named_list << next_message[:frame]
type << typed_method[:arguments_type]
named_list[:type] << type
name << typed_method[:arguments_type]
named_list[:type] << name
name << typed_method[:name]
next_message[:name] << name
#store next.next back into space
#FIXME in a multithreaded future this should be done soon after getting
# the first_message, using lock free compare and swap. Now saving regs
next_message << next_message[:next_message]
space[:first_message] << next_message
end

View File

@ -36,20 +36,53 @@ module Risc
sl = @produced.next( 3 )
assert_reg_to_slot( sl , :r3 , :r0 , 2 )
end
def pest_store_message_in_current
def test_store_caller_in_message
sl = @produced.next( 4 )
assert_reg_to_slot( sl , :r4 , :r3 , 7 )
assert_reg_to_slot( sl , :r0 , :r3 , 7 )
end
def pest_store_current_message
def test_get_args_type #from method in r1
sl = @produced.next( 5 )
assert_reg_to_slot( sl , :r2 , :r0 , 2 )
assert_slot_to_reg( sl , :r1 , 7 , :r4 )
end
def test_get_args #from message
sl = @produced.next( 6 )
assert_slot_to_reg( sl , :r3 , 9 , :r5 )
end
def test_store_type_in_args
sl = @produced.next( 7 )
assert_reg_to_slot( sl , :r4 , :r5 , 1 )
end
def pest_load_next_message
sl = @produced.next( 3 )
assert_slot_to_reg( sl , :r2 , 2 , :r4 )
def test_get_frame_type #from method in r1
sl = @produced.next( 8 )
assert_slot_to_reg( sl , :r1 , 9 , :r4 )
end
def test_get_frame #from message
sl = @produced.next( 9 )
assert_slot_to_reg( sl , :r3 , 4 , :r5 )
end
def test_store_type_in_frame
sl = @produced.next( 10 )
assert_reg_to_slot( sl , :r4 , :r5 , 1 )
end
def test_get_name
sl = @produced.next( 11 )
assert_slot_to_reg( sl , :r1 , 2 , :r6 )
end
def test_store_name_in_message
sl = @produced.next( 12 )
assert_reg_to_slot( sl , :r6 , :r3 , 8 )
end
def test_get_next_next #reduce onto itself
sl = @produced.next( 13 )
assert_slot_to_reg( sl , :r3 , 2 , :r3 )
end
def test_store_next_next_in_space
sl = @produced.next( 14 )
assert_reg_to_slot( sl , :r3 , :r2 , 4 )
end
end
end