prepack
prepack copied to clipboard
Symbol properties not supported in loops
let a = global.__abstract ? __makeSimple(__abstract("array", "[1, 2, 3]")) : [1, 2, 3];
let i = 0;
var o = {x:0};
do {
i++;
o[Symbol.iterator] = i;
} while (i < a.length);
result = o;
I think the abstract interpretation doesn't support Symbols but more importantly all the places where we loop over properties in the serializer also excludes the special cases around widened values. https://github.com/facebook/prepack/blob/21fcfb2a0996abd2b90b61fb3ebd80bd3c9b8928/src/serializer/ResidualHeapSerializer.js#L250