From 949e3d2aa2134632c0043fb6ec164f3b68ee61a4 Mon Sep 17 00:00:00 2001 From: Volker Date: Sun, 15 Jul 2018 18:04:18 +0200 Subject: [PATCH] add method getCodePosition() --- .../inetsoftware/jwebassembly/module/WasmInstruction.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/de/inetsoftware/jwebassembly/module/WasmInstruction.java b/src/de/inetsoftware/jwebassembly/module/WasmInstruction.java index 607c385..be469ab 100644 --- a/src/de/inetsoftware/jwebassembly/module/WasmInstruction.java +++ b/src/de/inetsoftware/jwebassembly/module/WasmInstruction.java @@ -49,4 +49,12 @@ abstract class WasmInstruction { * if any I/O error occur */ abstract void writeTo( @Nonnull ModuleWriter writer ) throws IOException; + + /** + * Get current code position in Java method. + * @return the position + */ + int getCodePosition() { + return javaCodePos; + } }