-
Notifications
You must be signed in to change notification settings - Fork 321
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
Upgrade to GraalVM 22.3.0 #3663
Conversation
engine/runtime/src/main/scala/org/enso/compiler/codegen/IrToTruffle.scala
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this as long as it works and does not cause performance regressions :)
engine/runtime/src/main/java/org/enso/interpreter/node/ClosureRootNode.java
Outdated
Show resolved
Hide resolved
CI run shows that the |
Formatting CI check seems to be using GraalVM 21.3 instead of 22.1. Ccing @mwu-tow ... |
Right. The reason why this particular test does not work is that the default implementation of NodeLibrary ( DefaultfNodeExports$DefaultScope.readMember ) reads only auxiliary slots from the frame, but ignores all the indexed slots. For, now deprecated, FrameSlot it was OK, because the default implementation just traversed all the FrameSlots. We have to correctly implement this behavior by exporting scope messages from NodeLibrary in BaseNode or ExpressionNode. The getScope message would return a TruffleObject representing a scope that would export all member and scope messages from InteropLibrary, where there are parent scopes, among other things. I suggest we ignore, or provide a quick fix, for this test for now, and create a follow-up issue to implement variable displaying in the Truffle debugger properly. |
The workflow has hardcoded GraalVM version, it needs to be bumped as well. You don't need to do this for my build-script-based workflows, as the build script parses |
Checking the failures is see two: Great job! Looks like you'll be able to merge soon. |
Removed spurious invocations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions but LGTM otherwise. Also, slightly changed sbt to avoid multiple installations of native-image
engine/runtime/src/main/scala/org/enso/compiler/pass/analyse/AliasAnalysis.scala
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/interpreter/runtime/scope/LocalScope.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/interpreter/runtime/scope/LocalScope.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/interpreter/runtime/scope/LocalScope.scala
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/scala/org/enso/interpreter/runtime/scope/LocalScope.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Hubert Plociniczak <hubert.plociniczak@gmail.com>
Co-authored-by: Hubert Plociniczak <hubert.plociniczak@gmail.com>
…org/enso into wip/enso/UpdateGraalVM22_182845176
- Display local variables from current method. - Display local variables of callers.
42ae57d
to
7283444
Compare
139cb9c
to
8581038
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seems that each GraalVM update is becoming increasingly harder. Happy that it is finally done ❤️
engine/runtime/src/main/scala/org/enso/interpreter/runtime/scope/LocalScope.scala
Outdated
Show resolved
Hide resolved
…org/enso into wip/enso/UpdateGraalVM22_182845176
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits
@@ -63,7 +79,11 @@ public void setSourceLocation(int sourceStartIndex, int sourceLength) { | |||
*/ | |||
@Override | |||
public SourceSection getSourceSection() { | |||
return EnsoRootNode.findSourceSection(getRootNode(), sourceStartIndex, sourceLength); | |||
if (this instanceof ExpressionNodeWrapper wrapper) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a isWrapper
method that does this instance check and it seems that in unwrapDelegate
we don't mind casting the node so maybe stick to one style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably. But then I don't get this fancy Java pattern matching instanceof. Nevertheless, I would not bother with this code that much, as it will probably be rewritten within a few weeks, once I get to a more proper support for debugging.
engine/runtime/src/main/java/org/enso/interpreter/runtime/scope/DebugLocalScope.java
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/scope/DebugLocalScope.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/scope/DebugLocalScope.java
Outdated
Show resolved
Hide resolved
engine/runtime/src/main/java/org/enso/interpreter/runtime/scope/DebugLocalScope.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
lazy val installNativeImage = taskKey[Unit]("Install native-image GraalVM component") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic already is present in the RRust build script, if you use it to enter sbt
shell then you'll have native-image installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just recently noticed that. Nevertheless we still need installGraalJs
, as it is not shipped by default in the latest GraalVM release. Moreover, this task does not install anything, if native-image
is already installed. The same is true for installGraalJs
. Besides, I don't know how other engine devs, but I don't usually use the rust build script, I just use sbt
, which makes these two tasks very convenient.
Pull Request Description
Upgrading to GraalVM 22.3.0.
Important Notes
FrameSlot
, and replaced them with frame indexes - integers.AliasAnalysis
so that it also gathers these indexes.native-image
as default for non-release buildsgraaljs
andnative-image
should now be downloaded viagu
automatically, as dependencies.engine-runner-native
project - native image is now build straight fromengine-runner
.engine-runner-native
withoutsqldf
in classpath as a workaround for an internal native image bug.NullPointerException
is thrown and no values are displayed.native-image
optionsChecklist
Please include the following checklist in your PR:
Scala,
Java,
and
Rust
style guides.
./run ide build
and./run ide watch
.