1 // Copyright 2018 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_TABLE_INL_H_
6 #define V8_OBJECTS_STRING_TABLE_INL_H_
7 
8 #include "src/objects/string-table.h"
9 
10 // Has to be the last include (doesn't have include guards):
11 #include "src/objects/object-macros.h"
12 
13 namespace v8 {
14 namespace internal {
15 
StringTableKey(uint32_t raw_hash_field,int length)16 StringTableKey::StringTableKey(uint32_t raw_hash_field, int length)
17     : raw_hash_field_(raw_hash_field), length_(length) {}
18 
set_raw_hash_field(uint32_t raw_hash_field)19 void StringTableKey::set_raw_hash_field(uint32_t raw_hash_field) {
20   raw_hash_field_ = raw_hash_field;
21 }
22 
hash()23 uint32_t StringTableKey::hash() const {
24   return raw_hash_field_ >> Name::kHashShift;
25 }
26 
27 }  // namespace internal
28 }  // namespace v8
29 
30 #include "src/objects/object-macros-undef.h"
31 
32 #endif  // V8_OBJECTS_STRING_TABLE_INL_H_
33