remove dead code

This commit is contained in:
Torsten Ruger 2018-03-18 10:50:37 +05:30
parent c5ec532616
commit be79388cc5
3 changed files with 3 additions and 10 deletions

View File

@ -7,10 +7,6 @@ module Mom
def to_risc(m)
Risc::Label.new(self.class.name, self.class.name + "_todo")
end
# implement flatten as noop to avoid condition
def flatten( options = {} )
return self
end
end
# A label with a name

View File

@ -21,8 +21,9 @@ end
module MomCompile
include CompilerHelper
def compile_first_method input
def compile_first_method( input )
# 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 = statements.normalize
res = statements.create_objects
@ -33,10 +34,6 @@ module MomCompile
res
end
def compile_first_method_flat(input)
compile_first_method(input).flatten
end
def check_array( should , is )
index = 0
test = is

View File

@ -7,7 +7,7 @@ module Vool
def setup
Risc.machine.boot
@ins = compile_first_method_flat( "a = 5; a.mod4")
@ins = compile_first_method( "a = 5; a.mod4")
end
def test_check_type
assert_equal NotSameCheck , @ins.next.class , @ins