v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
hash-seed-inl.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_NUMBERS_HASH_SEED_INL_H_
6
#define V8_NUMBERS_HASH_SEED_INL_H_
7
8
#include <stdint.h>
9
10
// The #includes below currently lead to cyclic transitive includes, so
11
// HashSeed() ends up being required before it is defined, so we have to
12
// declare it here. This is a workaround; if we needed this permanently then
13
// we should put that line into a "hash-seed.h" header; but we won't need
14
// it for long.
15
// TODO(jkummerow): Get rid of this by breaking circular include dependencies.
16
namespace
v8
{
17
namespace
internal
{
18
19
class
Isolate;
20
class
LocalIsolate;
21
class
ReadOnlyRoots;
22
23
inline
uint64_t
HashSeed
(Isolate* isolate);
24
inline
uint64_t
HashSeed
(LocalIsolate* isolate);
25
inline
uint64_t
HashSeed
(ReadOnlyRoots roots);
26
27
}
// namespace internal
28
}
// namespace v8
29
30
// See comment above for why this isn't at the top of the file.
31
#include "
src/objects/fixed-array-inl.h
"
32
#include "
src/roots/roots-inl.h
"
33
34
namespace
v8
{
35
namespace
internal
{
36
37
inline
uint64_t
HashSeed
(
Isolate
* isolate) {
38
return
HashSeed
(
ReadOnlyRoots
(isolate));
39
}
40
41
inline
uint64_t
HashSeed
(
LocalIsolate
* isolate) {
42
return
HashSeed
(
ReadOnlyRoots
(isolate));
43
}
44
45
inline
uint64_t
HashSeed
(
ReadOnlyRoots
roots) {
46
uint64_t seed;
47
MemCopy
(&seed, roots.hash_seed()->begin(),
sizeof
(seed));
48
return
seed;
49
}
50
51
}
// namespace internal
52
}
// namespace v8
53
54
#endif
// V8_NUMBERS_HASH_SEED_INL_H_
v8::internal::Isolate
Definition
isolate.h:586
v8::internal::LocalIsolate
Definition
local-isolate.h:45
v8::internal::ReadOnlyRoots
Definition
roots.h:709
fixed-array-inl.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8::internal::HashSeed
uint64_t HashSeed(Isolate *isolate)
Definition
hash-seed-inl.h:37
v8::internal::MemCopy
void MemCopy(void *dest, const void *src, size_t size)
Definition
memcopy.h:124
v8
Definition
api-arguments-inl.h:19
roots-inl.h
src
numbers
hash-seed-inl.h
Generated on Sun Apr 6 2025 21:08:55 for v8 by
1.12.0