// Copyright 2018 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.#include "src/compiler/refs-map.h"namespacev8{namespaceinternal{namespacecompiler{usingUnderlyingMap=base::TemplateHashMapImpl<Address,ObjectData*,AddressMatcher,ZoneAllocationPolicy>;RefsMap::RefsMap(uint32_tcapacity,AddressMatchermatch,Zone*zone):UnderlyingMap(capacity,match,ZoneAllocationPolicy(zone)){}RefsMap::RefsMap(constRefsMap*other,Zone*zone):UnderlyingMap(other,ZoneAllocationPolicy(zone)){}RefsMap::Entry*RefsMap::Lookup(constAddress&key)const{returnUnderlyingMap::Lookup(key,Hash(key));}RefsMap::Entry*RefsMap::LookupOrInsert(constAddress&key,Zone*zone){returnUnderlyingMap::LookupOrInsert(key,RefsMap::Hash(key),[](){returnnullptr;},ZoneAllocationPolicy(zone));}uint32_tRefsMap::Hash(Addressaddr){returnstatic_cast<uint32_t>(addr);}}// namespace compiler}// namespace internal}// namespace v8