2015-08-25 06:24:40 +00:00
|
|
|
// Copyright 2015 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.
|
|
|
|
|
2017-07-13 11:22:37 +00:00
|
|
|
// Flags: --allow-natives-syntax
|
2015-08-25 06:24:40 +00:00
|
|
|
|
|
|
|
function foo(x) { Math.fround(x); }
|
2019-03-01 10:19:54 +00:00
|
|
|
%PrepareFunctionForOptimization(foo);
|
2015-08-25 06:24:40 +00:00
|
|
|
foo(1);
|
|
|
|
foo(2);
|
|
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
|
|
assertThrows(function() { foo(Symbol()) }, TypeError);
|