diff --git a/.idea/runConfigurations/run_tests.xml b/.idea/runConfigurations/run_tests.xml
index 6a09e8c49..ea56f5fb0 100644
--- a/.idea/runConfigurations/run_tests.xml
+++ b/.idea/runConfigurations/run_tests.xml
@@ -13,7 +13,7 @@
-
+
diff --git a/core/src/main/java/org/teavm/model/util/PhiUpdater.java b/core/src/main/java/org/teavm/model/util/PhiUpdater.java
index 2bc02d7e2..4101c9b0a 100644
--- a/core/src/main/java/org/teavm/model/util/PhiUpdater.java
+++ b/core/src/main/java/org/teavm/model/util/PhiUpdater.java
@@ -305,6 +305,9 @@ public class PhiUpdater {
for (int frontier : frontiers) {
BasicBlock frontierBlock = program.basicBlockAt(frontier);
+ if (frontierBlock.getExceptionVariable() == var) {
+ continue;
+ }
boolean exists = frontierBlock.getPhis().stream()
.flatMap(phi -> phi.getIncomings().stream())
diff --git a/core/src/main/java/org/teavm/vm/TeaVM.java b/core/src/main/java/org/teavm/vm/TeaVM.java
index feeabe4fd..f2b30ec62 100644
--- a/core/src/main/java/org/teavm/vm/TeaVM.java
+++ b/core/src/main/java/org/teavm/vm/TeaVM.java
@@ -598,7 +598,7 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
if (wasCancelled()) {
return;
}
- final Devirtualization devirtualization = new Devirtualization(dependency, classes);
+ Devirtualization devirtualization = new Devirtualization(dependency, classes);
int index = 0;
for (String className : classes.getClassNames()) {
ClassHolder cls = classes.get(className);
@@ -613,7 +613,7 @@ public class TeaVM implements TeaVMHost, ServiceRepository {
}
}
- final Inlining inlining = new Inlining();
+ Inlining inlining = new Inlining();
for (String className : classes.getClassNames()) {
ClassHolder cls = classes.get(className);
for (final MethodHolder method : cls.getMethods()) {
diff --git a/core/src/main/resources/org/teavm/javascript/runtime.js b/core/src/main/resources/org/teavm/javascript/runtime.js
index 41dbb0eea..ef9cb589e 100644
--- a/core/src/main/resources/org/teavm/javascript/runtime.js
+++ b/core/src/main/resources/org/teavm/javascript/runtime.js
@@ -81,25 +81,25 @@ if (typeof 'ArrayBuffer' !== 'undefined') {
return new ($rt_arraycls(cls))(nativeArray);
};
$rt_createCharArray = function(sz) {
- return $rt_createNumericArray($rt_charcls(), new Uint16Array(new ArrayBuffer(sz << 1)), 0);
+ return $rt_createNumericArray($rt_charcls(), new Uint16Array(sz));
};
$rt_createByteArray = function(sz) {
- return $rt_createNumericArray($rt_bytecls(), new Int8Array(new ArrayBuffer(sz)), 0);
+ return $rt_createNumericArray($rt_bytecls(), new Int8Array(sz));
};
$rt_createShortArray = function(sz) {
- return $rt_createNumericArray($rt_shortcls(), new Int16Array(new ArrayBuffer(sz << 1)), 0);
+ return $rt_createNumericArray($rt_shortcls(), new Int16Array(sz));
};
$rt_createIntArray = function(sz) {
- return $rt_createNumericArray($rt_intcls(), new Int32Array(new ArrayBuffer(sz << 2)), 0);
+ return $rt_createNumericArray($rt_intcls(), new Int32Array(sz));
};
$rt_createBooleanArray = function(sz) {
- return $rt_createNumericArray($rt_booleancls(), new Int8Array(new ArrayBuffer(sz)), 0);
+ return $rt_createNumericArray($rt_booleancls(), new Int8Array(sz));
};
$rt_createFloatArray = function(sz) {
- return $rt_createNumericArray($rt_floatcls(), new Float32Array(new ArrayBuffer(sz << 2)), 0);
+ return $rt_createNumericArray($rt_floatcls(), new Float32Array(sz));
};
$rt_createDoubleArray = function(sz) {
- return $rt_createNumericArray($rt_doublecls(), new Float64Array(new ArrayBuffer(sz << 3)), 0);
+ return $rt_createNumericArray($rt_doublecls(), new Float64Array(sz));
};
} else {
$rt_createNumericArray = function(cls, sz) {
diff --git a/tests/out/.gitignore b/tests/out/.gitignore
deleted file mode 100644
index a724cbb07..000000000
--- a/tests/out/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.js
-run-test.html
\ No newline at end of file
diff --git a/tests/src/test/java/org/teavm/classlib/java/io/BufferedReaderTest.java b/tests/src/test/java/org/teavm/classlib/java/io/BufferedReaderTest.java
index 7035d008d..10f71b540 100644
--- a/tests/src/test/java/org/teavm/classlib/java/io/BufferedReaderTest.java
+++ b/tests/src/test/java/org/teavm/classlib/java/io/BufferedReaderTest.java
@@ -23,10 +23,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
-/**
- *
- * @author Alexey Andreev
- */
@RunWith(TeaVMTestRunner.class)
public class BufferedReaderTest {
@Test
diff --git a/tests/src/test/java/org/teavm/classlib/java/lang/ThreadTest.java b/tests/src/test/java/org/teavm/classlib/java/lang/ThreadTest.java
index a2b548d77..1ac2e2404 100644
--- a/tests/src/test/java/org/teavm/classlib/java/lang/ThreadTest.java
+++ b/tests/src/test/java/org/teavm/classlib/java/lang/ThreadTest.java
@@ -19,11 +19,10 @@ import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.teavm.junit.TeaVMTestRunner;
-/**
- *
- * @author Alexey Andreev
- */
+@RunWith(TeaVMTestRunner.class)
public class ThreadTest {
@Test
public void sleeps() throws InterruptedException {
diff --git a/tests/src/test/java/org/teavm/classlib/java/util/TimeZoneTest.java b/tests/src/test/java/org/teavm/classlib/java/util/TimeZoneTest.java
index 664a85fe1..e42950863 100644
--- a/tests/src/test/java/org/teavm/classlib/java/util/TimeZoneTest.java
+++ b/tests/src/test/java/org/teavm/classlib/java/util/TimeZoneTest.java
@@ -27,10 +27,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
-/**
- *
- * @author Alexey Andreev
- */
@RunWith(TeaVMTestRunner.class)
public class TimeZoneTest {
private static final int ONE_HOUR = 3600000;
diff --git a/tests/src/test/java/org/teavm/classlib/java/util/zip/GZIPInputStreamTest.java b/tests/src/test/java/org/teavm/classlib/java/util/zip/GZIPInputStreamTest.java
index 3fdd24efa..49ad5a084 100644
--- a/tests/src/test/java/org/teavm/classlib/java/util/zip/GZIPInputStreamTest.java
+++ b/tests/src/test/java/org/teavm/classlib/java/util/zip/GZIPInputStreamTest.java
@@ -23,10 +23,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.teavm.junit.TeaVMTestRunner;
-/**
- *
- * @author Alexey Andreev
- */
@RunWith(TeaVMTestRunner.class)
public class GZIPInputStreamTest {
@Test
diff --git a/tests/src/test/java/org/teavm/platform/metadata/MetadataGeneratorTest.java b/tests/src/test/java/org/teavm/platform/metadata/MetadataGeneratorTest.java
index 5978940f3..5c1ae932b 100644
--- a/tests/src/test/java/org/teavm/platform/metadata/MetadataGeneratorTest.java
+++ b/tests/src/test/java/org/teavm/platform/metadata/MetadataGeneratorTest.java
@@ -21,10 +21,6 @@ import org.junit.runner.RunWith;
import org.teavm.junit.SkipJVM;
import org.teavm.junit.TeaVMTestRunner;
-/**
- *
- * @author Alexey Andreev
- */
@RunWith(TeaVMTestRunner.class)
@SkipJVM
public class MetadataGeneratorTest {
diff --git a/tests/src/test/java/org/teavm/tests/JSOTest.java b/tests/src/test/java/org/teavm/tests/JSOTest.java
index 7939384c6..5e9a14ef4 100644
--- a/tests/src/test/java/org/teavm/tests/JSOTest.java
+++ b/tests/src/test/java/org/teavm/tests/JSOTest.java
@@ -19,8 +19,11 @@ import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
import java.util.List;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.teavm.diagnostics.Problem;
import org.teavm.jso.JSBody;
+import org.teavm.junit.SkipJVM;
+import org.teavm.junit.TeaVMTestRunner;
import org.teavm.model.MethodReference;
import org.teavm.model.ValueType;
import org.teavm.vm.TeaVM;