Skip to content

Commit

Permalink
[Truffle] Rename primitive encoding_get_object_encoding_by_index to e…
Browse files Browse the repository at this point in the history
…ncoding_get_encoding_by_index
  • Loading branch information
Brandon Fish committed Sep 19, 2016
1 parent 66e1761 commit a8367e1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -581,7 +581,7 @@ public DynamicObject encodingReplicate(VirtualFrame frame, DynamicObject self, D

}

@Primitive(name = "encoding_get_object_encoding_by_index", needsSelf = false)
@Primitive(name = "encoding_get_encoding_by_index", needsSelf = false)
public static abstract class EncodingGetObjectEncodingByIndexNode extends PrimitiveArrayArgumentsNode {

@Specialization
Expand Down
4 changes: 2 additions & 2 deletions truffle/src/main/ruby/core/encoding.rb
Expand Up @@ -548,7 +548,7 @@ def self.aliases
next unless index

aname = r.first
aliases[aname] = Truffle.invoke_primitive(:encoding_get_object_encoding_by_index, index).name if aname
aliases[aname] = Truffle.invoke_primitive(:encoding_get_encoding_by_index, index).name if aname
end

aliases
Expand Down Expand Up @@ -612,7 +612,7 @@ def self.find(name)
def self.name_list
EncodingMap.map do |n, r|
index = r.last
r.first or (index and Truffle.invoke_primitive(:encoding_get_object_encoding_by_index, index).name)
r.first or (index and Truffle.invoke_primitive(:encoding_get_encoding_by_index, index).name)
end
end

Expand Down
2 changes: 1 addition & 1 deletion truffle/src/main/ruby/core/type.rb
Expand Up @@ -462,7 +462,7 @@ def self.try_convert_to_encoding(obj)
pair = Encoding::EncodingMap[key]
if pair
index = pair.last
return index && Truffle.invoke_primitive(:encoding_get_object_encoding_by_index, index)
return index && Truffle.invoke_primitive(:encoding_get_encoding_by_index, index)
end

return undefined
Expand Down

0 comments on commit a8367e1

Please sign in to comment.