use existing constant

This commit is contained in:
Torsten Ruger 2018-05-16 12:55:51 +03:00
parent 9597fc5756
commit dc8afce444
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ module Mom
const << Risc::SlotToReg.new( instruction , right ,index, right)
if slots.length > 2
raise "3 slots only for type #{slots}" unless slots[2] == :type
const << Risc::SlotToReg.new( instruction , right , 0, right)
const << Risc::SlotToReg.new( instruction , right , Parfait::TYPE_INDEX, right)
end
end
const

View File

@ -39,7 +39,7 @@ module Parfait
# 0 -based index
def set_internal_word(index , value)
return set_type(value) if( index == 0)
return set_type(value) if( index == TYPE_INDEX)
raise "not type #{@type.class}" unless @type.is_a?(Type)
name = @type.name_at(index)
#return value unless name