back to method_compiler

it is what it is
This commit is contained in:
Torsten Ruger
2018-06-30 23:26:28 +03:00
parent 91a99b1239
commit 05669065ca
10 changed files with 12 additions and 12 deletions

View File

@ -236,7 +236,7 @@ module Risc
end
end
# A CompilerBuilder adds the generated code to the RiscCompiler.
# A CompilerBuilder adds the generated code to the MethodCompiler.
#
class CompilerBuilder < Builder
# add code straight to the compiler

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 )
RiscCompiler.compiler_for_class(clazz_name , method_name , args, frame )
MethodCompiler.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 = RiscCompiler.compiler_for_class(:Object,:__init__ ,
compiler = MethodCompiler.compiler_for_class(:Object,:__init__ ,
Parfait::NamedList.type_for({}) , Parfait::NamedList.type_for({}))
builder = compiler.compiler_builder(compiler.method)
builder.build do

View File

@ -1,10 +1,10 @@
module Risc
# RiscCompiler (old name) is used to generate risc instructions for methods
# MethodCompiler (old name) is used to generate risc instructions for methods
# and to instantiate the methods correctly. Most of the init is typed layer stuff,
# but there is some logic too.
class RiscCompiler
class MethodCompiler
def initialize( method )
@regs = []