ref: 076fef88db990fb1dd8f0650d018035755d0d45b
parent: 37bfca6f1d5043a969104037a0dfc4f8956e7c77
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Jan 27 17:21:51 EST 2016
Only simplify empty array blobs to zero slices.
--- a/6/simp.c
+++ b/6/simp.c
@@ -1943,11 +1943,13 @@
switch (exprop(e)) {
case Oslice:
sub = e->expr.args[0];
- if (exprop(sub) == Oarr && sub->expr.nargs > 0) {
- e->expr.args[0] = simpblob(s, e->expr.args[0]);
- } else {
- e->expr.args[0] = mkintlit(e->loc, 0);
- e->expr.args[0]->expr.type = tyintptr;
+ if (exprop(sub) == Oarr) {
+ if (sub->expr.nargs > 0) {
+ e->expr.args[0] = simpblob(s, e->expr.args[0]);
+ } else {
+ e->expr.args[0] = mkintlit(e->loc, 0);
+ e->expr.args[0]->expr.type = tyintptr;
+ }
}
break;
case Oarr: