shaves an instruction off resolve_method
by loading nil directly, not space first
This commit is contained in:
@@ -101,9 +101,6 @@ module Arm
|
||||
right = Risc::Position.get(left) - 8
|
||||
right -= Risc::Position.get(self).at
|
||||
if( (right < 0) && ((opcode == :add) || (opcode == :sub)) )
|
||||
puts "Inverting, was #{right} , new #{-1*right}"
|
||||
puts "left #{left.class} #{Risc::Position.get(left)}"
|
||||
puts "self #{Risc::Position.get(self)}"
|
||||
right *= -1 # this works as we never issue sub only add
|
||||
set_opcode :sub # so (as we can't change the sign permanently) we can change the opcode
|
||||
end # and the sign even for sub (beucase we created them)
|
||||
|
@@ -45,9 +45,8 @@ module Mom
|
||||
|
||||
add_code while_start_label
|
||||
|
||||
space! << Parfait.object_space
|
||||
space << space[:nil_object]
|
||||
space - callable_method
|
||||
object! << Parfait.object_space.nil_object
|
||||
object - callable_method
|
||||
if_zero exit_label
|
||||
|
||||
name! << callable_method[:name]
|
||||
|
@@ -103,7 +103,9 @@ module Risc
|
||||
|
||||
def prerun
|
||||
assemblers.each do |asm|
|
||||
asm.instructions.each {|i| i.precheck }
|
||||
asm.instructions.each do |ins|
|
||||
ins.precheck
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user