Decreasing the number of lines of core bck2brwsr.js to be under 65636. Should help debugging on Nashorn as it has problems with lines numbers over 16-bit numbers.
authorJaroslav Tulach <jaroslav.tulach@apidesign.org>
Tue, 29 Apr 2014 16:28:06 +0200
changeset 1510b242abb07fbf
parent 1509 16f50abb439b
child 1511 1200ad163e2c
Decreasing the number of lines of core bck2brwsr.js to be under 65636. Should help debugging on Nashorn as it has problems with lines numbers over 16-bit numbers.
rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java
     1.1 --- a/rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java	Tue Apr 29 16:22:23 2014 +0200
     1.2 +++ b/rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java	Tue Apr 29 16:28:06 2014 +0200
     1.3 @@ -366,6 +366,7 @@
     1.4          int topMostLabel = 0;
     1.5          for (int i = 0; i < byteCodes.length; i++) {
     1.6              int prev = i;
     1.7 +            outChanged = false;
     1.8              stackMapIterator.advanceTo(i);
     1.9              boolean changeInCatch = trap.advanceTo(i);
    1.10              if (changeInCatch || lastStackFrame != stackMapIterator.getFrameIndex()) {
    1.11 @@ -1338,7 +1339,9 @@
    1.12              if (debug(" //")) {
    1.13                  generateByteCodeComment(prev, i, byteCodes);
    1.14              }
    1.15 -            append("\n");            
    1.16 +            if (outChanged) {
    1.17 +                append("\n");
    1.18 +            }
    1.19          }
    1.20          if (previousTrap != null) {
    1.21              generateCatch(previousTrap, byteCodes.length, topMostLabel);