// Copyright 2016 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.// Flags: --allow-natives-syntaxvaro={v:1};vardeopt=false;Object.defineProperty(o,"x",{get:function(){if(deopt)%DeoptimizeFunction(foo);return1;}});functionbar(x,y,z){returnx+z;}functionfoo(o,x){returnbar(1,(o[x],2),3);}assertEquals(4,foo(o,"v"));assertEquals(4,foo(o,"v"));assertEquals(4,foo(o,"x"));assertEquals(4,foo(o,"x"));%OptimizeFunctionOnNextCall(foo);deopt=true;assertEquals(4,foo(o,"x"));