2018-01-24 20:16:06 +01:00
|
|
|
// Copyright 2017 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.
|
|
|
|
|
2018-12-04 08:20:37 +01:00
|
|
|
// Flags: --allow-natives-syntax
|
2018-01-24 20:16:06 +01:00
|
|
|
|
2021-08-29 14:20:49 +02:00
|
|
|
function foo() { %ToLength(42n) }
|
2019-03-15 18:35:06 +05:30
|
|
|
%PrepareFunctionForOptimization(foo);
|
2018-01-24 20:16:06 +01:00
|
|
|
assertThrows(foo, TypeError);
|
|
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
|
|
assertThrows(foo, TypeError);
|