random tries

This commit is contained in:
Torsten Ruger
2018-03-15 10:46:17 +05:30
parent 0a9997f549
commit 163cad456f
7 changed files with 16 additions and 21 deletions

View File

@ -12,7 +12,9 @@ module Vool
else
type = :frame
end
@value.slot_class.new(Mom::SlotDefinition.new(:message , [type , @name]) , @value.to_mom(method))
statements = @value.to_mom(method)
statements << @value.slot_class.new([:message , type , @name] , @value.slot_definition)
return statements
end
end

View File

@ -15,8 +15,10 @@ module Vool
# - store the given return value, this is a SlotMove / SlotConstant
# - activate return sequence (reinstantiate old message and jump to return address)
def to_mom( method )
move = @return_value.slot_class.new( [:message , :return_value] , @return_value.to_mom(method))
Mom::Statements.new [move , Mom::ReturnSequence.new]
statements = @return_value.to_mom(method)
statements << @return_value.slot_class.new( [:message , :return_value] , @return_value.slot_definition )
statements << Mom::ReturnSequence.new
return statements
end
end

View File

@ -66,10 +66,6 @@ module Vool
Mom::Statements.new( cache_check(in_method) + call_cached_method(in_method) )
end
def flatten
raise "flat"
end
# check that current type is the cached type
# if not, change and find method for the type (simple_call to resolve_method)
# conceptually easy in ruby, but we have to compile that "easy" ruby