return the linker from mom_compiler

linker holds assemblers
assemblers come from method compilation
and so the layers come into focus
This commit is contained in:
Torsten Ruger
2018-07-01 21:51:48 +03:00
parent 5f2a256608
commit 22408b86c6
8 changed files with 35 additions and 30 deletions

View File

@ -5,11 +5,16 @@ module RubyX
include ScopeHelper
include RubyXHelper
def test_to_risc
def setup
super
code = "class Space ; def main(arg);return arg;end; end"
risc = ruby_to_risc(code, :interpreter)
assert_equal Array , risc.class
@linker = ruby_to_risc(code, :interpreter)
end
def test_to_risc
assert_equal Risc::Linker , @linker.class
end
def test_method
assert_equal :main , @linker.assemblers.last.method.name
end
end
end