diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-05-24 22:13:20 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-05-24 22:23:00 +0200 |
commit | 1db58b52e064579e857260de93e1a706a783a7e5 (patch) | |
tree | 69933f1052954b12f44ca8f9a5b050c9cef658aa /test/files/neg/t5440.scala | |
parent | 207e32df30fd733e4dd1cb28fb8cb5c3153c21a6 (diff) | |
download | scala-1db58b52e064579e857260de93e1a706a783a7e5.tar.gz scala-1db58b52e064579e857260de93e1a706a783a7e5.tar.bz2 scala-1db58b52e064579e857260de93e1a706a783a7e5.zip |
Debug flag to print a summary of the inliner's work
Example output below. Note that inlining List.map fails because the
trait forwarder uses `INVOKESPECIAL` for now, will change with pr 5177.
$ cat Test.scala
class C {
def foo = Map(1 -> 'a', 2 -> 'b')
def bar(l: List[Int]) = l.map(_ + 1)
}
$ qsc -Yopt-log-inline _ -Yopt:l:classpath Test.scala
Inlining into C.foo (initially 36 instructions, ultimately 72):
- Inlined scala/Predef$ArrowAssoc$.$minus$greater$extension (8 instructions) 2 times: the callee is annotated `@inline`
Inlining into C.bar (initially 12 instructions, ultimately 12):
- Failed to inline scala/collection/immutable/List.map (the callee is a higher-order method, the argument for parameter (bf: Function1) is a function literal): The callee scala/collection/immutable/List::map(Lscala/Function1;Lscala/collection/generic/CanBuildFrom;)Ljava/lang/Object; contains the instruction INVOKESPECIAL scala/collection/TraversableLike.map (Lscala/Function1;Lscala/collection/generic/CanBuildFrom;)Ljava/lang/Object;
that would cause an IllegalAccessError when inlined into class C.
Diffstat (limited to 'test/files/neg/t5440.scala')
0 files changed, 0 insertions, 0 deletions