2016-09-23 14:26:50 +00:00
|
|
|
// 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-syntax
|
|
|
|
|
2019-06-12 14:00:50 +00:00
|
|
|
function r(v) {
|
|
|
|
return v.f;
|
|
|
|
}
|
|
|
|
function h() {}
|
2016-09-23 14:26:50 +00:00
|
|
|
function y(v) {
|
|
|
|
var x = arguments;
|
|
|
|
h.apply(r(v), x);
|
|
|
|
};
|
2019-06-12 14:00:50 +00:00
|
|
|
%PrepareFunctionForOptimization(y);
|
|
|
|
;
|
|
|
|
y({f: 3});
|
|
|
|
y({f: 3});
|
|
|
|
y({f: 3});
|
2016-09-23 14:26:50 +00:00
|
|
|
|
|
|
|
%OptimizeFunctionOnNextCall(y);
|
|
|
|
|
2019-06-12 14:00:50 +00:00
|
|
|
y({f: 3, u: 4});
|