2019-02-26 13:41:03 +00:00
|
|
|
// Copyright 2019 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 --opt
|
|
|
|
|
|
|
|
function foo(t) { return 'a'.concat(t); }
|
|
|
|
|
2019-05-03 14:32:12 +00:00
|
|
|
%PrepareFunctionForOptimization(foo);
|
2019-02-26 13:41:03 +00:00
|
|
|
foo(1);
|
|
|
|
foo(1);
|
|
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
|
|
foo(1);
|
2019-06-17 11:48:08 +00:00
|
|
|
%PrepareFunctionForOptimization(foo);
|
2019-02-26 13:41:03 +00:00
|
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
|
|
foo(1);
|
|
|
|
assertOptimized(foo);
|