Skip to content

Commit

Permalink
Fix CompiledMethod>>callTarget
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Oct 20, 2024
1 parent 360bf42 commit ccbb6a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ protected static final Object doSendGeneric(final Node node, final AbstractSquea
final NativeObject selector = image.toInteropSelector(message);
final Object methodObject = lookupNode.executeLookup(node, classNode.executeLookup(node, receiver), selector);
if (methodObject instanceof final CompiledCodeObject method) {
assert message.getLibraryClass() == InteropLibrary.class;
final Object[] receiverAndArguments = new Object[message.getParameterCount()];
receiverAndArguments[0] = receiver;
for (int i = 0; i < arguments.length; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,13 @@ public Source getSource() {
return executionData.source;
}

// used by CompiledMethod>>callTarget
public RootCallTarget getCallTargetOrNull() {
return getExecutionData().callTarget;
if (hasExecutionData()) {
return executionData.callTarget;
} else {
return null;
}
}

public RootCallTarget getCallTarget() {
Expand Down

0 comments on commit ccbb6a3

Please sign in to comment.