mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-10 22:00:54 +01:00
Make a note here.
This commit is contained in:
parent
c7adc18911
commit
ee62df2ffb
1 changed files with 6 additions and 0 deletions
|
@ -123,6 +123,12 @@ private:
|
||||||
|
|
||||||
void repair(EClass<L, typename N::Data>& eclass)
|
void repair(EClass<L, typename N::Data>& eclass)
|
||||||
{
|
{
|
||||||
|
// In the egg paper, the `repair` function makes use of two loops over the `eclass.parents`
|
||||||
|
// by first erasing the old enode entry, and adding back the canonicalized enode with the canonical id.
|
||||||
|
// And then in another loop that follows, deduplicate it.
|
||||||
|
//
|
||||||
|
// Here, we unify the two loops. I think it's equivalent?
|
||||||
|
|
||||||
// After canonicalizing the enodes, the eclass may contain multiple enodes that are equivalent.
|
// After canonicalizing the enodes, the eclass may contain multiple enodes that are equivalent.
|
||||||
std::unordered_map<L, Id, typename L::Hash> map;
|
std::unordered_map<L, Id, typename L::Hash> map;
|
||||||
for (auto& [enode, id] : eclass.parents)
|
for (auto& [enode, id] : eclass.parents)
|
||||||
|
|
Loading…
Add table
Reference in a new issue