hoist parfait boot out of the machine boot

This commit is contained in:
Torsten Ruger
2018-06-30 00:39:23 +03:00
parent 8d7a2fe4d6
commit 46d8f5002f
35 changed files with 62 additions and 33 deletions

View File

@ -6,7 +6,8 @@ module Vool
include MomCompile
def setup
Risc.machine.boot
Parfait.boot!
Risc::Builtin.boot_functions
@ins = compile_first_method( send_method )
end

View File

@ -5,7 +5,8 @@ module Vool
include MomCompile
def setup
Risc.machine.boot
Parfait.boot!
Risc::Builtin.boot_functions
@ins = compile_first_method( "local = 5")
end
@ -36,7 +37,7 @@ module Vool
class TestAssignMomInstanceToLocal < MiniTest::Test
include MomCompile
def setup
Risc.machine.boot
Parfait.boot!
@ins = compile_first_method( "@a = 5 ; local = @a")
end
def test_class_compiles
@ -49,7 +50,7 @@ module Vool
include MomCompile
def setup
Risc.machine.boot
Parfait.boot!
@ins = compile_first_method( "arg = 5")
end
@ -73,7 +74,7 @@ module Vool
class TestAssignMomToInstance < MiniTest::Test
include MomCompile
def setup
Risc.machine.boot
Parfait.boot!
end
def test_assigns_const
@ins = compile_first_method( "@a = 5")

View File

@ -7,7 +7,8 @@ module Vool
include Mom
def setup
Risc.machine.boot
Parfait.boot!
Risc::Builtin.boot_functions
@ins = compile_first_method( "if(5.div4) ; @a = 6 ; else; @a = 5 ; end")
end

View File

@ -7,7 +7,7 @@ module Vool
include Mom
def setup
Risc.machine.boot
Parfait.boot!
@ins = compile_first_method( "if(@a) ; @a = 5 ; end")
end

View File

@ -7,7 +7,7 @@ module Vool
include Mom
def setup
Risc.machine.boot
Parfait.boot!
@ins = compile_first_method( "if(@a) ; @a = 5 ; else; @a = 6 ; end")
end

View File

@ -5,7 +5,7 @@ module Vool
include MomCompile
def setup
Risc.machine.boot
Parfait.boot!
@ins = compile_first_method( "@a = 5")
end

View File

@ -5,7 +5,7 @@ module Vool
include MomCompile
def setup
Risc.machine.boot
Parfait.boot!
@ins = compile_first_method( "a = 5")
end

View File

@ -6,7 +6,7 @@ module Vool
include Mom
def setup
Risc.machine.boot
Parfait.boot!
@inst = compile_first_method( "return 5")
end

View File

@ -7,7 +7,8 @@ module Vool
include Mom
def setup
Risc.machine.boot
Parfait.boot!
Risc::Builtin.boot_functions
@ins = compile_first_method( "while(5.div4) ; 5.div4 ; end")
end

View File

@ -7,7 +7,7 @@ module Vool
include Mom
def setup
Risc.machine.boot
Parfait.boot!
@ins = compile_first_method( "while(@a) ; @a = 5 ; end")
end