Skip to content

Commit b4d59eb

Browse files
committed
Directly use WasmInstrumentationSupportNode as WasmNotifyFunction.
1 parent 7f20ae3 commit b4d59eb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

wasm/src/org.graalvm.wasm/src/org/graalvm/wasm/nodes/WasmInstrumentableFunctionNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public InstrumentableNode materializeInstrumentableNodes(Set<Class<? extends Tag
207207
final CodeEntry bcInfo = bytecodePair.getLeft();
208208
final byte[] bytecode = bytecodePair.getRight();
209209
final WasmFunctionNode<?> functionNodeDuplicate = new WasmFunctionNode<>(functionNode, bytecode,
210-
bcInfo.bytecodeStartOffset(), bcInfo.bytecodeEndOffset(), bcInfo.exceptionTableOffset(), support::notifyLine);
210+
bcInfo.bytecodeStartOffset(), bcInfo.bytecodeEndOffset(), bcInfo.exceptionTableOffset(), support);
211211
return new WasmInstrumentableFunctionNode(this, functionNodeDuplicate, support);
212212
}
213213
} finally {

wasm/src/org.graalvm.wasm/src/org/graalvm/wasm/nodes/WasmInstrumentationSupportNode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
* Represents the statements in the source file of a wasm binary. Provides some helper methods to
5959
* interact with the instrumentation system.
6060
*/
61-
public final class WasmInstrumentationSupportNode extends Node {
61+
public final class WasmInstrumentationSupportNode extends Node implements WasmNotifyFunction {
6262
@Children private final WasmBaseStatementNode[] statementNodes;
6363

6464
private int sourceLocation;
@@ -78,6 +78,7 @@ public WasmInstrumentationSupportNode(DebugLineSection lineSection, Source sourc
7878
}
7979
}
8080

81+
@Override
8182
public void notifyLine(VirtualFrame frame, int currentLineIndex, int nextLineIndex, int currentSourceLocation) {
8283
CompilerAsserts.partialEvaluationConstant(currentLineIndex);
8384
CompilerAsserts.partialEvaluationConstant(nextLineIndex);

0 commit comments

Comments
 (0)