Skip to content

Commit f313eb0

Browse files
committed
[GR-30679] Update graal to get the traversing compilation queue
PullRequest: truffleruby/2640
2 parents 31df24e + 6318384 commit f313eb0

File tree

7 files changed

+38
-22
lines changed

7 files changed

+38
-22
lines changed

common.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
"README": "This file contains definitions that are useful for the hocon and jsonnet CI files of multiple repositories.",
33

44
"jdks": {
5-
"openjdk8": {"name": "openjdk", "version": "8u292+09-jvmci-21.1-b05", "platformspecific": true },
6-
"oraclejdk8": {"name": "oraclejdk", "version": "8u291+10-jvmci-21.1-b05", "platformspecific": true },
7-
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u291+10-jvmci-21.1-b05-fastdebug", "platformspecific": true },
5+
"openjdk8": {"name": "openjdk", "version": "8u292+09-jvmci-21.2-b01", "platformspecific": true },
6+
"oraclejdk8": {"name": "oraclejdk", "version": "8u301+03-jvmci-21.2-b01", "platformspecific": true },
7+
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u301+03-jvmci-21.2-b01-fastdebug", "platformspecific": true },
88

99
"openjdk11": {"name": "openjdk", "version": "11.0.3+7", "platformspecific": true },
1010
"oraclejdk11": {"name": "oraclejdk", "version": "11.0.6+8", "platformspecific": true },
11-
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.11+8-jvmci-21.1-b05", "platformspecific": true },
12-
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.11+9-jvmci-21.1-b05", "platformspecific": true },
11+
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.11+8-jvmci-21.2-b01", "platformspecific": true },
12+
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.11+9-jvmci-21.2-b01", "platformspecific": true },
1313

1414
"oraclejdk16": {"name": "oraclejdk", "version": "16.0.1+4", "platformspecific": true },
15-
"labsjdk-ce-16": {"name": "labsjdk", "version": "ce-16.0.1+9-jvmci-21.1-b05", "platformspecific": true },
16-
"labsjdk-ce-16Debug": {"name": "labsjdk", "version": "ce-16.0.1+9-jvmci-21.1-b05-debug", "platformspecific": true },
17-
"labsjdk-ee-16": {"name": "labsjdk", "version": "ee-16.0.1+9-jvmci-21.1-b05", "platformspecific": true },
18-
"labsjdk-ee-16Debug": {"name": "labsjdk", "version": "ee-16.0.1+9-jvmci-21.1-b05-debug", "platformspecific": true }
15+
"labsjdk-ce-16": {"name": "labsjdk", "version": "ce-16.0.1+9-jvmci-21.2-b01", "platformspecific": true },
16+
"labsjdk-ce-16Debug": {"name": "labsjdk", "version": "ce-16.0.1+9-jvmci-21.2-b01-debug", "platformspecific": true },
17+
"labsjdk-ee-16": {"name": "labsjdk", "version": "ee-16.0.1+9-jvmci-21.2-b01", "platformspecific": true },
18+
"labsjdk-ee-16Debug": {"name": "labsjdk", "version": "ee-16.0.1+9-jvmci-21.2-b01-debug", "platformspecific": true }
1919
},
2020

2121
"COMMENT" : "The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in <jdk>/make/conf/jib-profiles.js)",
@@ -95,7 +95,8 @@
9595
},
9696
"windows": {
9797
"packages": {
98-
"msvc": "==10.0"
98+
"msvc": "==10.0",
99+
"pip:cmake": "==3.18.4"
99100
}
100101
}
101102
}

doc/contributor/interop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ exception like
5858
it raises corresponding Ruby exception available in `Truffle::Interop` module.
5959
The names are the same, e.g. `Truffle::Interop::UnsupportedMessageException`.
6060
These exceptions inherit from `Exception`, therefore they are not caught by
61-
default in `rescue` (which catches descendants of `StandardError`). Only `Truffle::Interop::ArityException`takes an
62-
argument, an `Integer` to describe the number of expected arguments.
61+
default in `rescue` (which catches descendants of `StandardError`). Only `Truffle::Interop::ArityException`takes
62+
arguments, two `Integer`s to describe the minimum and maximum number of expected arguments.
6363

