2016-11-30 15:06:48 +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 h(y) {
|
|
|
|
return y.u;
|
|
|
|
}
|
2016-11-30 15:06:48 +00:00
|
|
|
|
2019-06-12 14:00:50 +00:00
|
|
|
function g() {
|
|
|
|
return h.apply(0, arguments);
|
|
|
|
}
|
2016-11-30 15:06:48 +00:00
|
|
|
|
|
|
|
function f(x) {
|
2019-06-12 14:00:50 +00:00
|
|
|
var o = {u: x};
|
2016-11-30 15:06:48 +00:00
|
|
|
return g(o);
|
2019-06-12 14:00:50 +00:00
|
|
|
};
|
|
|
|
%PrepareFunctionForOptimization(f);
|
2016-11-30 15:06:48 +00:00
|
|
|
f(42);
|
|
|
|
f(0.1);
|
|
|
|
|
|
|
|
%OptimizeFunctionOnNextCall(f);
|
|
|
|
|
|
|
|
assertEquals(undefined, f(undefined));
|