defining constants in melon to match classes in vm
This commit is contained in:
parent
9c83423e50
commit
10d75e136f
@ -6,17 +6,12 @@ module Melon
|
|||||||
module MelonTests
|
module MelonTests
|
||||||
include CompilerHelper
|
include CompilerHelper
|
||||||
include Register::InterpreterHelpers
|
include Register::InterpreterHelpers
|
||||||
|
subs = ObjectSpace.each_object(Class).select { |klass| klass < Register::Instruction }
|
||||||
def setup
|
subs.each do |clazz|
|
||||||
Register.machine.boot
|
name = clazz.to_s
|
||||||
end
|
next if name.include?("Arm")
|
||||||
|
scoped = name.split("::").last
|
||||||
def check_nil
|
module_eval "#{scoped} = #{name}"
|
||||||
RubyCompiler.compile @string_input
|
|
||||||
Register::Collector.collect_space
|
|
||||||
@interpreter = Register::Interpreter.new
|
|
||||||
@interpreter.start Register.machine.init
|
|
||||||
nil
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user