Fix evaluation order with object spread (#11412)
* Fix object spread runtime semantics * limit this deoptimization * optimize empty objects * declare variables
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
var x;
|
||||
var y;
|
||||
var z;
|
||||
|
||||
z = { x, ...y };
|
||||
|
||||
z = { x, w: { ...y } };
|
||||
|
||||
@@ -4,6 +4,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
||||
|
||||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
||||
|
||||
var x;
|
||||
var y;
|
||||
var z;
|
||||
z = _objectSpread({
|
||||
x
|
||||
}, y);
|
||||
|
||||
Reference in New Issue
Block a user