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
7function g() {
8  this.x = {};
9}
10
11function f() {
12  new g();
13}
14
15function deopt(x) {
16  %DeoptimizeFunction(f);
17}
18
19f();
20f();
21%OptimizeFunctionOnNextCall(f);
22Object.prototype.__defineSetter__('x', deopt);
23f();
24