v8/test/mjsunit/regress/regress-v8-13181.js
jameslahm 05b83dccba [snapshot] Clear pending_optimize_for_test_bytecode table
...to clear the recompilable code.

Bug: v8:13181
Change-Id: I6b78bbd2f08242fdd4659113ce1b4fa81174f8a2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3829243
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82610}
2022-08-22 09:06:05 +00:00

20 lines
427 B
JavaScript

// Copyright 2022 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 --stress-snapshot
function assertEquals(a, b) {
return true
}
function bar(x, y){
return [...x, y]
}
function foo(x) {
return bar`123${x}`
}
%PrepareFunctionForOptimization(foo);
assertEquals(["123", "", 1], foo(1));