-
Notifications
You must be signed in to change notification settings - Fork 1.9k
CompilerConfiguration: clarify indy is always on #2319
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
Open
+6
-12
Open
CompilerConfiguration: clarify indy is always on #2319
Changes from all commits
Commits
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
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 |
|---|---|---|
|
|
@@ -51,7 +51,7 @@ | |
| */ | ||
| public class CompilerConfiguration { | ||
|
|
||
/** Optimization Option for enabling invokedynamic compilation. */ |
||
/** Optimization Option for enabling invokedynamic compilation. Since 4.0 always enabled. */ |
||
| public static final String INVOKEDYNAMIC = "indy"; | ||
|
|
||
| /** Optimization Option for enabling attaching groovydoc as AST node metadata. */ | ||
|
|
@@ -1282,8 +1282,9 @@ public void setBytecodePostprocessor(final BytecodeProcessor bytecodePostprocess | |
| } | ||
|
|
||
| /** | ||
| * Checks if invoke dynamic is enabled. | ||
| * Checks if invoke dynamic is enabled. Since 4.0 this is always true. | ||
| */ | ||
| @Deprecated | ||
| public boolean isIndyEnabled() { | ||
| return !Boolean.FALSE.equals(getOptimizationOptions().get(INVOKEDYNAMIC)); | ||
| } | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -42,8 +42,6 @@ Basic < |
|
|
|
||
| You can learn more about this version in the https://groovy-lang.org/releasenotes/groovy-{groovy-short-ve rsion}.html[release notes] or in the https://groovy-lang.org/changelogs/changelog-{groovy-full-version}.html[changelog]. | ||
|
|
||
| If you plan on using invokedynamic support, link:invokedynamic-support.html[read those notes]. | ||
|
|
||
| === Snapshots | ||
|
|
||
| For those who want to test the very latest versions of Groovy and live on the bleeding edge, you can use our https://repository.apache.org/content/groups/snapshots/org/a pache/groovy[snapshot builds]. | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -2258,11 +2258,5 @@ statically compiled code and dynamic code is barely noticeable. On highly CPU in | |
| is generated is very close, if not equal, to the one that Java would produce for an equivalent program, the performance | ||
| is greatly improved. | ||
|
|
||
| TIP: Using the _invokedynamic_ version of Groovy, which is accessible to people using JDK 7 and above, the performance | ||
| of the dynamic code should be very close to the performance of statically compiled code. Sometimes, it can even be faster! | ||
| There is only one way to determine which version you should choose: measuring. The reason is that depending on your program | ||
| *and* the JVM that you use, the performance can be significantly different. In particular, the _invokedynamic_ version of | ||
| Groovy is very sensitive to the JVM version in use. | ||
|
|
||
| include::_type-checking-extensions.adoc[leveloffset=+1] | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -31,6 +31,8 @@ This means that unlike APIs, AST transformations or syntactic sugar, this featur | |
| - it is possible to mix classes compiled with and without invokedynamic in the same project, as long as you run JDK 1.7+ | ||
| - depending on the JVM (even different minor versions of the JVM), you can target close to Java performance for dynamic Groovy with invokedynamic support activated | ||
|
|
||
| https://groovy-lang.org/releasenotes/groovy-4.0.html#Groovy4.0-indy-only[Since Groovy 4.0] Invoke Dynamic is always enabled, indy jars are not distributed, and the Groovy runtime still contains any necessary support for classes compiled using older versions of Groovy. | ||
|
|
||
| == The distributions | ||
|
|
||
| === Two jars | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -103,8 +103,7 @@ listed; defaults to no. |No | |
| |stacktrace |if true each compile error message will contain a | ||
| stacktrace |No | ||
|
|
||
| |indy |Enable compilation with the ``invoke dynamic'' support when using | ||
| Groovy 2.0 and beyond and running on JDK 7 |No | ||
| |indy |Not used since Groovy 4.0 |No | ||
|
|
||
| |scriptBaseClass |Sets the base class for Groovy scripts |No | ||
|
|
||
|
|
||
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.