fix many tests with preloading
preloading, something akin to builtin, loads some very small predefined (macro) methods for the tests to work (ie call)
This commit is contained in:
@ -5,8 +5,7 @@ module Risc
|
||||
include Statements
|
||||
|
||||
def setup
|
||||
super
|
||||
@input = "@ivar = 5;return"
|
||||
@input = "@nil_object = 5;return"
|
||||
@expect = [LoadConstant, SlotToReg, RegToSlot, LoadConstant, RegToSlot, Branch]
|
||||
end
|
||||
|
||||
|
@ -5,7 +5,6 @@ module Risc
|
||||
include Statements
|
||||
|
||||
def setup
|
||||
super
|
||||
@input = "local = arg; return local"
|
||||
@expect = [SlotToReg, RegToSlot, SlotToReg, RegToSlot, Branch] #4
|
||||
end
|
||||
|
@ -5,7 +5,6 @@ module Risc
|
||||
include Statements
|
||||
|
||||
def setup
|
||||
super
|
||||
@input = "r = false;return"
|
||||
@expect = [LoadConstant, RegToSlot,LoadConstant, RegToSlot, Branch]
|
||||
end
|
||||
|
@ -5,7 +5,6 @@ module Risc
|
||||
include Statements
|
||||
|
||||
def setup
|
||||
super
|
||||
@input = "r = 5;return"
|
||||
@expect = [LoadConstant, RegToSlot, LoadConstant, RegToSlot, Branch]
|
||||
end
|
||||
|
@ -5,8 +5,7 @@ module Risc
|
||||
include Statements
|
||||
|
||||
def setup
|
||||
super
|
||||
@input = "@ivar = 5 ; r = @ivar;return"
|
||||
@input = "@nil_object = 5 ; r = @nil_object;return"
|
||||
@expect = [LoadConstant, SlotToReg, RegToSlot, SlotToReg, SlotToReg, #4
|
||||
RegToSlot, LoadConstant, RegToSlot, Branch] #9
|
||||
end
|
||||
|
@ -5,7 +5,7 @@ module Risc
|
||||
include Statements
|
||||
|
||||
def setup
|
||||
super
|
||||
@preload = "Integer.div4"
|
||||
@input = "r = 5.div4;return"
|
||||
@expect = [LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg, #5
|
||||
RegToSlot, LoadConstant, SlotToReg, RegToSlot, SlotToReg, #10
|
||||
|
Reference in New Issue
Block a user