summaryrefslogtreecommitdiff
path: root/test/files/run/t8601c.flags
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-05-18 12:01:17 +0200
committerJason Zaugg <jzaugg@gmail.com>2014-05-19 22:27:50 +0200
commitccc5eef051c8588c1fe4029e832d5b6387976aa6 (patch)
tree8bb35044f3f935e82c6db343252f970a3cf8953c /test/files/run/t8601c.flags
parent5b1d43d8ffda4b5881df7ce6634a7adebbb02f21 (diff)
downloadscala-ccc5eef051c8588c1fe4029e832d5b6387976aa6.tar.gz
scala-ccc5eef051c8588c1fe4029e832d5b6387976aa6.tar.bz2
scala-ccc5eef051c8588c1fe4029e832d5b6387976aa6.zip
SI-8601 Avoid over-eager optimization of LOAD_FIELD
It can NPE or trigger static class initilization, we can't elimiate it without changing semantics. To make sure we don't thwart closure elimination, I've allowed DCE to eliminate a non-static LOAD_FIELD of a member of a closure class. It would be more general to track nullity of the reciever (e.g, `this` or `new Foo` cannot be null), but that would require more infrastructure in this phase. I've added a test for closure inlining based on a a suggestion by @dragos. This actually passes if we remove the (LOAD_FIELD, DROP) peephole optimization for `closelim` altogether. But I chose to adapt that optimization (only allow it for non-static, closure fields), rather then remove it alogether, in the interests of treading lightly.
Diffstat (limited to 'test/files/run/t8601c.flags')
-rw-r--r--test/files/run/t8601c.flags1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/run/t8601c.flags b/test/files/run/t8601c.flags
new file mode 100644
index 0000000000..1182725e86
--- /dev/null
+++ b/test/files/run/t8601c.flags
@@ -0,0 +1 @@
+-optimize \ No newline at end of file