| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --allow-natives-syntax | 5 "use strict"; |
| 6 | 6 var s = ""; |
| 7 var o = {} | 7 for (var i = 16; i < 1085; i++) { |
| 8 Object.defineProperty(o, "z", { | 8 s += ("var a" + i + " = " + i + ";"); |
| 9 set: function() { | |
| 10 %DeoptimizeFunction(f); | |
| 11 }, | |
| 12 }); | |
| 13 | |
| 14 function f(o) { | |
| 15 return 19 + (void(o.z = 12)); | |
| 16 } | 9 } |
| 17 | 10 s += "const x = 10;" + |
| 18 f(o); | 11 "assertEquals(10, x); x = 11; assertEquals(11, x)"; |
| 12 assertThrows(function() { eval(s); }); |
| OLD | NEW |