v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
symbol-table.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/objects/hash-table-inl.h
"
6
7
namespace
v8
{
8
namespace
internal
{
9
10
Tagged<Object>
RegisteredSymbolTable::SlowReverseLookup
(
Tagged<Object>
value) {
11
ReadOnlyRoots
roots =
GetReadOnlyRoots
();
12
for
(
InternalIndex
i
: this->IterateEntries()) {
13
Tagged<Object>
k;
14
if
(!this->ToKey(roots,
i
, &k))
continue
;
15
Tagged<Object>
e = this->
ValueAt
(
i
);
16
if
(e == value)
return
k;
17
}
18
return
roots.undefined_value();
19
}
20
21
}
// namespace internal
22
}
// namespace v8
v8::internal::InternalIndex
Definition
internal-index.h:20
v8::internal::ReadOnlyRoots
Definition
roots.h:709
v8::internal::RegisteredSymbolTable::ValueAt
Tagged< Object > ValueAt(InternalIndex entry)
Definition
objects.cc:6053
v8::internal::RegisteredSymbolTable::SlowReverseLookup
Tagged< Object > SlowReverseLookup(Tagged< Object > value)
Definition
symbol-table.cc:10
v8::internal::Tagged
Definition
waiter-queue-node.h:21
hash-table-inl.h
v8::internal
Definition
api-arguments-inl.h:20
v8::internal::GetReadOnlyRoots
ReadOnlyRoots GetReadOnlyRoots()
Definition
roots-inl.h:86
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
src
objects
symbol-table.cc
Generated on Sun Apr 6 2025 21:08:56 for v8 by
1.12.0