-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
Expand file tree
/
Copy pathregress-417768368.js
More file actions
36 lines (31 loc) · 736 Bytes
/
regress-417768368.js
File metadata and controls
36 lines (31 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright 2025 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
function bar(a) {
function in_bar(a, b) {
a % b; // This emit a generic mod that can throw.
return a;
}
%PrepareFunctionForOptimization(in_bar);
in_bar({});
if (a) {
throw_before_this_function_is_not_defined();
}
}
function foo() {
try {
function const_42() {
return 42;
}
%PrepareFunctionForOptimization(const_42);
const_42();
bar(true);
} catch {
}
}
%PrepareFunctionForOptimization(bar);
%PrepareFunctionForOptimization(foo);
foo();
%OptimizeMaglevOnNextCall(foo);
foo();