1.1 --- a/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java Tue Jan 15 12:44:33 2013 +0100
1.2 +++ b/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeToJavaScript.java Fri Jan 18 17:04:16 2013 +0100
1.3 @@ -926,7 +926,7 @@
1.4 case 11: jvmType = "[J"; break;
1.5 default: throw new IllegalStateException("Array type: " + atype);
1.6 }
1.7 - emit(out, "@2 = new Array(@1).initWith('@3', 0);",
1.8 + emit(out, "@2 = Array.prototype.newArray__Ljava_lang_Object_2ZLjava_lang_String_2I(true, '@3', @1);",
1.9 smapper.popI(), smapper.pushA(), jvmType);
1.10 break;
1.11 case opc_anewarray: {
1.12 @@ -938,7 +938,7 @@
1.13 } else {
1.14 typeName = "[L" + typeName + ";";
1.15 }
1.16 - emit(out, "@2 = new Array(@1).initWith('@3', null);",
1.17 + emit(out, "@2 = Array.prototype.newArray__Ljava_lang_Object_2ZLjava_lang_String_2I(false, '@3', @1);",
1.18 smapper.popI(), smapper.pushA(), typeName);
1.19 break;
1.20 }