refactor risc_collection
move code that operates on compiler to the compiler class this leaves the collection thin, very thin indeed
This commit is contained in:
@ -30,5 +30,14 @@ module Risc
|
||||
@block_compilers << compiler
|
||||
end
|
||||
|
||||
# translate this method, which means the method itself and all blocks inside it
|
||||
# returns the array (of assemblers) that you pass in as collection
|
||||
def translate_method( translator , collection)
|
||||
collection << translate_cpu( translator )
|
||||
@block_compilers.each do |block_compiler|
|
||||
collection << block_compiler.translate_cpu(translator)
|
||||
end
|
||||
collection
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user