- Notifications
You must be signed in to change notification settings - Fork31
Commitdb879f4
zhourenjian@gmail.com
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 bej2s.compiler.static.quirks=disableJ2S 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=enableto .j2s file.1 parent355a187 commitdb879f4
File tree
4 files changed
+467
-186
lines changed- sources/net.sf.j2s.core/src/net/sf/j2s/core
- astvisitors
- compiler
4 files changed
+467
-186
lines changed0 commit comments
Comments
(0)