| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Make InlinerHeuristics a backend component like the others, instead
of nested within the Inliner component.
|
|
|
|
| |
The new optimizer doesn't have this problem.
|
|
|
|
|
|
|
|
|
| |
Before this change, with `-Yopt-warnings:at-inline-failed` or with
the default options, the inliner would emit inline warnings for failed
attempts of callsites that are not annotated @inline.
A test for this change follows in a later commit, after enabling the
new inliner heuristic for higher-order methods.
|
|
|
|
|
| |
Remember in the call graph if a function literal is passed as an
argument to a higher-order function.
|
|
|
|
|
| |
For higher order methods, the call graph contains a map from
parameter positions to SAM types.
|
|
|
|
|
|
|
|
|
|
|
|
| |
After inlining, inlined callsites are added to the call graph.
For efficiency, the callsites of the callee are copied and adapted
(the alternative would be to re-add the entire method to the call
graph, which involves running data flow analyses).
If the callee is in a class parsed from bytecode (vs a class being
compiled), it might not yet be in the call graph. This commit ensures
that the method is added to the call graph before looking for its
callsites.
|
|
|
|
|
|
|
|
| |
Inline requests have a list of post-inline requests: callsites within
the inlined method that should be inlined into the initial callee.
This commit changes the inliner to actually perform post-inline
requests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The computed value was too large previously: inlining stores receiver
and argument values of the inlined method into locals.
A too large value doesn't cause any bugs, but data flow analyses would
allocate too large frames.
The test (InlinerTest.maxLocalsMaxStackAfterInline) didn't catch the
bug because it tested the methods of the wrong ClassNode. The
CodeGenTools.compileClasses method returns a ClassNode that is created
from the classfile byte array emitted by the compiler. This ClassNode
is a new object and unrelated to the ClassNode used in the compiler
backend. The test now takes the correct ClassNode from the hash map in
the backend's byteCodeRepository.
|
|
|
|
|
| |
Avoid producing inline requests for callsites in classes on the
classpath.
|
|
|
|
|
|
|
|
|
| |
An inline request contains a callsite and a list of post-inlining
requests. A post-inlining request asks to inline an invocation that
is copied from the callee into the callsite method while inlining the
initial callsite.
Post-inlining requests are still ignored for now.
|
| |
|
|
|
|
|
| |
If a class (trait) is a SAM type, store the name and descriptor of the
SAM in the ClassBType's InlineInfo.
|
|
|
|
|
|
|
|
|
| |
Store classes being compiled in a separate hash map. This allows
efficiently traversing all classes being compiled. It also simplifies
limiting the size of the cache of class nodes parsed from classfiles.
Also change the cache of class nodes parsed from classfiles to LRU
instead of FIFO.
|
| |
|
|
|
|
|
|
| |
Change the hash maps in the call graph to index callsites and
closure instantiations by the containing method. This is beneficial
for implementing inliner heuristics and the closure optimizer.
|
| |
|
|\
| |
| | |
SI-6938 Use mutable red-black tree in `mutable.TreeSet`
|
| |
| |
| |
| |
| |
| |
| |
| | |
The previous implementation of `mutable.TreeSet` uses a mutable reference to an immutable red-black tree as its underlying data structure. That leads to unnecessary objects being created, which can be a problem in systems with limited resources. It also has reduced performance when compared with common mutable implementations.
In this commit `mutable.TreeSet` is changed so that it uses the recently created `mutable.RedBlackTree` as its underlying data structure. Specialized red-black tree methods were created for working with keys for efficiency reasons. The new implementation is source-compatible with the previous one, although its serialized representation obviously changes.
Closes [SI-6938](https://issues.scala-lang.org/browse/SI-6938).
|
|\ \
| | |
| | | |
SI-8554 Two-arg remove now throws exception on overly-large count
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ListBuffer now throws exceptions like other buffers do when trying to index out of range.
Also harmonized the order of testing (`count < 0` tested before `n` in range).
Test in scala-collection-laws (gated by SI8554 flag). Also modified test in run/t6634.scala
|
|\ \ \
| | | |
| | | | |
SI-9270 Default xml coalescing off in 2.12
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
By default, `-Xxml:-coalescing` as of 2.12.
This commit corrects the default for future versions.
|
|\ \ \ \
| | | | |
| | | | | |
SI-9426 Rename the argument f of LinearSeqOptimized.foldLeft/foldRight to op
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
scaladoc
|
| |/ / /
| | | |
| | | |
| | | | |
accordance with scaladoc
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Transcript:
```
➜ scala git:(2.12.x) export MB=$(git merge-base 2.12.x 2.11.x)
➜ scala git:(2.12.x) echo $MB
0e9525aa618a2eca143a1c7379ff1e6efd23b86e
➜ scala git:(2.12.x) g log --oneline --graph $MB...2.11.x
```
Read this upside down :-). The last merge comes first,
with merge commands interspersed in the git log.
```
➜ scala git:(2.12.x) g merge 2.11.x
Auto-merging versions.properties
Auto-merging src/reflect/scala/reflect/internal/pickling/UnPickler.scala
Auto-merging src/reflect/scala/reflect/internal/Types.scala
Auto-merging src/reflect/scala/reflect/internal/TreeGen.scala
Auto-merging src/library/scala/collection/immutable/Stream.scala
Auto-merging src/library/scala/collection/convert/Wrappers.scala
Auto-merging build.xml
CONFLICT (content): Merge conflict in build.xml
Auto-merging README.md
Automatic merge failed; fix conflicts and then commit the result.
```
```
* 928e6892d4 (scala/2.11.x, 2.11.x) Merge pull request #4682 from adriaanm/jline-quick.bin
|\
| * b763dbf368 (adriaanm/jline-quick.bin, jline-quick.bin) Include jline on quick.bin tool path
* | ccded7d179 Merge pull request #4680 from janekdb/2.11.x-option
|\ \
| |/
|/|
| * 58ae3e51f7 Delegate null test to Option
|/
* a745f06e35 Merge pull request #4670 from retronym/ticket/9422
|\
| * ec95e534a2 SI-9422 Fix incorrect constant propagation
* 65fa73dff3 Merge pull request #4669 from janekdb/2.11.x-scaladoc-reflect
|\
| * e206a1837d ScalaDoc fixes for reflect
* | 8e7e3b4a5f Merge pull request #4667 from janekdb/2.11.x-scaladoc-library-library-aux
|\ \
| |/
|/|
| * 69c2c106fe ScalaDoc fixes for library and library-aux
* | 7de4cbc5e5 Merge pull request #4665 from lrytz/asm-504-3
|\ \
| * | cdc55c29d0 Upgrade scala-asm to 5.0.4-scala-3
|/ /
* | d8da39a197 Merge pull request #4661 from retronym/ticket/9365
|\ \
| * | 0c99742c51 SI-9365 Don't null out dependencies of transient lazy vals
| /
* | 2279d3f3d9 Merge pull request #4662 from janekdb/2.11.x-redundant-val-modifier
|\ \
| * | 173a6fad95 Remove redundant 'val' from case class params.
* | | e0d21432d6 Merge pull request #4664 from SethTisue/remove-dead-link-in-readme
|\ \ \
| |_|/
|/| |
| * | 600fc4e6e1 fix readme for death of typesafe.artifactoryonline.com
| |/
* | 7492bda816 Merge pull request #4636 from SethTisue/contributor-stuff-from-github-wiki
|\ \
| |/
|/|
| * ed5098dbc4 merge two reviewers lists in readme
| * e136e4ad47 tighten up CONTRIBUTING.md a little
| * f9ca6863d4 readme/contributor's guide tweaks
| * 80e98b03a1 tiny readme fix
| * 197845620c merge in text from pull request policy from old wiki
| * e93ca409ae drop in pull request policy from old wiki
| * 951939d1b3 contributor guide: add a morsel salvaged from GitHub wiki
* f682441f6f Merge pull request #4653 from lrytz/t9403
|\
| * 2678d349b2 SI-9403 fix ICodeReader for negative BIPUSH / SIPUSH values
```
```
➜ scala git:(2.12.x) g merge -s ours f2d7838d90
Merge made by the 'ours' strategy.
```
```
* f2d7838d90 Merge pull request #4657 from lrytz/backports
|\
| * 241bb9ac19 Rename the ENUM / DEFAULTMETHOD flags to include JAVA_
| * 7a7f9927c3 SI-9393 fix modifiers of ClassBTypes for Java annotations
| * 8946d60bd2 [backport] Fix bytecode stability when running the closure optimizer
| * 3b6b2bfe9f [backport] SI-9392 Clarify the workaround comment and introduce a devWarning
| * 091c1e6ed8 [backport] SI-9392 Avoid crash in GenBCode for incoherent trees
| * 6177cb4481 [backport] SI-9393 Temporarily disable two assertions in GenBCode
| * a1d471f7ba [backport] Refactor the ClosureOptimizer, run ProdCons only once per method
| * f5e72765f2 [backport] SI-9387 Fix VerifyError introduced by indylambda
| * 41b99e2531 [backport] Integrate the LMFInvokeDynamic extractor into LambdaMetaFactoryCall
| * fc1cda2118 [backport] Small refactoring to the closure optimizer
| * 8f272c0ad2 [backport] Accessibility checks for methods with an InvokeDynamic instruction
| * 1c1d8259b5 [backport] Fix bytecode stability
| * ef9d845676 [backport] Support methodHandle / invokeDynamic constant pool entries in scalap
| * 60747c7555 [backport] Skip mirror class when invoking deserializeLambda
| * 404e86239e [backport] Prevent infinite recursion in ProdConsAnalyzer
| * 1b0703e74d [backport] SI-9376 don't crash when inlining a closure body that throws.
| * e511375a90 [backport] Fix superclass for Java interface symbols created in JavaMirrors
| * 1b57723169 [backport] `deserializeLambda` should not use encoded class name
| * 8bafa8ed88 [backport] Java parser: default methods in interfaces are not `DEFERRED`
| * 44e2761a9b [backport] SI-6613 fixed in GenBCode
```
```
➜ scala git:(2.12.x) g merge 4c6dcfe934
Auto-merging src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala
Auto-merging doc/License.rtf
Auto-merging doc/LICENSE.md
Auto-merging build.xml
Auto-merging build.sbt
Merge made by the 'recursive' strategy.
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
build.sbt | 2 +-
build.xml | 2 +-
doc/LICENSE.md | 4 ++--
doc/License.rtf | 4 ++--
src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala | 2 +-
src/scalap/decoder.properties | 2 +-
6 files changed, 8 insertions(+), 8 deletions(-)
```
```
* | 4c6dcfe934 Merge pull request #4656 from lrytz/filtersOpenJDK
|\ \
| |/
|/|
| * 0b35bc29aa Ignore OpenJDK warnings in partest filters
* 6eb0812050 Merge pull request #4644 from SethTisue/copyright-2015
* e0aac7c9ef bump copyright year to 2015
```
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Option(null) is None while Option(v) is Some(v) which makes the null
test redundant.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-9422 Fix incorrect constant propagation
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The ConstantOptimization phase uses abstract interpretation
to track what is known about values, and then to use this information
to optimize away tests with a statically known result.
Constant propagation was added under -optimize in Scala 2.11.0-M3, in
PR #2214.
For example, we might know that a variable must hold one of a set
of values (`Possible`). Or, we could track that it must *not*
be of of a set of value (`Impossible`).
The test case in the bug report was enough to create comparison:
v1 == v2 // where V1 = Possible(Set(true, false))
// V2 = Possible(Set(true, false))
This test was considered to be always true, due to a bug in
`Possible#mightNotEqual`. The only time we can be sure that
`Possible(p1) mightNotEquals Possible(p2)` is if
`p1` and `p2` are the same singleton set. This commit changes
this method to implement this logic.
The starting assumption for all values is currently
`Impossible(Set())`, although it would also be reasonable to represent
an unknown boolean variable as `Possible(Set(true, false))`, given
the finite and small domain.
I tried to change the starting assumption for boolean locals in
exactly this manner, and that brings the bug into sharp focus.
Under this patch:
https://github.com/retronym/scala/commit/e564fe522d
This code:
def test(a: Boolean, b: Boolean) = a == b
Compiles to:
public boolean test(boolean, boolean);
Code:
0: iconst_1
1: ireturn
Note: the enclosed test case does not list `-optimize` in a `.flags`
file, I'm relying on that being passed in by the validation build.
I've tested locally with that option, though.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
ScalaDoc fixes for reflect
|
| | | | | | | |
|
| |\ \ \ \ \ \
| | |/ / / / /
| |/| | | | | |
ScalaDoc fixes for library and library-aux
|
| | | | | | | |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-9365 Don't null out dependencies of transient lazy vals
|
| | | |/ / / /
| | |/| | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
As per Iulian's analysis:
> When lazy vals are transient, the optimization in SI-720 is invalid,
> leading to NPEs.
These NPEs appear when recomputing the lazy val when deserializaing
the object.
This commit disables the field nulling if the lazy val is marked
transient.
The post-mixin tree in the enclosed test changes as follows:
```
--- sandbox/old.log 2015-07-27 15:48:03.000000000 +1000
+++ sandbox/new.log 2015-07-27 15:47:56.000000000 +1000
@@ -1,61 +1,54 @@
[[syntax trees at end of mixin]] // t9365.scala
package <empty> {
class Test extends Object with Serializable {
@transient @volatile private[this] var bitmap$trans$0: Boolean = false;
private def foo$lzycompute(): Object = {
{
Test.this.synchronized({
if (Test.this.bitmap$trans$0.unary_!())
{
Test.this.foo = Test.this.x.apply();
Test.this.bitmap$trans$0 = true;
()
};
scala.runtime.BoxedUnit.UNIT
});
- Test.this.x = null
+ ()
};
Test.this.foo
};
```
In addition to the test from the ticket, I've added a reflection
based test that directly tests the nulling. This complements the
test added in 449f2a7473, the fix for SI-720, which passes by
virtue of not exhausting the heap.
|
| | |/ / / /
| |/| | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-9403 fix ICodeReader for negative BIPUSH / SIPUSH values
|
| | |/ / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The byte value of a BIPUSH instruction and the (byte1 << 8) | byte2
value of a SIPUSH instruction are signed, see [1] and [2].
Similar for the increment value of IINC [3].
[1] https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.bipush
[2] https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.sipush
[3] https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.iinc
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Similar to the new JAVA_ANNOTATION flag, be more explicit about flags
for java entities.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The Scala classfile and java source parsers make Java annotation
classes (which are actually interfaces at the classfile level) look
like Scala annotation classes:
- the INTERFACE / ABSTRACT flags are not added
- scala.annotation.Annotation is added as superclass
- scala.annotation.ClassfileAnnotation is added as interface
This makes type-checking @Annot uniform, whether it is defined in Java
or Scala.
This is a hack that leads to various bugs (SI-9393, SI-9400). Instead
the type-checking should be special-cased for Java annotations.
This commit fixes SI-9393 and a part of SI-9400, but it's still easy
to generate invalid classfiles. Restores the assertions that were
disabled in #4621. I'd like to leave these assertions in: they
are valuable and helped uncovering the issue being fixed here.
A new flag JAVA_ANNOTATION is introduced for Java annotation
ClassSymbols, similar to the existing ENUM flag. When building
ClassBTypes for Java annotations, the flags, superclass and interfaces
are recovered to represent the situation in the classfile.
Cleans up and documents the flags space in the area of "late" and
"anti" flags.
The test for SI-9393 is extended to test both the classfile and the
java source parser.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fixes the stability regression introduced by #4619.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
A macro in shapeless was generating a tree of the form:
```
{
class C#2
new C#2
}.setType(C#1)
```
This happened due to an error in the macro; it used untypecheck
to try to fix the owner-chain consistency problem, but kept a
reference to the previous version of the block-local class symbol
`C` and used this in the resulting tree.
This commit detects the particular situation we encountered, and
avoids the crash by not creating the `NestedInfo` for the
`BType` corresponding to `C#1`. The code comment discusses why I
think this is safe, and suggests a refactoring that would mean
we only ever try to construct `NestedInfo` when we are going to
need them.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
These cause a crash in the build of Play. We should try to bring
these back once we have suitable annotation awareness. Perhaps
they should only be `devWarning`-s, though.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Refactor and clean up the ClosureOptimzier. The goal of this change
is to run the ProdCons analyzer only once per method, instead of
once per closure instantiation.
Bootstrapping scala with `-Yopt-inline-heuristics:everything` revealed
that ProdCons can take a very long time on large methods, for example
```
[quick.compiler] scala/tools/nsc/backend/jvm/BCodeBodyBuilder$PlainBodyBuilder#genArithmeticOp - analysis: 1 spans, 17755ms
[quick.compiler] scala/tools/nsc/typechecker/SuperAccessors$SuperAccTransformer#transform - analysis: 1 spans, 28024ms
[quick.compiler] scala/tools/nsc/backend/jvm/BCodeBodyBuilder$PlainBodyBuilder#genInvokeDynamicLambda - analysis: 1 spans, 22100ms
```
With this change and enough time and space (-Xmx6000m), bootstrapping
scala succeeds in this test mode.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
As with regular `Apply`-s, we should compute the generated type
based on the function's type, rather than the expected type.
In the test case, the expected type was void. Now, we correctly
use the generated type of `scala/Function1`, which is enough
to generate a subsequent POP instruction.
The tree shape involved was:
```
arg0 = {
{
$anonfun()
};
scala.runtime.BoxedUnit.UNIT
}
```
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Introduces an extractor `LMFInvokeDynamic` that matches InvokeDynamic
instructions that are LambdaMetaFactory calls.
The case class `LambdaMetaFactoryCall` holds such an InvokeDynamic
instruction. It also holds the bootstrap arguments (samMethodType,
implMethod, instantiatedMethodType) so that they can be accessed
without casting the indy.bsmArgs.
The `closureInstantiations` map in the call graph now stores
ClosureInstantiation objects instead of a tuple.
This simplifies some code and gets rid of a few casts.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Implements the necessary tests to check if a method with an
InvokeDynamic instruction can be inlined into a destination class.
Only InvokeDynamic instructions with LambdaMetaFactory as bootstrap
methods can be inlined. The accessibility checks cannot be implemented
generically, because it depends on what the bootstrap method is doing.
In particular, the bootstrap method receives a Lookup object as
argument which can be used to access private methods of the class
where the InvokeDynamic method is located.
A comment in the inliner explains the details.
|