rename typed_method to callable_method
seems to make the essence clearer also extracted base class
This commit is contained in:
@ -35,12 +35,12 @@ module Mom
|
||||
# but also used directly in __init
|
||||
def build_with(builder)
|
||||
case from = method_source
|
||||
when Parfait::TypedMethod
|
||||
builder.build { typed_method << from }
|
||||
when Parfait::CallableMethod
|
||||
builder.build { callable_method << from }
|
||||
when Parfait::CacheEntry
|
||||
builder.build do
|
||||
cache_entry << from
|
||||
typed_method << cache_entry[:cached_method]
|
||||
callable_method << cache_entry[:cached_method]
|
||||
end
|
||||
else
|
||||
raise "unknown source #{method_source}"
|
||||
@ -64,15 +64,15 @@ module Mom
|
||||
message[:next_message] << next_message
|
||||
next_message[:caller] << message
|
||||
|
||||
type << typed_method[:arguments_type]
|
||||
type << callable_method[:arguments_type]
|
||||
named_list << next_message[:arguments]
|
||||
named_list[:type] << type
|
||||
|
||||
type << typed_method[:frame_type]
|
||||
type << callable_method[:frame_type]
|
||||
named_list << next_message[:frame]
|
||||
named_list[:type] << type
|
||||
|
||||
name << typed_method[:name]
|
||||
name << callable_method[:name]
|
||||
next_message[:name] << name
|
||||
|
||||
#store next.next back into space
|
||||
|
@ -41,28 +41,28 @@ module Mom
|
||||
cache_entry << cache_entry_
|
||||
|
||||
type << cache_entry[:cached_type]
|
||||
typed_method << type[:methods]
|
||||
callable_method << type[:methods]
|
||||
|
||||
add_code while_start_label
|
||||
|
||||
space << Parfait.object_space
|
||||
space << space[:nil_object]
|
||||
space - typed_method
|
||||
space - callable_method
|
||||
if_zero exit_label
|
||||
|
||||
name << typed_method[:name]
|
||||
name << callable_method[:name]
|
||||
name - word
|
||||
|
||||
if_zero ok_label
|
||||
|
||||
typed_method << typed_method[:next_method]
|
||||
callable_method << callable_method[:next]
|
||||
branch while_start_label
|
||||
|
||||
add_code exit_label
|
||||
Risc::Builtin::Object.emit_syscall( builder , :exit )
|
||||
|
||||
add_code ok_label
|
||||
cache_entry[:cached_method] << typed_method
|
||||
cache_entry[:cached_method] << callable_method
|
||||
end
|
||||
return builder.built
|
||||
end
|
||||
|
Reference in New Issue
Block a user