move machine to module level
makes for shorter, more concise, access also remove one more bug possibility (reinitiation)
This commit is contained in:
@ -8,7 +8,7 @@ module Builtin
|
||||
function = Virtual::CompiledMethodInfo.create_method(:Kernel,:__init__ , [])
|
||||
# puts "INIT LAYOUT #{function.get_layout.get_layout}"
|
||||
function.info.return_type = Virtual::Integer
|
||||
main = Virtual::Machine.instance.space.get_main
|
||||
main = Virtual.machine.space.get_main
|
||||
me = Virtual::Self.new(Virtual::Reference)
|
||||
code = Virtual::Set.new(Virtual::Self.new(me.type), me)
|
||||
function.info.add_code(code)
|
||||
|
@ -23,7 +23,7 @@ module Builtin
|
||||
var_name = get_function.args.first
|
||||
return_to = get_function.return_type
|
||||
|
||||
index_function = ::Virtual::Machine.instance.space.get_class_by_name(:Object).resolve_method(:index_of)
|
||||
index_function = ::Virtual.machine.space.get_class_by_name(:Object).resolve_method(:index_of)
|
||||
# get_function.push( [me] )
|
||||
# index = get_function.call( index_function )
|
||||
|
||||
|
@ -23,5 +23,5 @@ module Register
|
||||
end
|
||||
end
|
||||
end
|
||||
Virtual::Machine.instance.add_pass "Register::CallImplementation"
|
||||
Virtual.machine.add_pass "Register::CallImplementation"
|
||||
end
|
||||
|
@ -18,5 +18,5 @@ module Register
|
||||
end
|
||||
end
|
||||
end
|
||||
Virtual::Machine.instance.add_pass "Register::ReturnImplementation"
|
||||
Virtual.machine.add_pass "Register::ReturnImplementation"
|
||||
end
|
||||
|
@ -42,5 +42,5 @@ module Register
|
||||
end
|
||||
end
|
||||
end
|
||||
Virtual::Machine.instance.add_pass "Register::SetImplementation"
|
||||
Virtual.machine.add_pass "Register::SetImplementation"
|
||||
end
|
||||
|
Reference in New Issue
Block a user