rename a bit

This commit is contained in:
Torsten Ruger
2018-06-29 13:03:19 +03:00
parent d50893bb0f
commit 3dffebed3f
5 changed files with 16 additions and 26 deletions

View File

@ -3,10 +3,10 @@ module Risc
module Builtin
module CompileHelper
def compiler_for( type , method_name , arguments , locals = {})
def compiler_for( clazz_name , method_name , arguments , locals = {})
frame = Parfait::NamedList.type_for( locals )
args = Parfait::NamedList.type_for( arguments )
Risc::MethodCompiler.create_method(type , method_name , args, frame )
Risc::MethodCompiler.compiler_for_class(clazz_name , method_name , args, frame )
end
end

View File

@ -41,11 +41,12 @@ module Risc
emit_syscall( compiler.builder(true, compiler.method) , :exit )
return compiler.method
end
# this is the really really first place the machine starts (apart from the jump here)
# 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 = Risc::MethodCompiler.create_method(:Object,:__init__ ,
compiler = MethodCompiler.compiler_for_class(:Object,:__init__ ,
Parfait::NamedList.type_for({}) , Parfait::NamedList.type_for({}))
builder = compiler.builder(true, compiler.method)
builder.build do