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 13namespace v8 { 14namespace internal { 15 16StringTableKey::StringTableKey(uint32_t raw_hash_field, int length) 17 : raw_hash_field_(raw_hash_field), length_(length) {} 18 19void StringTableKey::set_raw_hash_field(uint32_t raw_hash_field) { 20 raw_hash_field_ = raw_hash_field; 21} 22 23uint32_t StringTableKey::hash() const { 24 return Name::HashBits::decode(raw_hash_field_); 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