fixing fragment tests, most done
This commit is contained in:
@ -45,7 +45,7 @@ module Vm
|
||||
args.each_with_index do |arg , i|
|
||||
if arg.is_a?(Value)
|
||||
@args[i] = arg
|
||||
raise "arg in non std register #{arg.inspect}" unless RECEIVER_REG == arg.used_register.next_reg(i - 1)
|
||||
raise "arg #{i}in non std register #{arg.inspect}" unless RECEIVER_REG == arg.used_register.next_reg(-1-i)
|
||||
else
|
||||
@args[i] = arg.new(RegisterUse.new(RECEIVER_REG).next_reg(i + 1))
|
||||
end
|
||||
|
@ -1,5 +1,4 @@
|
||||
require_relative "code"
|
||||
require "support/hash_attributes"
|
||||
module Vm
|
||||
|
||||
# Because the idea of what one instruction does, does not always map one to one to real machine
|
||||
|
@ -122,9 +122,6 @@ module Vm
|
||||
def less_than block , right
|
||||
RegisterMachine.instance.integer_less_than block , self , right
|
||||
end
|
||||
def equals block , right
|
||||
RegisterMachine.instance.integer_equals block , self , right
|
||||
end
|
||||
def == other
|
||||
code = class_for(CompareInstruction).new(self , other , opcode: :cmp)
|
||||
end
|
||||
@ -146,6 +143,9 @@ module Vm
|
||||
def left_shift block , first , right
|
||||
RegisterMachine.instance.integer_left_shift block , self , first , right
|
||||
end
|
||||
def equals block , right
|
||||
RegisterMachine.instance.integer_equals block , self , right
|
||||
end
|
||||
|
||||
def load block , right
|
||||
if(right.is_a? IntegerConstant)
|
||||
|
Reference in New Issue
Block a user