Merge branch 'master' into nio

This commit is contained in:
konsoletyper 2014-10-25 13:21:07 +04:00
commit f9cbcf4b80
3 changed files with 23 additions and 1 deletions

View File

@ -28,7 +28,7 @@ The easiest way to create a new TeaVM project is to type in the command line:
mvn -DarchetypeCatalog=local \
-DarchetypeGroupId=org.teavm \
-DarchetypeArtifactId=teavm-maven-webapp \
-DarchetypeVersion=0.2.0 archetype:generate
-DarchetypeVersion=0.2.1 archetype:generate
Now you can execute `mvn clean package` and get the generated `war` file.
Deploy this `war` in Tomcat or another container, or simply unzip it and open the `index.html` page.
@ -68,3 +68,9 @@ Another example is avaialble [here](http://graphhopper.com/teavm/).
It uses [GraphHopper](https://github.com/graphhopper/graphhopper/) to build route in browser.
Unlike original GraphHopper example it works completely in browser instead of querying server.
Thanks to [Peter Karich](https://github.com/karussell).
Feedback
--------
Ask your questions by email: info@teavm.org. Also you can report issues on a project's [issue tracker](https://github.com/konsoletyper/teavm/issues).

View File

@ -83,4 +83,17 @@ public class VMTest {
public void surrogateInStringLiteralsWork() {
assertEquals(0xDDC2, "a\uDDC2b".charAt(1));
}
@Test
public void separatesExceptionAndVariable() {
int n = foo();
try {
bar();
} catch (RuntimeException e) {
assertEquals(RuntimeException.class, e.getClass());
assertEquals(2, n);
}
}
private int foo() { return 2; }
private void bar() { throw new RuntimeException(); }
}

View File

@ -41,6 +41,9 @@ class InterferenceGraphBuilder {
for (BasicBlock succ : succExtractor.getTargets()) {
liveOut.or(liveness.liveIn(succ.getIndex()));
}
for (TryCatchBlock tryCatch : block.getTryCatchBlocks()) {
liveOut.or(liveness.liveIn(tryCatch.getHandler().getIndex()));
}
live.clear();
for (int j = 0; j < liveOut.length(); ++j) {
if (liveOut.get(j)) {