remove dead code
This commit is contained in:
parent
c5ec532616
commit
be79388cc5
@ -7,10 +7,6 @@ module Mom
|
|||||||
def to_risc(m)
|
def to_risc(m)
|
||||||
Risc::Label.new(self.class.name, self.class.name + "_todo")
|
Risc::Label.new(self.class.name, self.class.name + "_todo")
|
||||||
end
|
end
|
||||||
# implement flatten as noop to avoid condition
|
|
||||||
def flatten( options = {} )
|
|
||||||
return self
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# A label with a name
|
# A label with a name
|
||||||
|
@ -21,8 +21,9 @@ end
|
|||||||
module MomCompile
|
module MomCompile
|
||||||
include CompilerHelper
|
include CompilerHelper
|
||||||
|
|
||||||
def compile_first_method input
|
def compile_first_method( input )
|
||||||
# works a lot like Vool.ruby_to_vool
|
# works a lot like Vool.ruby_to_vool
|
||||||
|
# but here we return the intermediate mom instructions that are otherwise not available
|
||||||
statements = Vool::RubyCompiler.compile as_test_main( input )
|
statements = Vool::RubyCompiler.compile as_test_main( input )
|
||||||
statements = statements.normalize
|
statements = statements.normalize
|
||||||
res = statements.create_objects
|
res = statements.create_objects
|
||||||
@ -33,10 +34,6 @@ module MomCompile
|
|||||||
res
|
res
|
||||||
end
|
end
|
||||||
|
|
||||||
def compile_first_method_flat(input)
|
|
||||||
compile_first_method(input).flatten
|
|
||||||
end
|
|
||||||
|
|
||||||
def check_array( should , is )
|
def check_array( should , is )
|
||||||
index = 0
|
index = 0
|
||||||
test = is
|
test = is
|
||||||
|
@ -7,7 +7,7 @@ module Vool
|
|||||||
|
|
||||||
def setup
|
def setup
|
||||||
Risc.machine.boot
|
Risc.machine.boot
|
||||||
@ins = compile_first_method_flat( "a = 5; a.mod4")
|
@ins = compile_first_method( "a = 5; a.mod4")
|
||||||
end
|
end
|
||||||
def test_check_type
|
def test_check_type
|
||||||
assert_equal NotSameCheck , @ins.next.class , @ins
|
assert_equal NotSameCheck , @ins.next.class , @ins
|
||||||
|
Loading…
Reference in New Issue
Block a user