// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details #pragma once #include "Luau/DenseHash.h" #include "Luau/TypeVar.h" #include "Luau/TypePack.h" #include namespace Luau { struct InternalErrorReporter; struct TypeIdPairHash { size_t hashOne(Luau::TypeId key) const { return (uintptr_t(key) >> 4) ^ (uintptr_t(key) >> 9); } size_t operator()(const std::pair& x) const { return hashOne(x.first) ^ (hashOne(x.second) << 1); } }; struct UnifierSharedState { UnifierSharedState(InternalErrorReporter* iceHandler) : iceHandler(iceHandler) { } InternalErrorReporter* iceHandler; DenseHashSet seenAny{nullptr}; DenseHashMap skipCacheForType{nullptr}; DenseHashSet, TypeIdPairHash> cachedUnify{{nullptr, nullptr}}; DenseHashSet tempSeenTy{nullptr}; DenseHashSet tempSeenTp{nullptr}; }; } // namespace Luau