diff options
Diffstat (limited to 'deps/v8/test/mjsunit/regress/polymorphic-accessor-test-context.js')
-rw-r--r-- | deps/v8/test/mjsunit/regress/polymorphic-accessor-test-context.js | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/deps/v8/test/mjsunit/regress/polymorphic-accessor-test-context.js b/deps/v8/test/mjsunit/regress/polymorphic-accessor-test-context.js index 6188279248..e19540d649 100644 --- a/deps/v8/test/mjsunit/regress/polymorphic-accessor-test-context.js +++ b/deps/v8/test/mjsunit/regress/polymorphic-accessor-test-context.js @@ -4,20 +4,32 @@ // Flags: --allow-natives-syntax -function t1() { return this instanceof t1; } -function t2() { return this instanceof t2; } +function t1() { + return this instanceof t1; +} +function t2() { + return this instanceof t2; +} -var o1 = new (function() { })(); -Object.defineProperty(o1, "t", {get:function() { return this instanceof o1.constructor; }}); -var o2 = new (function() { })(); -Object.defineProperty(o2, "t", {get:function() { return this instanceof o1.constructor; }}); -var o3 = new (function() { })(); +var o1 = new function() {}(); +Object.defineProperty(o1, 't', { + get: function() { + return this instanceof o1.constructor; + } +}); +var o2 = new function() {}(); +Object.defineProperty(o2, 't', { + get: function() { + return this instanceof o1.constructor; + } +}); +var o3 = new function() {}(); o3.t = true; function f(o) { return 1 + (o.t ? 1 : 2); -} - +}; +%PrepareFunctionForOptimization(f); f(o1); f(o1); f(o2); |