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

@ -63,10 +63,7 @@ module Typed
# next arg type
args_reg = use_reg(:Type , method.arguments )
list_reg = use_reg(:NamedList , arguments )
add_load_constant("#{name} load methods", method , args_reg)
args_type_index = method.get_type().variable_index(:arguments)
raise args_type_index.to_s unless args_type_index == 6
add_slot_to_reg( "#{name} get args type from method" , args_reg , args_type_index , args_reg )
add_load_constant("#{name} load arguments type", method.arguments , args_reg)
add_slot_to_reg( "#{name} get args from method" , :new_message , :arguments , list_reg )
add_reg_to_slot( "#{name} store args type in args" , args_reg , list_reg , 1 )
end