6464
The detailed definitions of the behavior can be found in
6565
[another document](interop_details.md).

mx.truffleruby/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{
88
"name": "regex",
99
"subdir": True,
10-
"version": "e0247bb3d88bbbd888248a81110dc6ba20aac297",
10+
"version": "c7c061b3230852e9582badf788b3dab74a809ca9",
1111
"urls": [
1212
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
1313
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
@@ -16,7 +16,7 @@
1616
{
1717
"name": "sulong",
1818
"subdir": True,
19-
"version": "e0247bb3d88bbbd888248a81110dc6ba20aac297",
19+
"version": "c7c061b3230852e9582badf788b3dab74a809ca9",
2020
"urls": [
2121
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
2222
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},

src/main/java/org/truffleruby/core/exception/CoreExceptions.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,17 @@ public RubyException argumentError(int passed, int required, int optional, Node
209209
required + optional), currentNode);
210210
}
211211

212+
@TruffleBoundary
213+
public RubyException argumentErrorMinMaxArity(int passed, int minArity, int maxArity, Node currentNode) {
214+
if (minArity == maxArity) {
215+
return argumentError(passed, minArity, currentNode);
216+
} else if (maxArity < 0) {
217+
return argumentErrorPlus(passed, minArity, currentNode);
218+
} else {
219+
return argumentError(passed, minArity, maxArity - minArity, currentNode);
220+
}
221+
}
222+
212223
public RubyException argumentErrorEmptyVarargs(Node currentNode) {
213224
return argumentError(coreStrings().WRONG_ARGS_ZERO_PLUS_ONE.getRope(), currentNode, null);
214225
}

src/main/java/org/truffleruby/interop/TranslateInteropExceptionNode.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,10 @@ protected RuntimeException handle(ArityException exception, boolean inInvokeMemb
125125
@CachedContext(RubyLanguage.class) RubyContext context) {
126126
return new RaiseException(
127127
context,
128-
context.getCoreExceptions().argumentError(
128+
context.getCoreExceptions().argumentErrorMinMaxArity(
129129
exception.getActualArity(),
130-
exception.getExpectedArity(),
130+
exception.getExpectedMinArity(),
131+
exception.getExpectedMaxArity(),
131132
this),
132133
exception);
133134
}

src/main/java/org/truffleruby/interop/TranslateInteropRubyExceptionNode.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ protected AssertionError arityExceptionClass(
151151
@Cached DispatchNode dispatch,
152152
@Cached IntegerCastNode intCastNode,
153153
@Cached @Shared("logicalClassNode") LogicalClassNode logicalClassNode) throws ArityException {
154-
int expected = intCastNode.executeCastInt(dispatch.call(exception.getException(), "expected"));
155-
throw ArityException.create(expected, arguments.length, exception);
154+
int minExpected = intCastNode.executeCastInt(dispatch.call(exception.getException(), "min_expected"));
155+
int maxExpected = intCastNode.executeCastInt(dispatch.call(exception.getException(), "max_expected"));
156+
throw ArityException.create(minExpected, maxExpected, arguments.length, exception);
156157
}
157158

158159
@Specialization(

src/main/ruby/truffleruby/core/truffle/interop.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ class UnknownIdentifierException < InteropException; end
2323
class UnsupportedTypeException < InteropException; end
2424
class UnknownKeyException < InteropException; end
2525
class ArityException < InteropException
26-
attr_reader :expected
26+
attr_reader :min_expected, :max_expected
2727

28-
def initialize(expected)
29-
@expected = expected
30-
raise ArgumentError unless expected.is_a? Integer
28+
def initialize(min_expected, max_expected = min_expected)
29+
raise ArgumentError unless Primitive.object_kind_of?(min_expected, Integer)
30+
raise ArgumentError unless Primitive.object_kind_of?(max_expected, Integer)
31+
@min_expected = min_expected
32+
@max_expected = max_expected
3133
end
3234
end
3335

0 commit comments

Comments
 (0)