Skip to content

[GR-26395] Periodic update of the graal import. #3823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+12-1270", "platformspecific": true, "extrabundles": ["static-libs"]},
"galahad-jdk": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+15-1632", "platformspecific": true, "extrabundles": ["static-libs"]},

"oraclejdk17": {"name": "jpg-jdk", "version": "17.0.7", "build_id": "jdk-17.0.7+8", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-17": {"name": "labsjdk", "version": "ce-17.0.7+4-jvmci-23.1-b02", "platformspecific": true },
Expand Down Expand Up @@ -45,13 +45,13 @@

"oraclejdk23": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+37", "platformspecific": true, "extrabundles": ["static-libs"]},

"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+13", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+13-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+13-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+13-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+13-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+13-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+13-jvmci-b01-sulong", "platformspecific": true }
"oraclejdk-latest": {"name": "jpg-jdk", "version": "25", "build_id": "jdk-25+15", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-25+15-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-25+15-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-25+15-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-25+15-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-25+15-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-25+15-jvmci-b01-sulong", "platformspecific": true }
},

"eclipse": {
Expand Down
4 changes: 2 additions & 2 deletions mx.truffleruby/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{
"name": "regex",
"subdir": True,
"version": "7d33961d49854bedb877d54b9819947fd253df9b",
"version": "f8fbbb697fb577184408dd16c52e34dbc9b0d8e8",
"urls": [
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
Expand All @@ -31,7 +31,7 @@
{
"name": "sulong",
"subdir": True,
"version": "7d33961d49854bedb877d54b9819947fd253df9b",
"version": "f8fbbb697fb577184408dd16c52e34dbc9b0d8e8",
"urls": [
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
Expand Down
12 changes: 7 additions & 5 deletions src/main/java/org/truffleruby/core/regexp/ClassicRegexp.java
Original file line number Diff line number Diff line change
Expand Up @@ -665,10 +665,11 @@ private static boolean all7Bit(byte[] bytes) {
public static TStringWithEncoding quote19(ATStringWithEncoding bs) {
final boolean asciiOnly = bs.isAsciiOnly();
boolean metaFound = false;
final var tencoding = bs.encoding.tencoding;

var iterator = bs.createCodePointIterator();
while (iterator.hasNext()) {
final int c = iterator.nextUncached();
final int c = iterator.nextUncached(tencoding);

switch (c) {
case '[':
Expand Down Expand Up @@ -712,7 +713,7 @@ public static TStringWithEncoding quote19(ATStringWithEncoding bs) {
iterator = bs.createCodePointIterator();
while (iterator.hasNext()) {
int p = iterator.getByteIndex();
final int c = iterator.nextUncached();
final int c = iterator.nextUncached(tencoding);

if (c == -1) {
int after = iterator.getByteIndex();
Expand Down Expand Up @@ -919,11 +920,12 @@ public static void appendRegexpString(TStringBuilder to, TStringWithEncoding ful
var str = fullStr.substring(start, len);

final var enc = str.encoding.jcoding;
final var tencoding = str.encoding.tencoding;
var iterator = str.createCodePointIterator();

boolean needEscape = false;
while (iterator.hasNext()) {
final int c = iterator.nextUncached();
final int c = iterator.nextUncached(tencoding);
if ((c >= 0 && Encoding.isAscii(c)) && (c == '/' || !enc.isPrint(c))) {
needEscape = true;
break;
Expand All @@ -936,10 +938,10 @@ public static void appendRegexpString(TStringBuilder to, TStringWithEncoding ful
iterator = str.createCodePointIterator();
while (iterator.hasNext()) {
final int p = iterator.getByteIndex();
final int c = iterator.nextUncached();
final int c = iterator.nextUncached(tencoding);

if (c == '\\' && iterator.hasNext()) {
iterator.nextUncached();
iterator.nextUncached(tencoding);
to.append(str, p, iterator.getByteIndex() - p);
} else if (c == '/') {
to.append((byte) '\\');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ byte[] invert(RubyString string, TruffleStringIterator iterator, byte[] initialB

while (iterator.hasNext()) {
int p = iterator.getByteIndex();
int c = nextNode.execute(iterator);
int c = nextNode.execute(iterator, encoding);

if ((lowerToUpper && StringSupport.isAsciiLowercase(c)) ||
(upperToLower && StringSupport.isAsciiUppercase(c))) {
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/org/truffleruby/core/string/StringNodes.java
Original file line number Diff line number Diff line change
Expand Up @@ -1273,7 +1273,7 @@ Object eachCodePoint(Object string, RubyProc block,
var iterator = createCodePointIteratorNode.execute(tstring, tencoding, ErrorHandling.RETURN_NEGATIVE);

while (iterator.hasNext()) {
int codePoint = nextNode.execute(iterator);
int codePoint = nextNode.execute(iterator, tencoding);

if (codePoint == -1) {
invalidCodePointProfile.enter(this);
Expand Down Expand Up @@ -1313,7 +1313,7 @@ Object codePointsWithoutBlock(Object string, Nil unusedBlock,

int i = 0;
while (iterator.hasNext()) {
int codePoint = nextNode.execute(iterator);
int codePoint = nextNode.execute(iterator, tencoding);

if (codePoint == -1) {
invalidCodePointProfile.enter(this);
Expand Down Expand Up @@ -1639,7 +1639,7 @@ static Object lstripBangSingleByte(RubyString string,
var tencoding = encoding.tencoding;

var iterator = createCodePointIteratorNode.execute(tstring, tencoding, ErrorHandling.RETURN_NEGATIVE);
int codePoint = nextNode.execute(iterator);
int codePoint = nextNode.execute(iterator, tencoding);

// Check the first code point to see if it's broken. In the case of strings without leading spaces,
// this check can avoid having to compile the while loop.
Expand All @@ -1657,7 +1657,7 @@ static Object lstripBangSingleByte(RubyString string,

while (iterator.hasNext()) {
int byteIndex = iterator.getByteIndex();
codePoint = nextNode.execute(iterator);
codePoint = nextNode.execute(iterator, tencoding);

if (codePoint == -1) {
badCodePointProfile.enter(node);
Expand Down Expand Up @@ -1780,7 +1780,7 @@ static Object rstripBangNonEmptyString(RubyString string,

var iterator = createBackwardCodePointIteratorNode.execute(tstring, tencoding,
ErrorHandling.RETURN_NEGATIVE);
int codePoint = previousNode.execute(iterator);
int codePoint = previousNode.execute(iterator, tencoding);

// Check the last code point to see if it's broken. In the case of strings without trailing spaces,
// this check can avoid having to compile the while loop.
Expand All @@ -1798,7 +1798,7 @@ static Object rstripBangNonEmptyString(RubyString string,

while (iterator.hasPrevious()) {
int byteIndex = iterator.getByteIndex();
codePoint = previousNode.execute(iterator);
codePoint = previousNode.execute(iterator, tencoding);

if (codePoint == -1) {
badCodePointProfile.enter(node);
Expand Down Expand Up @@ -3023,7 +3023,7 @@ Object capitalizeAsciiCodePoints(RubyString string, int caseMappingOptions,
byte[] bytes = null;

var iterator = createCodePointIteratorNode.execute(tstring, tencoding, ErrorHandling.RETURN_NEGATIVE);
int firstCodePoint = nextNode.execute(iterator);
int firstCodePoint = nextNode.execute(iterator, tencoding);
if (firstCharIsLowerProfile.profile(this, StringSupport.isAsciiLowercase(firstCodePoint))) {
bytes = copyByteArray(tstring, tencoding);
bytes[0] ^= 0x20;
Expand Down Expand Up @@ -3289,7 +3289,7 @@ static Object stringAwkSplit(Object string, int limit, Object block,
int e = 0, b = 0, iterations = 0;
try {
while (loopProfile.inject(node, iterator.hasNext())) {
int c = nextNode.execute(iterator);
int c = nextNode.execute(iterator, tencoding);
int p = iterator.getByteIndex();
iterations++;

Expand Down Expand Up @@ -3521,7 +3521,7 @@ private static TruffleString rbStrEscape(AbstractTruffleString tstring, RubyEnco

while (iterator.hasNext()) {
final int p = iterator.getByteIndex();
int c = iterator.nextUncached();
int c = iterator.nextUncached(tencoding);

if (c == -1) {
int n = iterator.getByteIndex() - p;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/truffleruby/core/string/StringSupport.java
Original file line number Diff line number Diff line change
Expand Up @@ -1226,10 +1226,10 @@ public static int multiByteCasecmp(RubyEncoding enc, AbstractTruffleString selfT

while (selfIterator.hasNext() && otherIterator.hasNext()) {
final int selfPos = selfIterator.getByteIndex();
final int c = selfIterator.nextUncached();
final int c = selfIterator.nextUncached(selfEncoding);

final int otherPos = otherIterator.getByteIndex();
final int oc = otherIterator.nextUncached();
final int oc = otherIterator.nextUncached(otherEncoding);

if (enc.isAsciiCompatible && (c >= 0 && Encoding.isAscii(c)) && (oc >= 0 && Encoding.isAscii(oc))) {
byte uc = AsciiTables.ToUpperCaseTable[c];
Expand Down
1 change: 1 addition & 0 deletions test/mri/excludes/TestTimeTZ.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
exclude :test_america_los_angeles, "RangeError: bignum too big to convert into `long'"
exclude :test_europe_berlin, "TZ=Europe/Berlin Time.local(2011, 10, 30, 2, 0, 0)."
exclude :test_europe_lisbon, "RangeError: bignum too big to convert into `long'"
exclude :test_localtime_zone, "<\"GMT+08:00\"> expected but was <\"PST\">."
exclude :test_utc_names, "ArgumentError: \"+HH:MM\", \"-HH:MM\", \"UTC\" or \"A\"..\"I\",\"K\"..\"Z\" expected for utc_offset: utc"
Loading