load constant to create register names with class

Just the id_ did give no clue to the contents, just took care of the uniqueness.
Better for debugging
This commit is contained in:
2020-03-07 19:25:07 +02:00
parent 3ec5557ddb
commit 53eb28fff4
2 changed files with 8 additions and 5 deletions

View File

@ -45,7 +45,8 @@ module Risc
type = constant.ct_type
value = constant.value
end
register = RegisterValue.new( "id_#{value.object_id}".to_sym , type )
value_class = value.class.name.to_s.split("::").last.downcase
register = RegisterValue.new( "id_#{value_class}_#{value.object_id}".to_sym , type )
end
LoadConstant.new( source , constant , register )
end