From 9ac165c34cc458c81a9fc91efda166d57f3b31e7 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Tue, 7 Oct 2014 12:23:27 +0300 Subject: [PATCH] some checks --- lib/arm/instructions/move_instruction.rb | 1 + lib/virtual/constants.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/arm/instructions/move_instruction.rb b/lib/arm/instructions/move_instruction.rb index f4880dc2..2323a508 100644 --- a/lib/arm/instructions/move_instruction.rb +++ b/lib/arm/instructions/move_instruction.rb @@ -5,6 +5,7 @@ module Arm def initialize to , from , options = {} super(options) @to = to + raise "old code, fix this to use LoadConstant" if from.is_a? Virtual::ObjectConstant @from = from.is_a?(Fixnum) ? Virtual::IntegerConstant.new(from) : from raise "move must have from set #{inspect}" unless from @attributes[:update_status] = 0 if @attributes[:update_status] == nil diff --git a/lib/virtual/constants.rb b/lib/virtual/constants.rb index 892f4f76..e744db0c 100644 --- a/lib/virtual/constants.rb +++ b/lib/virtual/constants.rb @@ -45,6 +45,7 @@ module Virtual attr_reader :string def result= value + raise "called" class_for(MoveInstruction).new(value , self , :opcode => :mov) end def clazz