rename method_compiler

in line with other compiler XX_Compiler being the compiler for that layer
remove type from compiler as it is in method available
This commit is contained in:
Torsten Ruger
2018-06-29 14:48:52 +03:00
parent 114dc95b60
commit 6bd01fd55f
11 changed files with 14 additions and 17 deletions

View File

@ -6,7 +6,7 @@ module Risc
def compiler_for( clazz_name , method_name , arguments , locals = {})
frame = Parfait::NamedList.type_for( locals )
args = Parfait::NamedList.type_for( arguments )
Risc::MethodCompiler.compiler_for_class(clazz_name , method_name , args, frame )
Risc::RiscCompiler.compiler_for_class(clazz_name , method_name , args, frame )
end
end

View File

@ -46,7 +46,7 @@ module Risc
# it isn't really a function, ie it is jumped to (not called), exits and may not return
# so it is responsible for initial setup
def __init__ context
compiler = MethodCompiler.compiler_for_class(:Object,:__init__ ,
compiler = RiscCompiler.compiler_for_class(:Object,:__init__ ,
Parfait::NamedList.type_for({}) , Parfait::NamedList.type_for({}))
builder = compiler.compiler_builder(compiler.method)
builder.build do
@ -63,7 +63,7 @@ module Risc
message[:receiver] << space
end
exit_label = Risc.label(compiler.method , "#{compiler.type.object_class.name}.#{compiler.method.name}" )
exit_label = Risc.label(compiler.method , "#{compiler.method.for_type.object_class.name}.#{compiler.method.name}" )
ret_tmp = compiler.use_reg(:Label)
builder.build do
add_load_constant("__init__ load return", exit_label , ret_tmp)