lib/kompiler/architecture.rb in kompiler-0.2.0 vs lib/kompiler/architecture.rb in kompiler-0.3.0.pre.1
- old
+ new
@@ -1,29 +1,29 @@
# Copyright 2024 Kyrylo Shyshko
# Licensed under the Apache License, Version 2.0. See LICENSE file for details.
module Kompiler
-class Architecture
+module Architecture
-@@instructions = []
-@@registers = []
-
+@instructions = []
+@registers = []
+
def self.set_arch instructions, registers
- @@instructions = instructions
- @@registers = registers
+ @instructions = instructions
+ @registers = registers
end
-def self.load_arch(arch_name)
- require "kompiler/arch/#{arch_name.downcase}/load"
-end
+# def self.load_arch(arch_name)
+# require "kompiler/arch/#{arch_name.downcase}/load"
+# end
def self.instructions
- @@instructions
+ @instructions
end
def self.registers
- @@registers
+ @registers
end
end
end
\ No newline at end of file