rename c to register machine

This commit is contained in:
Torsten Ruger
2014-05-21 19:43:46 +03:00
parent 937f566b27
commit 46102e56ad
9 changed files with 24 additions and 24 deletions

View File

@@ -21,13 +21,13 @@ module Vm
class Program < Block
# Initialize with a string for cpu. Naming conventions are: for Machine XXX there exists a module XXX
# with a XXXMachine in it that derives from Vm::CMachine
# with a XXXMachine in it that derives from Vm::RegisterMachine
def initialize machine = nil
super("start" , nil)
machine = RbConfig::CONFIG["host_cpu"] unless machine
machine = "intel" if machine == "x86_64"
machine = machine.capitalize
CMachine.instance = eval("#{machine}::#{machine}Machine").new
RegisterMachine.instance = eval("#{machine}::#{machine}Machine").new
@context = Context.new(self)
#global objects (data)
@objects = []