add seperate builders

remove if with polymorphism for different builders
(easier to understand by naming)
This commit is contained in:
Torsten Ruger
2018-06-29 13:27:57 +03:00
parent 3dffebed3f
commit 86b1edb40c
8 changed files with 73 additions and 37 deletions

View File

@ -27,7 +27,7 @@ module Mom
# Move method name, frame and arguemnt types from the method to the next_message
# Get the message from Space and link it.
def to_risc(compiler)
builder = compiler.builder(false, self)
builder = compiler.code_builder(self)
build_with(builder)
end

View File

@ -35,7 +35,7 @@ module Mom
def to_risc( compiler )
name_ = @name
cache_entry_ = @cache_entry
builder = compiler.builder(false, self)
builder = compiler.code_builder(self)
builder.build do
word << name_
cache_entry << cache_entry_