diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2015-03-11 16:45:20 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2015-03-11 16:45:20 -0700 |
commit | fa33395a25c87115c910e8d4a4124aee6134062b (patch) | |
tree | 85d1cfc85783c5fdd0debe50e530b93dce72dc48 /test/files/run | |
parent | e8e9c0d6b9181be657a1d28eef9f999cb26df9e5 (diff) | |
parent | 42054a1bebcc2155f773787ffda781b497d4178b (diff) | |
download | scala-fa33395a25c87115c910e8d4a4124aee6134062b.tar.gz scala-fa33395a25c87115c910e8d4a4124aee6134062b.tar.bz2 scala-fa33395a25c87115c910e8d4a4124aee6134062b.zip |
Merge pull request #4377 from lrytz/opt/scalaInlineInfo
Emit the ScalaInlineInfo attribute under GenASM
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t7974.check | 23 | ||||
-rw-r--r-- | test/files/run/t7974/Test.scala | 14 |
2 files changed, 10 insertions, 27 deletions
diff --git a/test/files/run/t7974.check b/test/files/run/t7974.check index d8152d3286..4eae5eb152 100644 --- a/test/files/run/t7974.check +++ b/test/files/run/t7974.check @@ -1,19 +1,3 @@ -public class Symbols { - - - - - // access flags 0x12 - private final Lscala/Symbol; someSymbol3 - - // access flags 0xA - private static Lscala/Symbol; symbol$1 - - // access flags 0xA - private static Lscala/Symbol; symbol$2 - - // access flags 0xA - private static Lscala/Symbol; symbol$3 // access flags 0x9 public static <clinit>()V @@ -33,6 +17,7 @@ public class Symbols { MAXSTACK = 2 MAXLOCALS = 0 + // access flags 0x1 public someSymbol1()Lscala/Symbol; GETSTATIC Symbols.symbol$1 : Lscala/Symbol; @@ -40,6 +25,7 @@ public class Symbols { MAXSTACK = 1 MAXLOCALS = 1 + // access flags 0x1 public someSymbol2()Lscala/Symbol; GETSTATIC Symbols.symbol$2 : Lscala/Symbol; @@ -47,6 +33,7 @@ public class Symbols { MAXSTACK = 1 MAXLOCALS = 1 + // access flags 0x1 public sameSymbol1()Lscala/Symbol; GETSTATIC Symbols.symbol$1 : Lscala/Symbol; @@ -54,6 +41,7 @@ public class Symbols { MAXSTACK = 1 MAXLOCALS = 1 + // access flags 0x1 public someSymbol3()Lscala/Symbol; ALOAD 0 @@ -62,6 +50,7 @@ public class Symbols { MAXSTACK = 1 MAXLOCALS = 1 + // access flags 0x1 public <init>()V ALOAD 0 @@ -72,4 +61,4 @@ public class Symbols { RETURN MAXSTACK = 2 MAXLOCALS = 1 -} + diff --git a/test/files/run/t7974/Test.scala b/test/files/run/t7974/Test.scala index 29d2b9cb64..296ec32ee2 100644 --- a/test/files/run/t7974/Test.scala +++ b/test/files/run/t7974/Test.scala @@ -1,20 +1,14 @@ -import java.io.PrintWriter; +import java.io.PrintWriter import scala.tools.partest.BytecodeTest +import scala.tools.nsc.backend.jvm.AsmUtils import scala.tools.asm.util._ import scala.tools.nsc.util.stringFromWriter +import scala.collection.convert.decorateAsScala._ object Test extends BytecodeTest { def show { val classNode = loadClassNode("Symbols", skipDebugInfo = true) - val textifier = new Textifier - classNode.accept(new TraceClassVisitor(null, textifier, null)) - - val classString = stringFromWriter(w => textifier.print(w)) - val result = - classString.split('\n') - .dropWhile(elem => elem != "public class Symbols {") - .filterNot(elem => elem.startsWith(" @Lscala/reflect/ScalaSignature") || elem.startsWith(" ATTRIBUTE ScalaSig")) - result foreach println + classNode.methods.asScala.foreach(m => println(AsmUtils.textify(m))) } } |