mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
JS: fix array optimization
This commit is contained in:
parent
93d807809d
commit
b2b7a603b4
|
@ -697,7 +697,9 @@ class OptimizingVisitor implements StatementVisitor, ExprVisitor {
|
|||
return false;
|
||||
}
|
||||
optimization.unwrappedArrayVariable = ((VariableExpr) assign.getLeftValue()).getIndex();
|
||||
if (writeFrequencies[optimization.unwrappedArrayVariable] != 1) {
|
||||
if (writeFrequencies[optimization.unwrappedArrayVariable] != 1
|
||||
|| preservedVars[optimization.unwrappedArrayVariable]
|
||||
|| readFrequencies[optimization.unwrappedArrayVariable] != optimization.arraySize) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ import net.java.html.json.tests.KnockoutTest;
|
|||
import net.java.html.json.tests.MinesTest;
|
||||
import net.java.html.json.tests.OperationsTest;
|
||||
import net.java.html.json.tests.WebSocketTest;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.teavm.junit.SkipJVM;
|
||||
|
@ -35,7 +34,6 @@ import org.teavm.junit.WholeClassCompilation;
|
|||
@RunWith(TeaVMTestRunner.class)
|
||||
@SkipJVM
|
||||
@WholeClassCompilation
|
||||
@Ignore
|
||||
public class KnockoutTCKTest {
|
||||
private final ConvertTypesTest convertTypesTest = new ConvertTypesTest();
|
||||
private final JSONTest jsonTest = new JSONTest();
|
||||
|
|
Loading…
Reference in New Issue
Block a user