| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Flags: --allow-natives-syntax | |
| 6 | |
| 7 function t1() { return this instanceof t1; } | |
| 8 function t2() { return this instanceof t2; } | |
| 9 | |
| 10 var o1 = new (function() { })(); | |
| 11 Object.defineProperty(o1, "t", {get:function() { return this instanceof o1.const
ructor; }}); | |
| 12 var o2 = new (function() { })(); | |
| 13 Object.defineProperty(o2, "t", {get:function() { return this instanceof o1.const
ructor; }}); | |
| 14 var o3 = new (function() { })(); | |
| 15 o3.t = true; | |
| 16 | |
| 17 function f(o) { | |
| 18 return 1 + (o.t ? 1 : 2); | |
| 19 } | |
| 20 | |
| 21 f(o1); | |
| 22 f(o1); | |
| 23 f(o2); | |
| 24 %OptimizeFunctionOnNextCall(f); | |
| 25 f(o3); | |
| OLD | NEW |