v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
string-set.h
Go to the documentation of this file.
1// Copyright 2020 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_OBJECTS_STRING_SET_H_
6#define V8_OBJECTS_STRING_SET_H_
7
9
10// Has to be the last include (doesn't have include guards):
12
13namespace v8 {
14namespace internal {
15
16class StringSetShape : public BaseShape<Tagged<String>> {
17 public:
18 static inline bool IsMatch(Tagged<String> key, Tagged<Object> value);
19 static inline uint32_t Hash(ReadOnlyRoots roots, Tagged<String> key);
20 static inline uint32_t HashForObject(ReadOnlyRoots roots,
21 Tagged<Object> object);
22
23 static const int kPrefixSize = 0;
24 static const int kEntrySize = 1;
25 static const bool kMatchNeedsHoleCheck = true;
26 static const bool kDoHashSpreading = false;
27 static const uint32_t kHashBits = 0;
28};
29
31
32V8_OBJECT class StringSet : public HashTable<StringSet, StringSetShape> {
33 public:
34 V8_EXPORT_PRIVATE static Handle<StringSet> New(Isolate* isolate);
36 Handle<StringSet> stringset,
38 V8_EXPORT_PRIVATE bool Has(Isolate* isolate, DirectHandle<String> name);
40
41} // namespace internal
42} // namespace v8
43
45
46#endif // V8_OBJECTS_STRING_SET_H_
static const bool kMatchNeedsHoleCheck
Definition string-set.h:25
static uint32_t HashForObject(ReadOnlyRoots roots, Tagged< Object > object)
static const int kEntrySize
Definition string-set.h:24
static const bool kDoHashSpreading
Definition string-set.h:26
static uint32_t Hash(ReadOnlyRoots roots, Tagged< String > key)
static bool IsMatch(Tagged< String > key, Tagged< Object > value)
static const int kPrefixSize
Definition string-set.h:23
static const uint32_t kHashBits
Definition string-set.h:27
#define EXTERN_DECLARE_HASH_TABLE(DERIVED, SHAPE)
Definition hash-table.h:293
v8::internal::LoadHandler V8_OBJECT_END
#define V8_OBJECT
#define V8_EXPORT_PRIVATE
Definition macros.h:460