summaryrefslogtreecommitdiff
path: root/test/files/run/t7852.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-09-17 15:43:13 +0200
committerJason Zaugg <jzaugg@gmail.com>2013-09-17 16:03:50 +0200
commit9fee7b6a2ac8663b0608b85001259320e1409a04 (patch)
tree3551b0f01c584566172438db32db508324fb633b /test/files/run/t7852.check
parent2bb960c68091b804d8ace1f76460279f6567a193 (diff)
downloadscala-9fee7b6a2ac8663b0608b85001259320e1409a04.tar.gz
scala-9fee7b6a2ac8663b0608b85001259320e1409a04.tar.bz2
scala-9fee7b6a2ac8663b0608b85001259320e1409a04.zip
SI-7852 Omit null check for "".==
Although the same the code would be later optimized by -Yconst-opt, we can offer the same lean byte code to those compiling without that option by being more discerning when translating ==. This helps people using bytecode based code coverage tools such as jacoco that would emit "branch not covered" warnings for the impossible null check.
Diffstat (limited to 'test/files/run/t7852.check')
-rw-r--r--test/files/run/t7852.check22
1 files changed, 5 insertions, 17 deletions
diff --git a/test/files/run/t7852.check b/test/files/run/t7852.check
index fdced88fa8..008639075a 100644
--- a/test/files/run/t7852.check
+++ b/test/files/run/t7852.check
@@ -2,29 +2,17 @@ class scala.tools.asm.tree.MethodNode
LDC ""
ALOAD 0
INVOKEVIRTUAL java/lang/Object.toString ()Ljava/lang/String;
- ASTORE 1
- DUP
- IFNONNULL L0
- POP
- ALOAD 1
- IFNULL L1
- GOTO L2
- L0
- FRAME FULL [Lean java/lang/String] [java/lang/String]
- ALOAD 1
INVOKEVIRTUAL java/lang/Object.equals (Ljava/lang/Object;)Z
- IFEQ L2
- L1
- FRAME SAME
+ IFEQ L0
ICONST_1
- GOTO L3
- L2
+ GOTO L1
+ L0
FRAME SAME
ICONST_0
- L3
+ L1
FRAME SAME1 I
POP
RETURN
MAXSTACK = 2
- MAXLOCALS = 2
+ MAXLOCALS = 1