Skip to content

Commit dc17255

Browse files
committed
correct usage of string comparison in MakeNames and Slot
1 parent 7e7058a commit dc17255

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/MakeNames.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ protected RAbstractStringVector makeNames(RAbstractStringVector names, byte allo
176176
newNames = updateNewNames(names, reuse, namesIter.getIndex(), newName, newNames);
177177
} else {
178178
newName = getName(name, allowUnderscore);
179-
if (!Utils.identityEquals(newName, name)) {
179+
if (!Utils.fastPathIdentityEquals(newName, name)) {
180180
// getName returns "name" in case nothing's changed
181181
newNames = updateNewNames(names, reuse, namesIter.getIndex(), newName, newNames);
182182
}

com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/Slot.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public String execute(Object nameObj) {
6464
CompilerDirectives.transferToInterpreterAndInvalidate();
6565
value = getValue(nameObj);
6666
}
67-
if (Utils.identityEquals(value, ERROR_MARKER)) {
67+
if (Utils.fastPathIdentityEquals(value, ERROR_MARKER)) {
6868
CompilerDirectives.transferToInterpreter();
6969
throw RError.error(RError.NO_CALLER, RError.Message.GENERIC, "invalid type or length for slot name");
7070
}

0 commit comments

Comments
 (0)