-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- A series of major optimizations to type checking performance on complex programs/types (up to two orders of magnitude speedup for programs involving huge tagged unions) - Fix a few issues encountered by UBSAN (and maybe fix s390x builds) - Fix gcc-11 test builds - Fix a rare corner case where luau_load wouldn't wake inactive threads which could result in a use-after-free due to GC - Fix CLI crash when error object that's not a string escapes to top level - Fix Makefile suffixes on macOS Co-authored-by: Rodactor <[email protected]>
- Loading branch information
1 parent
c0b95b8
commit 279855d
Showing
54 changed files
with
2,197 additions
and
619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details | ||
#pragma once | ||
|
||
#include "Luau/TypeVar.h" | ||
|
||
namespace Luau | ||
{ | ||
|
||
struct Module; | ||
using ModulePtr = std::shared_ptr<Module>; | ||
|
||
void quantify(ModulePtr module, TypeId ty, TypeLevel level); | ||
|
||
} // namespace Luau |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// 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 <utility> | ||
|
||
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<Luau::TypeId, Luau::TypeId>& x) const | ||
{ | ||
return hashOne(x.first) ^ (hashOne(x.second) << 1); | ||
} | ||
}; | ||
|
||
struct UnifierSharedState | ||
{ | ||
UnifierSharedState(InternalErrorReporter* iceHandler) | ||
: iceHandler(iceHandler) | ||
{ | ||
} | ||
|
||
InternalErrorReporter* iceHandler; | ||
|
||
DenseHashSet<void*> seenAny{nullptr}; | ||
DenseHashMap<TypeId, bool> skipCacheForType{nullptr}; | ||
DenseHashSet<std::pair<TypeId, TypeId>, TypeIdPairHash> cachedUnify{{nullptr, nullptr}}; | ||
|
||
DenseHashSet<TypeId> tempSeenTy{nullptr}; | ||
DenseHashSet<TypePackId> tempSeenTp{nullptr}; | ||
}; | ||
|
||
} // namespace Luau |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.