From 25d7b8bd8326e7b6828740055f836b75b20c5a44 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Sun, 12 Aug 2018 14:47:05 +0300 Subject: [PATCH] chaning calling convention not to add frame/arg types these types are only needed to debug and can be gotten from the method (also in the mesage) just saving the 6 instructions for every call This was made possible through previous commits on fake_memory access --- lib/mom/instruction/message_setup.rb | 29 ++++++++++++++-------------- lib/parfait/named_list.rb | 4 ++++ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/lib/mom/instruction/message_setup.rb b/lib/mom/instruction/message_setup.rb index ecea38e8..a53c1e21 100644 --- a/lib/mom/instruction/message_setup.rb +++ b/lib/mom/instruction/message_setup.rb @@ -61,29 +61,28 @@ module Mom # get the next message from space and unlink it there # also put it into next_message of current message (and reverse) - # set name and type data in the message, from the method loaded + # set the method into the message def build_message_data( builder ) builder.build do space << Parfait.object_space next_message << space[:next_message] + + #FIXME in a multithreaded future this should be done using lock free compare and swap. + next_message_reg << next_message[:next_message] + space[:next_message] << next_message_reg + message[:next_message] << next_message next_message[:caller] << message - - type << callable[:arguments_type] - named_list << next_message[:arguments] - named_list[:type] << type - - type << callable[:frame_type] - named_list << next_message[:frame] - named_list[:type] << type - next_message[:method] << callable - #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[:next_message] << next_message + # type << callable[:arguments_type] + # named_list << next_message[:arguments] + # named_list[:type] << type + # + # type << callable[:frame_type] + # named_list << next_message[:frame] + # named_list[:type] << type + end end end diff --git a/lib/parfait/named_list.rb b/lib/parfait/named_list.rb index ad0bf936..f08e2ffb 100644 --- a/lib/parfait/named_list.rb +++ b/lib/parfait/named_list.rb @@ -25,6 +25,10 @@ module Parfait attr :type + def self.memory_size + 16 + end + def to_s str = "NamedList len= #{get_length}" str += " at #{Risc::Position.get(self)}" if Risc::Position.set?(self)