make method creation class methods in MethodCompiler
and pass the wish to use main explicitly, which is really a test feature
This commit is contained in:
@ -6,7 +6,7 @@ module Register
|
||||
# it isn't really a function, ie it is jumped to (not called), exits and may not return
|
||||
# so it is responsible for initial setup
|
||||
def __init__ context
|
||||
compiler = Vm::MethodCompiler.new.create_method(:Kernel,:__init__ )
|
||||
compiler = Vm::MethodCompiler.create_method(:Kernel,:__init__ )
|
||||
new_start = Register.label("__init__ start" , "__init__" )
|
||||
compiler.method.set_instructions( new_start)
|
||||
compiler.set_current new_start
|
||||
@ -29,7 +29,7 @@ module Register
|
||||
end
|
||||
|
||||
def exit context
|
||||
compiler = Vm::MethodCompiler.new.create_method(:Kernel,:exit ).init_method
|
||||
compiler = Vm::MethodCompiler.create_method(:Kernel,:exit ).init_method
|
||||
emit_syscall( compiler , :exit )
|
||||
return compiler.method
|
||||
end
|
||||
|
Reference in New Issue
Block a user