From a3890afc206b9fd1ab6a85319de373130557a842 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Tue, 13 Mar 2018 16:57:24 +0530 Subject: [PATCH] clean up requires a bit --- lib/common.rb | 2 -- lib/{ => mom}/mom.rb | 4 ++-- lib/risc.rb | 15 ++++++++------- lib/rubyx.rb | 19 ++++++++++--------- lib/vool.rb | 1 - 5 files changed, 20 insertions(+), 21 deletions(-) delete mode 100644 lib/common.rb rename lib/{ => mom}/mom.rb (84%) delete mode 100644 lib/vool.rb diff --git a/lib/common.rb b/lib/common.rb deleted file mode 100644 index 89c2175e..00000000 --- a/lib/common.rb +++ /dev/null @@ -1,2 +0,0 @@ -require_relative "common/list" -require_relative "common/statements" diff --git a/lib/mom.rb b/lib/mom/mom.rb similarity index 84% rename from lib/mom.rb rename to lib/mom/mom.rb index 798e634c..c6c7cdc0 100644 --- a/lib/mom.rb +++ b/lib/mom/mom.rb @@ -14,5 +14,5 @@ module Mom end -require_relative "mom/instruction/instruction.rb" -require_relative "mom/statement/statement.rb" +require_relative "instruction/instruction.rb" +require_relative "statement/statement.rb" diff --git a/lib/risc.rb b/lib/risc.rb index 16a2349b..e21c7402 100644 --- a/lib/risc.rb +++ b/lib/risc.rb @@ -5,12 +5,12 @@ class String end -require "risc/padding" -require "risc/positioned" +require_relative "risc/padding" +require_relative "risc/positioned" require "parfait" -require "risc/machine" -require "risc/method_compiler" +require_relative "risc/machine" +require_relative "risc/method_compiler" class Fixnum def fits_u8? @@ -19,6 +19,7 @@ class Fixnum end -require "risc/instruction" -require "risc/register_value" -require "risc/assembler" +require_relative "risc/instruction" +require_relative "risc/register_value" +require_relative "risc/assembler" +require_relative "risc/builtin/space" diff --git a/lib/rubyx.rb b/lib/rubyx.rb index 286bb9d3..c1b581ae 100644 --- a/lib/rubyx.rb +++ b/lib/rubyx.rb @@ -1,6 +1,4 @@ require "parser/ruby22" -require "logging" -require "elf/object_writer" require "ast" AST::Node.class_eval do @@ -10,10 +8,13 @@ AST::Node.class_eval do end require "rx-file" -require "risc" -require "risc/builtin/space" -require "arm/arm_machine" -require "arm/translator" -require "common" -require "vool" -require "mom" + +require_relative "logging" +require_relative "elf/object_writer" +require_relative "risc" +require_relative "arm/arm_machine" +require_relative "arm/translator" +require_relative "common/list" +require_relative "common/statements" +require_relative "vool/vool_compiler" +require_relative "mom/mom" diff --git a/lib/vool.rb b/lib/vool.rb deleted file mode 100644 index 170eb220..00000000 --- a/lib/vool.rb +++ /dev/null @@ -1 +0,0 @@ -require_relative "vool/vool_compiler"