2014-03-04 08:08:08 +00:00
|
|
|
// Copyright 2014 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 baz(f) {
|
|
|
|
f();
|
|
|
|
}
|
2014-03-04 08:08:08 +00:00
|
|
|
function goo() {}
|
|
|
|
baz(goo);
|
|
|
|
baz(goo);
|
|
|
|
|
2019-06-12 14:00:50 +00:00
|
|
|
function bar(p) {
|
|
|
|
if (p == 0) baz(1);
|
|
|
|
};
|
|
|
|
%PrepareFunctionForOptimization(bar);
|
2014-03-04 08:08:08 +00:00
|
|
|
bar(1);
|
|
|
|
bar(1);
|
|
|
|
%OptimizeFunctionOnNextCall(bar);
|
|
|
|
bar(1);
|