rubyx/test/slot_machine/macro/helper.rb
Torsten 8abcaa330b fix allocate in builder
which accessed unknown types.
also moved assert_allocate to support
2020-03-22 14:31:43 +02:00

24 lines
576 B
Ruby

require_relative "../helper"
module SlotMachine
module Builtin
class BootTest < MiniTest::Test
include Preloader
def get_compiler(clazz , name)
compiler = RubyX::RubyXCompiler.new(RubyX.default_test_options)
coll = compiler.ruby_to_slot( get_preload("Space.main;#{clazz}.#{name}") )
@method = coll.method_compilers.last_compiler
@method
end
def risc(at)
@risc_i = @method.to_risc.risc_instructions unless @risc_i
return @risc_i if at == 0
@risc_i.next( at )
end
end
end
end