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 hash_field,int length)16StringTableKey::StringTableKey(uint32_t hash_field, int length) 17 : hash_field_(hash_field), length_(length) {} 18 set_hash_field(uint32_t hash_field)19void StringTableKey::set_hash_field(uint32_t hash_field) { 20 hash_field_ = hash_field; 21 } 22 hash()23uint32_t StringTableKey::hash() const { 24 return 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