soywiz-archive / jtransc

Bytecode to source converting Java & Kotlin code into JavaScript, C++, D, C#, PHP, AS3, Dart and Haxe and run it everywhere. Also use JVM code in your favourite language as a library.
https://jtransc.soywiz.com/
Apache License 2.0
632 stars 67 forks source link

Stress test #168

Closed ghost closed 7 years ago

ghost commented 7 years ago

I write stress test https://github.com/jtransc/jtransc-examples/pull/14 for #165, but find new bug with haxe. Execute command C:\tools\HaxeToolkit\haxe\haxelib run lime test cpp -debug -Dsource-header=0

src/z/TZC.hx:10: lines 10-15 : A class constructor can't have a return value
                                                                             src/z/DC.hx:24: characters 31-33 : Module z.STD is loaded with a different case than z.Std
src/z/VE.hx:2980: characters 25-42 : Binding new is only allowed on class types
src/z/VE.hx:2980: characters 25-42 : For function argument 'value'
src/z/O.hx:12698: characters 2-23 : Binding new is only allowed on class types

Reproduced on both os: windows and mac

ghost commented 7 years ago

If remove in test

        ddd.method4();
        ddd.method5();
        ddd.method6();

then error: rc/z/ZWD.hx:7: characters 12-15 : Unexpected new

soywiz commented 7 years ago

Check again. This should be fixes already. That was related to a three-letter keyword that was used when generating minimized names

soywiz commented 7 years ago

Also I have done some work to reduce complexity of some generated big methods. Which may be enough for your huge case. If it is not, please tell me and I will try to improve it further.