regress-669024.js 461 Bytes
Newer Older
1 2 3 4 5 6
// 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

7 8 9
function h(y) {
  return y.u;
}
10

11 12 13
function g() {
  return h.apply(0, arguments);
}
14 15

function f(x) {
16
  var o = {u: x};
17
  return g(o);
18 19
};
%PrepareFunctionForOptimization(f);
20 21 22 23 24 25
f(42);
f(0.1);

%OptimizeFunctionOnNextCall(f);

assertEquals(undefined, f(undefined));