prepack icon indicating copy to clipboard operation
prepack copied to clipboard

Writing to a "widened property" isn't serialized

Open sebmarkbage opened this issue 6 years ago • 0 comments

(function() {
  let a = global.__abstract ? __makeSimple(__abstract("array", "[1, 2, 3]")) : [1, 2, 3];
  let i = 0;

  var o = {x:0};
  do {
    i++;
    o.x = i;
  } while (o.x < a.length);

  var b = o.x;
  o.x = 123;

  result = b;
  result2 = o.x;
  result3 = o;

  inspect = function() {
    return o.x;
  }
})();

Widened properties gets a special value assigned to them but this value isn't temporal. Instead, we seem to assume that it won't be written to. Writes seem like they're not recorded.

This seems like a problem space related to snapshots.

sebmarkbage avatar Mar 11 '18 22:03 sebmarkbage