Skip to content

Commit fdf02ca

Browse files
committed
Ensuring the content of CharSXP is always interned.
1 parent 8dc3bd1 commit fdf02ca

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RSymbol.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public final class RSymbol extends RAttributeStorage {
5050
private CharSXPWrapper nameWrapper;
5151

5252
private RSymbol(String name) {
53-
this.nameWrapper = CharSXPWrapper.create(name);
53+
this.nameWrapper = CharSXPWrapper.createInterned(name);
5454
}
5555

5656
@TruffleBoundary

com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/nodes/RSyntaxLookup.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ default boolean isPromiseLookup() {
8282
* section.
8383
*/
8484
static RSyntaxLookup createDummyLookup(SourceSection source, String identifier, boolean isFunctionLookup) {
85+
assert Utils.isInterned(identifier);
8586
return new RSyntaxLookup() {
8687
@Override
8788
public SourceSection getLazySourceSection() {

0 commit comments

Comments
 (0)