mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-10 22:00:54 +01:00
Just realized DenseHashMap doesn't make sense for Id and L.
We are unlikely to have an "empty" value for both Id and L, so we have to use `std::unordered_map` for now.
This commit is contained in:
parent
00a15a9e8c
commit
603da12809
1 changed files with 3 additions and 3 deletions
|
@ -1,10 +1,10 @@
|
||||||
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Luau/DenseHash.h"
|
|
||||||
#include "Luau/Id.h"
|
#include "Luau/Id.h"
|
||||||
#include "Luau/UnionFind.h"
|
#include "Luau/UnionFind.h"
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -51,10 +51,10 @@ private:
|
||||||
/// The e-class map 𝑀 maps e-class ids to e-classes. All equivalent e-class ids map to the same
|
/// The e-class map 𝑀 maps e-class ids to e-classes. All equivalent e-class ids map to the same
|
||||||
/// e-class, i.e., 𝑎 ≡id 𝑏 iff 𝑀[𝑎] is the same set as 𝑀[𝑏]. An e-class id 𝑎 is said to refer to the
|
/// e-class, i.e., 𝑎 ≡id 𝑏 iff 𝑀[𝑎] is the same set as 𝑀[𝑏]. An e-class id 𝑎 is said to refer to the
|
||||||
/// e-class 𝑀[find(𝑎)].
|
/// e-class 𝑀[find(𝑎)].
|
||||||
DenseHashMap<Id, EClass<L, typename N::Data>> classes;
|
std::unordered_map<Id, EClass<L, typename N::Data>> classes;
|
||||||
|
|
||||||
/// The hashcons 𝐻 is a map from e-nodes to e-class ids.
|
/// The hashcons 𝐻 is a map from e-nodes to e-class ids.
|
||||||
DenseHashMap<L, Id> hashcons;
|
std::unordered_map<L, Id> hashcons;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Luau::EqSat
|
} // namespace Luau::EqSat
|
||||||
|
|
Loading…
Add table
Reference in a new issue