-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Parallel lock free testing, remove potential deadlocks, cache static data, go to descriptor via test #3752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Parallel lock free testing, remove potential deadlocks, cache static data, go to descriptor via test #3752
Changes from 8 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
84c9780
Implement fast parallel lock-free in-process testing for Java
KvanTTT e942e1a
Add final modifier to all static fields where it's possible
KvanTTT 36b885c
Remove doubtful and not used static fields
KvanTTT 4ccbb41
Fix potential deadlocks in Java runtime
KvanTTT dbce6b2
Unify C#, C++, Dart, Go, Python runtimes
KvanTTT 8861ac4
Use AtomicInteger instead of int for static PredictionContext.globalN…
KvanTTT 3c30268
Remove lock in Generator (now ANTLR tool is thread-safe)
KvanTTT 7c5b3c2
Cache templates for codegen to static field, load only one time
KvanTTT f19cd67
Cache LeftRecursiveRules.stg to static field
KvanTTT 6681a7a
Cache ANTLR error message templates to static field
KvanTTT 93970f4
Cache runtime test templates to static field
KvanTTT 1b9d77c
Clarify message of failed runtime tests
KvanTTT 99fab5c
Pass testSourceUri to dynamicTest and to dynamicContainer for conveni…
KvanTTT 8e6e1ed
Extract prepareGrammars method
KvanTTT 2e8e3a8
Remove useless and outdated files
KvanTTT 22cbf3c
Update pom.xml in runtime-testsuite
KvanTTT d287f1c
Use runtimePath instead of targetClassesPath for runtimes' sources
KvanTTT f235d33
Update doc
KvanTTT d40067d
Fix potential problems with concurrent access to hash maps
KvanTTT de255cc
Restore info about `mvn -Dtest=java.** test` in antlr-project-testing.md
KvanTTT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
runtime-testsuite/resources/org/antlr/v4/test/runtime/helpers/RuntimeTestLexer.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import org.antlr.v4.runtime.CharStream; | ||
import org.antlr.v4.runtime.Lexer; | ||
|
||
public abstract class RuntimeTestLexer extends Lexer { | ||
protected java.io.PrintStream outStream = System.out; | ||
|
||
public RuntimeTestLexer(CharStream input) { super(input); } | ||
|
||
public void setOutStream(java.io.PrintStream outStream) { this.outStream = outStream; } | ||
} |
14 changes: 14 additions & 0 deletions
14
runtime-testsuite/resources/org/antlr/v4/test/runtime/helpers/RuntimeTestParser.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import org.antlr.v4.runtime.Parser; | ||
import org.antlr.v4.runtime.TokenStream; | ||
|
||
public abstract class RuntimeTestParser extends Parser { | ||
protected java.io.PrintStream outStream = System.out; | ||
|
||
public RuntimeTestParser(TokenStream input) { | ||
super(input); | ||
} | ||
|
||
public void setOutStream(java.io.PrintStream outStream) { | ||
this.outStream = outStream; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
runtime-testsuite/test/org/antlr/v4/test/runtime/GeneratedFile.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.antlr.v4.test.runtime; | ||
|
||
public class GeneratedFile { | ||
public final String name; | ||
public final boolean isParser; | ||
|
||
public GeneratedFile(String name, boolean isParser) { | ||
this.name = name; | ||
this.isParser = isParser; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return name + "; isParser:" + isParser; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.