Mostly replaced Fixnum with integer
also in the rx-file dependency
all travis and testing with 2.4+
This commit is contained in:
Torsten Ruger
2019-02-07 18:24:35 +02:00
parent 51eff62931
commit 8d3a1954fa
25 changed files with 30 additions and 27 deletions

View File

@ -34,7 +34,7 @@ module Risc
# Objects are data and get assembled after functions
def self.add_object( objekt , depth)
return false if Position.set?(objekt)
return true if objekt.is_a? Fixnum
return true if objekt.is_a? ::Integer
return true if objekt.is_a?( Risc::Label)
#puts message(objekt , depth)
#puts "ADD #{objekt.inspect}, #{objekt.name}" if objekt.is_a? Parfait::CallableMethod

View File

@ -73,7 +73,7 @@ module Risc
def set_register( reg , val )
old = get_register( reg ) # also ensures format
if val.is_a? Fixnum
if val.is_a? ::Integer
@flags[:zero] = (val == 0)
@flags[:plus] = (val >= 0)
@flags[:minus] = (val < 0)
@ -190,7 +190,7 @@ module Risc
end
raise "Unsupported action, must convert symbol to word:#{object}" if object.is_a?(Symbol)
value = object.get_char( index )
#value = value.object_id unless value.is_a? Fixnum
#value = value.object_id unless value.is_a? ::Integer
set_register( @instruction.register , value )
true
end

View File

@ -142,7 +142,7 @@ module Risc
when Label
ins = Risc.load_constant("#{right.class} to #{self.type}" , right , self)
builder.compiler.add_constant(right.address) if builder
when Fixnum
when ::Integer
ins = Risc.load_data("#{right.class} to #{self.type}" , right , self)
when RegisterValue
ins = Risc.transfer("#{right.type} to #{self.type}" , right , self)

View File

@ -206,7 +206,7 @@ module Risc
case object
when nil
@stream.write_signed_int_32(0)
when Fixnum
when ::Integer
@stream.write_signed_int_32(object)
else
@stream.write_signed_int_32(Position.get(object) + @linker.platform.loaded_at)