1.1 --- a/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java Thu Oct 11 04:11:42 2012 -0700
1.2 +++ b/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java Thu Oct 11 10:03:21 2012 -0700
1.3 @@ -130,7 +130,7 @@
1.4 .append(".prototype = new ").append(sc.getInternalName().replace('/', '_')).append(';');
1.5 }
1.6 for (Method m : jc.getMethods()) {
1.7 - if (!m.isStatic() && !m.isPrivate() && !m.getName().contains("<init>")) {
1.8 + if (!m.getName().contains("<init>") && !m.getName().contains("<cinit>")) {
1.9 compiler.generateMethodReference("\n " + className + ".prototype.", m);
1.10 }
1.11 }
1.12 @@ -828,7 +828,11 @@
1.13 }
1.14 final String in = mi.getClassName().getInternalName();
1.15 out.append(in.replace('/', '_'));
1.16 - out.append('_');
1.17 + if (isStatic) {
1.18 + out.append(".prototype.");
1.19 + } else {
1.20 + out.append('_');
1.21 + }
1.22 out.append(mn);
1.23 out.append('(');
1.24 String sep = "";