v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
feedback-source.cc
Go to the documentation of this file.
1
// Copyright 2019 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/feedback-source.h
"
6
7
namespace
v8
{
8
namespace
internal
{
9
namespace
compiler {
10
11
FeedbackSource::FeedbackSource
(
IndirectHandle<FeedbackVector>
vector_
,
12
FeedbackSlot
slot_)
13
: vector(
vector_
), slot(slot_) {
14
DCHECK
(!
slot
.
IsInvalid
());
15
}
16
17
FeedbackSource::FeedbackSource
(
FeedbackVectorRef
vector_
,
FeedbackSlot
slot_)
18
:
FeedbackSource
(
vector_
.object(), slot_) {}
19
20
int
FeedbackSource::index
()
const
{
21
CHECK
(
IsValid
());
22
return
FeedbackVector::GetIndex
(
slot
);
23
}
24
25
bool
operator==
(
FeedbackSource
const
& lhs,
FeedbackSource
const
& rhs) {
26
return
FeedbackSource::Equal
()(lhs, rhs);
27
}
28
29
bool
operator!=
(
FeedbackSource
const
& lhs,
FeedbackSource
const
& rhs) {
30
return
!(lhs == rhs);
31
}
32
33
std::ostream&
operator<<
(std::ostream& os,
const
FeedbackSource
& p) {
34
if
(p.
IsValid
()) {
35
return
os <<
"FeedbackSource("
<< p.
slot
<<
")"
;
36
}
37
return
os <<
"FeedbackSource(INVALID)"
;
38
}
39
40
}
// namespace compiler
41
}
// namespace internal
42
}
// namespace v8
v8::internal::FeedbackSlot
Definition
utils.h:641
v8::internal::FeedbackSlot::IsInvalid
bool IsInvalid() const
Definition
utils.h:649
v8::internal::FeedbackVector::GetIndex
static int GetIndex(FeedbackSlot slot)
Definition
feedback-vector.h:429
v8::internal::Handle
Definition
handles.h:149
v8::internal::compiler::FeedbackVectorRef
Definition
heap-refs.h:825
vector_
std::vector< T > vector_
Definition
sweeper.cc:212
feedback-source.h
v8::internal::compiler::operator!=
bool operator!=(DeoptimizeParameters lhs, DeoptimizeParameters rhs)
Definition
common-operator.cc:134
v8::internal::compiler::operator==
bool operator==(const BranchParameters &lhs, const BranchParameters &rhs)
Definition
common-operator.cc:66
v8::internal::compiler::operator<<
std::ostream & operator<<(std::ostream &os, AccessMode access_mode)
Definition
access-info.cc:74
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
CHECK
#define CHECK(condition)
Definition
logging.h:124
DCHECK
#define DCHECK(condition)
Definition
logging.h:482
v8::internal::compiler::FeedbackSource::Equal
Definition
feedback-source.h:33
v8::internal::compiler::FeedbackSource
Definition
feedback-source.h:15
v8::internal::compiler::FeedbackSource::IsValid
bool IsValid() const
Definition
feedback-source.h:21
v8::internal::compiler::FeedbackSource::FeedbackSource
FeedbackSource()
Definition
feedback-source.h:16
v8::internal::compiler::FeedbackSource::index
int index() const
Definition
feedback-source.cc:20
v8::internal::compiler::FeedbackSource::slot
FeedbackSlot slot
Definition
feedback-source.h:25
src
compiler
feedback-source.cc
Generated on Sun Apr 6 2025 21:08:51 for v8 by
1.12.0