Skip to content

Commit

Permalink
8340587: Optimize StackMapGenerator$Frame::checkAssignableTo
Browse files Browse the repository at this point in the history
Reviewed-by: liach
  • Loading branch information
wenshao committed Sep 25, 2024
1 parent 9bcc7b6 commit 2d38af6
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1095,11 +1095,15 @@ void copyFrom(Frame src) {
}

void checkAssignableTo(Frame target) {
int localsSize = this.localsSize;
int stackSize = this.stackSize;
if (target.flags == -1) {
target.locals = locals == null ? null : Arrays.copyOf(locals, localsSize);
target.locals = locals == null ? null : locals.clone();
target.localsSize = localsSize;
target.stack = stack == null ? null : Arrays.copyOf(stack, stackSize);
target.stackSize = stackSize;
if (stackSize > 0) {
target.stack = stack.clone();
target.stackSize = stackSize;
}
target.flags = flags;
target.dirty = true;
} else {
Expand Down

1 comment on commit 2d38af6

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.