v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
feedback-source.h
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#ifndef V8_COMPILER_FEEDBACK_SOURCE_H_
6#define V8_COMPILER_FEEDBACK_SOURCE_H_
7
10
11namespace v8 {
12namespace internal {
13namespace compiler {
14
18 FeedbackSlot slot_);
20
21 bool IsValid() const { return !vector.is_null() && !slot.IsInvalid(); }
22 int index() const;
23
26
27 struct Hash {
28 size_t operator()(FeedbackSource const& source) const {
29 return base::hash_combine(source.vector.address(), source.slot);
30 }
31 };
32
33 struct Equal {
34 bool operator()(FeedbackSource const& lhs,
35 FeedbackSource const& rhs) const {
36 return lhs.vector.equals(rhs.vector) && lhs.slot == rhs.slot;
37 }
38 };
39};
40
41bool operator==(FeedbackSource const&, FeedbackSource const&);
42bool operator!=(FeedbackSource const&, FeedbackSource const&);
43
44V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
45 FeedbackSource const&);
46inline size_t hash_value(const FeedbackSource& value) {
48}
49
50} // namespace compiler
51} // namespace internal
52} // namespace v8
53
54#endif // V8_COMPILER_FEEDBACK_SOURCE_H_
bool IsInvalid() const
Definition utils.h:649
std::vector< T > vector_
Definition sweeper.cc:212
V8_INLINE size_t hash_combine(size_t seed, size_t hash)
Definition hashing.h:77
size_t hash_value(const BranchParameters &p)
bool operator!=(DeoptimizeParameters lhs, DeoptimizeParameters rhs)
bool operator==(const BranchParameters &lhs, const BranchParameters &rhs)
std::ostream & operator<<(std::ostream &os, AccessMode access_mode)
return value
Definition map-inl.h:893
#define DCHECK(condition)
Definition logging.h:482
#define V8_EXPORT_PRIVATE
Definition macros.h:460
bool operator()(FeedbackSource const &lhs, FeedbackSource const &rhs) const
size_t operator()(FeedbackSource const &source) const
IndirectHandle< FeedbackVector > vector