Skip to content

Commit f256a80

Browse files
OracleLabsAutomationiamstolis
authored andcommitted
[GR-23997] Periodic update of the graal import (2025-03-21).
PullRequest: js/3463
2 parents 8ddeac0 + e456b89 commit f256a80

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

graal-js/mx.graal-js/suite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
{
2626
"name" : "regex",
2727
"subdir" : True,
28-
"version" : "1cca4dbd0c09f466450a15850d15a9b34af7e5d7",
28+
"version" : "7de128634d706645cc61f1bbc9e06f37ee593990",
2929
"urls" : [
3030
{"url" : "https://github.com/oracle/graal.git", "kind" : "git"},
3131
]

graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/builtins/StringFunctionBuiltins.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -690,13 +690,13 @@ private Object parseText(TruffleStringIterator iterator,
690690
InlinedBranchProfile errorBranch) {
691691
var partialResult = Strings.builderCreate();
692692
while (iterator.hasNext()) {
693-
int ch = iteratorNextNode.execute(iterator);
693+
int ch = iteratorNextNode.execute(iterator, TruffleString.Encoding.UTF_16);
694694
if (ch == '\\') {
695695
if (!iterator.hasNext()) {
696696
// Lone backslash at the end.
697697
return Undefined.instance;
698698
}
699-
final int next = iteratorNextNode.execute(iterator);
699+
final int next = iteratorNextNode.execute(iterator, TruffleString.Encoding.UTF_16);
700700
switch (next) {
701701
case '0': {
702702
// only `\0` by itself is allowed but not e.g. `\02`.
@@ -741,8 +741,8 @@ private Object parseText(TruffleStringIterator iterator,
741741
appendCharNode.execute(partialResult, '\\');
742742
break;
743743
case '\r': // CR | CRLF
744-
if (iteratorNextNode.execute(iterator) != '\n') {
745-
iteratorPreviousNode.execute(iterator);
744+
if (iteratorNextNode.execute(iterator, TruffleString.Encoding.UTF_16) != '\n') {
745+
iteratorPreviousNode.execute(iterator, TruffleString.Encoding.UTF_16);
746746
}
747747
break;
748748
case '\n':
@@ -789,8 +789,8 @@ private Object parseText(TruffleStringIterator iterator,
789789
}
790790

791791
private int peekNext(TruffleStringIterator iterator) {
792-
int ch = iteratorNextNode.execute(iterator);
793-
iteratorPreviousNode.execute(iterator);
792+
int ch = iteratorNextNode.execute(iterator, TruffleString.Encoding.UTF_16);
793+
iteratorPreviousNode.execute(iterator, TruffleString.Encoding.UTF_16);
794794
return ch;
795795
}
796796

@@ -806,13 +806,13 @@ private int unicodeEscapeSequence(TruffleStringIterator iterator,
806806

807807
private int varlenHexSequence(TruffleStringIterator iterator,
808808
InlinedBranchProfile errorBranch) {
809-
int ch = iteratorNextNode.execute(iterator);
809+
int ch = iteratorNextNode.execute(iterator, TruffleString.Encoding.UTF_16);
810810
assert ch == '{';
811811

812812
int value = 0;
813813
boolean firstIteration = true;
814814
while (iterator.hasNext()) {
815-
ch = iteratorNextNode.execute(iterator);
815+
ch = iteratorNextNode.execute(iterator, TruffleString.Encoding.UTF_16);
816816
if (ch == '}') {
817817
if (!firstIteration) {
818818
break;
@@ -846,7 +846,7 @@ private int hexSequence(TruffleStringIterator iterator, int length,
846846
int value = 0;
847847
int i;
848848
for (i = 0; i < length && iterator.hasNext(); i++) {
849-
int ch = iteratorNextNode.execute(iterator);
849+
int ch = iteratorNextNode.execute(iterator, TruffleString.Encoding.UTF_16);
850850
int digit = convertDigit(ch, 16);
851851
if (digit == -1) {
852852
errorBranch.enter(this);

0 commit comments

Comments
 (0)