v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
utils.cc
Go to the documentation of this file.
1
// Copyright 2022 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include "
src/compiler/turboshaft/utils.h
"
6
7
#include "
src/base/platform/platform.h
"
8
#include "
src/flags/flags.h
"
9
10
namespace
v8::internal::compiler::turboshaft
{
11
12
#ifdef DEBUG
13
bool
ShouldSkipOptimizationStep
() {
14
static
std::atomic<uint64_t> counter{0};
15
uint64_t current = counter++;
16
if
(current ==
v8_flags
.turboshaft_opt_bisect_break) {
17
base::OS::DebugBreak
();
18
}
19
if
(current >=
v8_flags
.turboshaft_opt_bisect_limit) {
20
return
true
;
21
}
22
return
false
;
23
}
24
#endif
// DEBUG
25
26
}
// namespace v8::internal::compiler::turboshaft
v8::base::OS::DebugBreak
static void DebugBreak()
Definition
platform-posix.cc:740
utils.h
flags.h
v8::internal::compiler::turboshaft
Definition
builtins.h:33
v8::internal::compiler::turboshaft::ShouldSkipOptimizationStep
V8_EXPORT_PRIVATE bool ShouldSkipOptimizationStep()
Definition
utils.h:84
v8::internal::v8_flags
V8_EXPORT_PRIVATE FlagValues v8_flags
platform.h
src
compiler
turboshaft
utils.cc
Generated on Sun Apr 6 2025 21:08:53 for v8 by
1.12.0