Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: seba--/layout-parsing
...
head fork: seba--/layout-parsing
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
5 jsglr-layout/test/org/spoofax/jsglr_layout/tests/haskell/HaskellParser.java
@@ -114,10 +114,15 @@ public Object call() throws BadTokenException, TokenExpectedException, ParseExce
} catch (OutOfMemoryError e1) {
thread.stop();
System.err.println("heap overflow: " + filename);
+ throw e1;
}
endParse = startParse - 1;
} catch (InterruptedException e) {
endParse = startParse - 1;
+ } catch (OutOfMemoryError e) {
+ thread.stop();
+ System.err.println("heap overflow: " + filename);
+ throw e;
} finally {
if (endParse == -1)
endParse = System.nanoTime();
View
5 jsglr-orig/test/org/spoofax/jsglr_orig/tests/haskell/HaskellParser.java
@@ -106,10 +106,15 @@ public Object call() throws BadTokenException, TokenExpectedException, ParseExce
} catch (OutOfMemoryError e1) {
thread.stop();
System.err.println("heap overflow: " + filename);
+ throw e1;
}
endParse = startParse - 1;
} catch (InterruptedException e) {
endParse = startParse - 1;
+ } catch (OutOfMemoryError e) {
+ thread.stop();
+ System.err.println("heap overflow: " + filename);
+ throw e;
} finally {
if (endParse == -1)
endParse = System.nanoTime();
View
7 test-hackage/src/org/spoofax/jsglr/tests/haskell/TestAllPackages.java
@@ -19,6 +19,8 @@
private File csvDir;
private File csvFile;
+ private int warmupCount = 0;
+
public void warmup() throws IOException {
String[] warmupPackages = new String[] {
"matlab",
@@ -31,10 +33,13 @@ public void warmup() throws IOException {
"mdo",
};
- FileResultObserver observer = new FileResultObserver() { public void observe(FileResult result) { } };
+
+ FileResultObserver observer = new FileResultObserver() { public void observe(FileResult result) { warmupCount++; } };
for (String pkg : warmupPackages)
new TestPackage().testPackage(pkg, observer);
+
+ System.out.println("Warmed up with " + warmupCount + " files.");
}
public void testAllPackages() throws IOException {
View
6 test-hackage/src/org/spoofax/jsglr/tests/haskell/TestFile.java
@@ -159,6 +159,8 @@ private IStrategoTerm oldParse(File f, String pkg) {
} catch (InterruptedException e) {
throw new RuntimeException(e);
+ } catch (OutOfMemoryError e) {
+ result.outOfMemory.t1 = true;;
} catch (ExecutionException e) {
if (e.getCause() instanceof org.spoofax.jsglr_orig.shared.SGLRException) {
result.parseExceptions.t1 = e.getCause().getMessage();
@@ -222,6 +224,8 @@ private IStrategoTerm newParseCorrectness(File f, String pkg) {
result.stackOverflow.t2 = false;
} catch (InterruptedException e) {
throw new RuntimeException(e);
+ } catch (OutOfMemoryError e) {
+ result.outOfMemory.t2 = true;;
} catch (ExecutionException e) {
if (e.getCause() instanceof SGLRException) {
result.parseExceptions.t2 = e.getCause().getMessage();
@@ -284,6 +288,8 @@ private IStrategoTerm newParseSpeed(File f, String pkg) {
result.stackOverflow.t3 = false;
} catch (InterruptedException e) {
throw new RuntimeException(e);
+ } catch (OutOfMemoryError e) {
+ result.outOfMemory.t3 = true;;
} catch (ExecutionException e) {
if (e.getCause() instanceof SGLRException) {
result.parseExceptions.t3 = e.getCause().getMessage();

No commit comments for this range

Something went wrong with that request. Please try again.