load arg type directly into the object

Was going through the method, but the type is just as constant and
saves 2 instructions 4 every call
This commit is contained in:
Torsten Ruger
2017-01-04 21:34:51 +02:00
parent 78f7420ef7
commit 9d36d72ee5
2 changed files with 2 additions and 4 deletions

View File

@ -17,6 +17,7 @@ module Register
message_ind = Register.resolve_to_index( :space , :first_message )
compiler.add_slot_to_reg( "__init__ load 1st message" , space_reg , message_ind , :message)
compiler.add_reg_to_slot( "__init__ store Space in message", space_reg , :message , :receiver)
#fixme: should add arg type here, as done in call_site (which this sort of is)
exit_label = Register.label("_exit_label for __init__" , "#{compiler.type.object_class.name}.#{compiler.method.name}" )
ret_tmp = compiler.use_reg(:Label)
compiler.add_load_constant("__init__ load return", exit_label , ret_tmp)