2015-02-17 15:24:28 +00:00
|
|
|
// Copyright 2015 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-syntax
|
|
|
|
|
|
|
|
function f() {
|
|
|
|
return f.arguments;
|
|
|
|
}
|
|
|
|
|
|
|
|
function g(deopt) {
|
2019-06-12 14:00:50 +00:00
|
|
|
var o = {x: 2};
|
2015-02-17 15:24:28 +00:00
|
|
|
f();
|
|
|
|
o.x = 1;
|
|
|
|
deopt + 0;
|
|
|
|
return o.x;
|
2019-06-12 14:00:50 +00:00
|
|
|
};
|
|
|
|
%PrepareFunctionForOptimization(g);
|
2015-02-17 15:24:28 +00:00
|
|
|
g(0);
|
|
|
|
g(0);
|
|
|
|
%OptimizeFunctionOnNextCall(g);
|
|
|
|
assertEquals(1, g({}));
|