1.1 --- a/rt/vm/src/main/java/org/apidesign/vm4brwsr/Bck2Brwsr.java Wed Mar 11 18:58:39 2015 +0100
1.2 +++ b/rt/vm/src/main/java/org/apidesign/vm4brwsr/Bck2Brwsr.java Thu Mar 12 10:32:13 2015 +0100
1.3 @@ -19,6 +19,7 @@
1.4
1.5 import java.io.IOException;
1.6 import java.io.InputStream;
1.7 +import org.apidesign.vm4brwsr.ByteCodeParser.MethodData;
1.8
1.9 /** Build your own virtual machine! Use methods in this class to generate
1.10 * a skeleton JVM in JavaScript that contains pre-compiled classes of your
1.11 @@ -420,9 +421,9 @@
1.12 * @since 0.15
1.13 */
1.14 public static final class Flow {
1.15 - private final byte[] byteCode;
1.16 - Flow(byte[] byteCode) {
1.17 - this.byteCode = byteCode;
1.18 + private final MethodData m;
1.19 + Flow(MethodData m) {
1.20 + this.m = m;
1.21 }
1.22
1.23 /** Access to bytecode of the method to analyse.
1.24 @@ -430,7 +431,14 @@
1.25 * @return unmodifiable bytecode of the instructions in the method body
1.26 */
1.27 public byte[] getMethodByteCode() {
1.28 - return byteCode;
1.29 + return m.getCode();
1.30 + }
1.31 +
1.32 + /** Name of the method that is being processed.
1.33 + * @return simple method name
1.34 + */
1.35 + public String getMethodName() {
1.36 + return m.getName();
1.37 }
1.38
1.39 public void registerCycle(int offset) {