2015-12-01 10:55:33 +01:00
|
|
|
require_relative '../helper'
|
2017-01-19 08:02:29 +01:00
|
|
|
require "risc/interpreter"
|
2015-12-01 10:55:33 +01:00
|
|
|
require "parser/ruby22"
|
|
|
|
|
2017-01-17 23:05:36 +01:00
|
|
|
module Rubyx
|
|
|
|
module RubyxTests
|
2017-01-15 19:30:47 +01:00
|
|
|
include CompilerHelper
|
2017-01-19 08:02:29 +01:00
|
|
|
include Risc::InterpreterHelpers
|
|
|
|
subs = ObjectSpace.each_object(Class).select { |klass| klass < Risc::Instruction }
|
2017-01-17 20:26:28 +01: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 18:18:04 +01:00
|
|
|
end
|
2015-12-01 10:55:33 +01:00
|
|
|
end
|
|
|
|
end
|