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,8 @@ module Risc
|
||||
include Statements
|
||||
|
||||
def setup
|
||||
super
|
||||
@input = "@a.div4"
|
||||
@preload = "Integer.div4"
|
||||
@input = "@classes.div4"
|
||||
@expect = [LoadConstant, SlotToReg, SlotToReg, SlotToReg, SlotToReg, #5
|
||||
OperatorInstruction, IsZero, SlotToReg, SlotToReg, SlotToReg, #10
|
||||
LoadConstant, RegToSlot, LoadConstant, LoadConstant, SlotToReg, #15
|
||||
|
@ -5,7 +5,7 @@ module Risc
|
||||
include Statements
|
||||
|
||||
def setup
|
||||
super
|
||||
@preload = "Integer.div4"
|
||||
@input = "5.div4"
|
||||
@expect = [LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg, #5
|
||||
RegToSlot, LoadConstant, SlotToReg, RegToSlot, SlotToReg, #10
|
||||
|
@ -5,7 +5,7 @@ module Risc
|
||||
include Statements
|
||||
|
||||
def setup
|
||||
super
|
||||
@preload = "Object.get"
|
||||
@input = "5.get_internal_word(1)"
|
||||
@expect = [LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg, #5
|
||||
RegToSlot, LoadConstant, SlotToReg, RegToSlot, LoadConstant, #10
|
||||
|
@ -5,7 +5,7 @@ module Risc
|
||||
include Statements
|
||||
|
||||
def setup
|
||||
super
|
||||
@preload = "Integer.div4"
|
||||
@input = "return 5.div4"
|
||||
@expect = [LoadConstant, SlotToReg, RegToSlot, LoadConstant, SlotToReg, #5
|
||||
RegToSlot, LoadConstant, SlotToReg, RegToSlot, SlotToReg, #10
|
||||
|
Reference in New Issue
Block a user