-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8357689: Refactor JVMCI to enable replay compilation in Graal #25433
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -289,17 +289,18 @@ public boolean equals(Object o) { | |
| if (o == this) { | ||
| return true; | ||
| } | ||
| if (o instanceof VirtualObject) { | ||
| VirtualObject l = (VirtualObject) o; | ||
| if (!l.type.equals(type) || l.values.length != values.length) { | ||
| if (o instanceof VirtualObject that) { | ||
| int thatValuesLength = (that.values == null) ? 0 : that.values.length; | ||
| int valuesLength = (values == null) ? 0 : values.length; | ||
| if (!that.type.equals(type) || thatValuesLength != valuesLength) { | ||
| return false; | ||
| } | ||
| for (int i = 0; i < values.length; i++) { | ||
| for (int i = 0; i < valuesLength; i++) { | ||
| /* | ||
| * Virtual objects can form cycles. Calling equals() could therefore lead to | ||
| * infinite recursion. | ||
| */ | ||
| if (!same(values[i], l.values[i])) { | ||
| if (!same(values[i], that.values[i])) { | ||
| return false; | ||
| } | ||
| } | ||
|
|
@@ -311,4 +312,11 @@ public boolean equals(Object o) { | |
| private static boolean same(Object o1, Object o2) { | ||
| return o1 == o2; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a copy of the array containing the Java kinds of the values stored in this virtual object. | ||
| */ | ||
| public JavaKind[] getSlotKinds() { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comments as for BytecodeFrame.getSlotKinds. This applies to all other non-primitive array return values added by this PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I left Edit: |
||
| return (slotKinds == null) ? null : slotKinds.clone(); | ||
| } | ||
| } | ||
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.
Keep in mind that
slotKindsis being converted to a List. In that context, can we return the list without making a copy? Or is the caller expected to be able to mutate the return value?Uh oh!
There was an error while loading. Please reload this page.
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.
Applied the changes provided by @mur47x111.