rename the XX_slot classes to SlottedXX

move to slotted and slots (wip)
This commit is contained in:
2020-02-15 21:02:03 +07:00
parent 8b29326957
commit b7df6f66f9
41 changed files with 96 additions and 58 deletions

View File

@ -3,7 +3,7 @@ require_relative "helper"
module SlotMachine
class TestArgumentTransfer < SlotMachineInstructionTest
def instruction
receiver = MessageSlot.new( [:receiver])
receiver = SlottedMessage.new( [:receiver])
arg = SlotLoad.new("test", [:message, :caller] , [:message,:type] )
ArgumentTransfer.new("" , receiver ,[arg])
end

View File

@ -3,7 +3,7 @@ require_relative "helper"
module SlotMachine
class TestNotSameCheck < SlotMachineInstructionTest
def instruction
target = Slot.for(:message , :caller)
target = Slotted.for(:message , :caller)
NotSameCheck.new(target , target , Label.new("ok" , "target"))
end
def test_len

View File

@ -3,7 +3,7 @@ require_relative "helper"
module SlotMachine
class TestSameCheck < SlotMachineInstructionTest
def instruction
target = MessageSlot.new( :caller)
target = SlottedMessage.new( :caller)
TruthCheck.new(target , Label.new("ok" , "target"))
end
def test_len

View File

@ -4,7 +4,7 @@ module SlotMachine
class TestSlotBasics < MiniTest::Test
def slot(slot = :caller)
MessageSlot.new(slot)
SlottedMessage.new(slot)
end
def test_create_ok1
assert_equal :message , slot.known_object

View File

@ -5,7 +5,7 @@ module SlotMachine
def setup
Parfait.boot!(Parfait.default_test_options)
@compiler = Risc::FakeCompiler.new
@definition = MessageSlot.new( :caller)
@definition = SlottedMessage.new( :caller)
@register = @definition.to_register(@compiler , "fake source")
@instruction = @compiler.instructions.first
end

View File

@ -6,7 +6,7 @@ module SlotMachine
def setup
Parfait.boot!(Parfait.default_test_options)
@compiler = Risc::FakeCompiler.new
@definition = Slot.for(StringConstant.new("hi") , [])
@definition = Slotted.for(StringConstant.new("hi") , [])
@register = @definition.to_register(@compiler , InstructionMock.new)
@instruction = @compiler.instructions.first
end
@ -27,7 +27,7 @@ module SlotMachine
def setup
Parfait.boot!(Parfait.default_test_options)
@compiler = Risc::FakeCompiler.new
@definition = Slot.for(StringConstant.new("hi") , [:type])
@definition = Slotted.for(StringConstant.new("hi") , [:type])
@register = @definition.to_register(@compiler , InstructionMock.new)
@instruction = @compiler.instructions.first
end

View File

@ -4,7 +4,7 @@ module SlotMachine
class TestSlotBasics < MiniTest::Test
def slot(slot = :caller)
MessageSlot.new(slot)
SlottedMessage.new(slot)
end
def test_create_ok1
assert_equal :message , slot.known_object