SlotLanguageExploration
This commit is contained in:
22
lib/slot_language/code/resolve_method.slot
Normal file
22
lib/slot_language/code/resolve_method.slot
Normal file
@ -0,0 +1,22 @@
|
||||
# passed in? name and cache_entry
|
||||
word! << name_
|
||||
cache_entry! << cache_entry_
|
||||
# local var assignment
|
||||
callable_method << cache_entry.cached_type.methods
|
||||
|
||||
while_start_label
|
||||
|
||||
goto(exit_label) if( nil == callable_method)
|
||||
|
||||
goto(ok_label) if(callable_method.name == word)
|
||||
|
||||
callable_method = callable_method.next_callable
|
||||
|
||||
goto(while_start_label)
|
||||
|
||||
exit_label
|
||||
|
||||
MethodMissing.new(compiler.source_name , word.symbol).to_risc(compiler)
|
||||
|
||||
ok_label
|
||||
cache_entry.cached_method == callable_method
|
Reference in New Issue
Block a user