2015-12-01 11:55:33 +02:00
|
|
|
require_relative '../helper'
|
2017-01-19 09:02:29 +02:00
|
|
|
require "risc/interpreter"
|
2015-12-01 11:55:33 +02:00
|
|
|
require "parser/ruby22"
|
|
|
|
|
2017-01-18 00:05:36 +02:00
|
|
|
module Rubyx
|
|
|
|
module RubyxTests
|
2017-01-15 20:30:47 +02:00
|
|
|
include CompilerHelper
|
2017-01-19 09:02:29 +02:00
|
|
|
include Risc::InterpreterHelpers
|
|
|
|
subs = ObjectSpace.each_object(Class).select { |klass| klass < Risc::Instruction }
|
2017-01-17 21:26:28 +02:00
|
|
|
subs.each do |clazz|
|
|
|
|
name = clazz.to_s
|
|
|
|
next if name.include?("Arm")
|
|
|
|
scoped = name.split("::").last
|
|
|
|
module_eval "#{scoped} = #{name}"
|
2017-01-11 19:18:04 +02:00
|
|
|
end
|
2015-12-01 11:55:33 +02:00
|
|
|
end
|
|
|
|
end
|