clearer to_s s

This commit is contained in:
Torsten Ruger 2015-07-25 09:30:58 +03:00
parent 772212bad9
commit b0c78479ff
10 changed files with 11 additions and 11 deletions

View File

@ -11,7 +11,7 @@ module Register
attr_reader :block
def to_s
"Branch(block: #{block.name})"
"Branch: #{block.name}"
end
end

View File

@ -10,7 +10,7 @@ module Register
attr_reader :method
def to_s
"FunctionCall(#{method.name})"
"FunctionCall: #{method.name}"
end
end

View File

@ -11,7 +11,7 @@ module Register
attr_reader :register , :index
def to_s
"FunctionReturn(#{register}: #{index})"
"FunctionReturn: #{register} [#{index}]"
end
end

View File

@ -29,7 +29,7 @@ module Register
attr_accessor :register , :array , :index
def to_s
"GetSlot(#{register}: #{array}[#{index}])"
"GetSlot: #{register} -> #{array} [#{index}]"
end
end

View File

@ -12,7 +12,7 @@ module Register
attr_accessor :register , :constant
def to_s
"LoadConstant(#{register}: #{constant})"
"LoadConstant: #{register} <- #{constant}"
end
end

View File

@ -23,7 +23,7 @@ module Register
attr_reader :from, :to
def to_s
"RegisterTransfer(#{from} -> #{to})"
"RegisterTransfer: #{from} -> #{to}"
end
end

View File

@ -14,7 +14,7 @@ module Register
attr_reader :register , :index
def to_s
"SaveReturn(#{register}[#{index}])"
"SaveReturn: #{register} [#{index}]"
end
end

View File

@ -27,7 +27,7 @@ module Register
end
attr_accessor :register , :array , :index
def to_s
"SetSlot(#{register}: #{array}[#{index}])"
"SetSlot: #{register} -> #{array} [#{index}]"
end
end

View File

@ -15,7 +15,7 @@ module Register
attr_reader :name
def to_s
"Syscall(#{name})"
"Syscall: #{name}"
end
end

View File

@ -62,7 +62,7 @@ module Virtual
end
end
@passes.each do |pass_class|
puts "running #{pass_class}"
#puts "running #{pass_class}"
run_blocks_for pass_class
return if stop_at == pass_class
end
@ -75,7 +75,7 @@ module Virtual
run = false
@passes.each do |pass_class|
if run
puts "running #{pass_class}"
#puts "running #{pass_class}"
run_blocks_for pass_class
else
run = true if start_at == pass_class