Some vool starting to work again

disabling some rubyx compiler tests
This commit is contained in:
Torsten Rüger
2019-08-07 12:06:06 +03:00
parent 5d1d485565
commit 1237e079f7
14 changed files with 78 additions and 69 deletions

View File

@ -13,16 +13,16 @@ module Mom
@constants = []
@block_compilers = []
@mom_instructions = Label.new(source_name, source_name)
@current = start = @risc_instructions
@current = start = @mom_instructions
add_code Label.new( source_name, "return_label")
add_code Mom::ReturnSequence.new
add_code Mom::ReturnSequence.new(source_name)
add_code Label.new( source_name, "unreachable")
@current = start
end
attr_reader :risc_instructions , :constants , :block_compilers , :callable , :current
attr_reader :mom_instructions , :constants , :block_compilers , :callable , :current
def return_label
@risc_instructions.each do |ins|
@mom_instructions.each do |ins|
next unless ins.is_a?(Label)
return ins if ins.name == "return_label"
end

View File

@ -23,7 +23,8 @@ module Mom
class Label < Instruction
attr_reader :name
def initialize(name)
def initialize(source , name)
super(source)
@name = name
end

View File

@ -28,7 +28,8 @@ module Mom
attr_reader :left , :right , :original_source
def initialize(left , right, original_source = nil)
def initialize(source , left , right, original_source = nil)
super(source)
@left , @right = left , right
@left = SlotDefinition.new(@left.shift , @left) if @left.is_a? Array
@right = SlotDefinition.new(@right.shift , @right) if @right.is_a? Array