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 4ce9317 commit 1629c3e
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

1 comment on commit 1629c3e

@TruffleSqueak-Bot
Copy link

Choose a reason for hiding this comment

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

Performance Report (1629c3e)

Benchmarks ran on 22.0.2-graal.

Steady (after 100 iterations)

Benchmark Name Min Geomean Median Mean Max Total (ms) Total (min)
Bounce 516 525 519.09 517 519.08 103817 1.73
CD 487 499 490.69 488 490.67 98137 1.64
DeltaBlue 276 459 412.54 411.5 411.48 82507 1.38
Havlak 1112 1167 1143.21 1149 1143.13 228641 3.81
Json 383 392 385.93 384 385.92 77186 1.29
List 307 319 307.6 307 307.59 61519 1.03
Mandelbrot 127 142 127.77 127 127.75 25553 0.43
NBody 250 265 253.16 251 253.14 50632 0.84
Permute 154 170 155.65 155 155.63 31129 0.52
Queens 231 242 232.17 232 232.16 46433 0.77
Richards 1267 1303 1270.89 1269 1270.88 254178 4.24
Sieve 177 186 177.93 178 177.92 35586 0.59
Storage 144 154 145.76 144 145.73 29151 0.49
Towers 195 211 196.99 196 196.98 39398 0.66
5626 6034 5819.34 5808.5 5818.06 1163867 19.4

1629c3e-2-steady.svg

Warmup (first 100 iterations)

1629c3e-3-warmup.svg

Please sign in to comment.