You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove $t$ and $c$ if possible for those static fields
For Java code:
TestSS.bytes = new byte[10];
Early version of Java2Script compiler will generate codes as following:
($t$ = test.j2s.TestSS.bytes, test.j2s.TestSS.bytes = Clazz.newByteArray (10, 0), test.j2s.TestSS.prototype.bytes = test.j2s.TestSS.bytes, $t$);
From now on, by default, as .j2s configuration will be
j2s.compiler.static.quirks=disable
J2S compiler will generate codes as following:
test.j2s.TestSS.bytes = Clazz.newByteArray (10, 0);
Codes generated are much simpler.
To enable old quirks mode for static fields, add line:
j2s.compiler.static.quirks=enable
to .j2s file.
0 commit comments