v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
bytecode-liveness-map.cc
Go to the documentation of this file.
1
// Copyright 2016 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/bytecode-liveness-map.h
"
6
7
namespace
v8
{
8
namespace
internal
{
9
namespace
compiler {
10
11
std::string
ToString
(
const
BytecodeLivenessState
& liveness) {
12
std::string out;
13
out.resize(liveness.
register_count
() + 1);
14
for
(
int
i
= 0;
i
< liveness.
register_count
(); ++
i
) {
15
if
(liveness.
RegisterIsLive
(
i
)) {
16
out[
i
] =
'L'
;
17
}
else
{
18
out[
i
] =
'.'
;
19
}
20
}
21
if
(liveness.
AccumulatorIsLive
()) {
22
out[liveness.
register_count
()] =
'L'
;
23
}
else
{
24
out[liveness.
register_count
()] =
'.'
;
25
}
26
return
out;
27
}
28
29
}
// namespace compiler
30
}
// namespace internal
31
}
// namespace v8
bytecode-liveness-map.h
v8::internal::compiler::BytecodeLivenessState
Definition
bytecode-liveness-map.h:20
v8::internal::compiler::BytecodeLivenessState::register_count
int register_count() const
Definition
bytecode-liveness-map.h:104
v8::internal::compiler::BytecodeLivenessState::RegisterIsLive
bool RegisterIsLive(int index) const
Definition
bytecode-liveness-map.h:62
v8::internal::compiler::BytecodeLivenessState::AccumulatorIsLive
bool AccumulatorIsLive() const
Definition
bytecode-liveness-map.h:68
v8::internal::compiler::ToString
std::string ToString(const BytecodeLivenessState &liveness)
Definition
bytecode-liveness-map.cc:11
v8::internal
Definition
api-arguments-inl.h:20
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
src
compiler
bytecode-liveness-map.cc
Generated on Sun Apr 6 2025 21:08:51 for v8 by
1.12.0