mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-08 07:54:11 -08:00
JS: fix bug in generating async functions in minified mode
This commit is contained in:
parent
1b2c47407f
commit
bc41b12f0e
|
@ -402,7 +402,7 @@ public class Renderer implements RenderingManager {
|
|||
throws IOException {
|
||||
boolean isAsync = asyncMethods.contains(clinit.getReference());
|
||||
|
||||
String clinitCalled = naming.getNameFor(cls.getName() + "_$clinitCalled");
|
||||
String clinitCalled = naming.getNameFor(cls.getName()) + "_$clinitCalled";
|
||||
if (isAsync) {
|
||||
writer.append("var ").append(clinitCalled).ws().append("=").ws().append("false;").softNewLine();
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ public class Renderer implements RenderingManager {
|
|||
writer.append(context.pointerName()).ws().append("=").ws().appendFunction("$rt_nativeThread")
|
||||
.append("().pop();").softNewLine();
|
||||
writer.outdent().append("}").ws();
|
||||
writer.append("else if").ws().append("(").appendClass(cls.getName()).append("_$clinitCalled)").ws()
|
||||
writer.append("else if").ws().append("(").append(clinitCalled).append(")").ws()
|
||||
.append("{").indent().softNewLine();
|
||||
writer.append("return;").softNewLine();
|
||||
writer.outdent().append("}").softNewLine();
|
||||
|
|
Loading…
Reference in New Issue
Block a user