mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-21 20:23:47 +01:00
Merge branch 'master' into merge
This commit is contained in:
commit
3d1ac20d24
5 changed files with 20 additions and 5 deletions
|
@ -581,7 +581,14 @@ static bool runFile(const char* name, lua_State* GL, bool repl)
|
|||
// new thread needs to have the globals sandboxed
|
||||
luaL_sandboxthread(L);
|
||||
|
||||
std::string chunkname = "@" + std::string(name);
|
||||
// ignore file extension when storing module's chunkname
|
||||
std::string chunkname = "@";
|
||||
std::string_view nameView = name;
|
||||
if (size_t dotPos = nameView.find_last_of('.'); dotPos != std::string_view::npos)
|
||||
{
|
||||
nameView.remove_suffix(nameView.size() - dotPos);
|
||||
}
|
||||
chunkname += nameView;
|
||||
|
||||
std::string bytecode = Luau::compile(*source, copts());
|
||||
int status = 0;
|
||||
|
|
|
@ -24,7 +24,7 @@ You can install and run Luau by downloading the compiled binaries from [a recent
|
|||
Alternatively, you can use one of the packaged distributions (note that these are not maintained by Luau development team):
|
||||
|
||||
- macOS: [Install Homebrew](https://docs.brew.sh/Installation) and run `brew install luau`
|
||||
- Arch Linux: From the AUR (Arch Linux User Repository), install one of these packages via a AUR helper or manually (by cloning their repo and using ``makepkg``): [luau](https://aur.archlinux.org/packages/luau) (manual build), [luau-git](https://aur.archlinux.org/packages/luau-git) (manual build by cloning this repo), or [luau-bin](https://aur.archlinux.org/packages/luau-bin) (pre-built binaries from releases)
|
||||
- Arch Linux: Luau has been added to the official Arch Linux packages repository under the extras repository (see [``luau``](https://archlinux.org/packages/extra/x86_64/luau/)), simply install using ``pacman``: ``pacman -Syu luau``
|
||||
- Alpine Linux: [Enable community repositories](https://wiki.alpinelinux.org/w/index.php?title=Enable_Community_Repository) and run `apk add luau`
|
||||
- Gentoo Linux: Luau is [officially packaged by Gentoo](https://packages.gentoo.org/packages/dev-lang/luau) and can be installed using `emerge dev-lang/luau`. You may have to unmask the package first before installing it (which can be done by including the `--autounmask=y` option in the `emerge` command).
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
LUAU_FASTFLAG(LuauSolverV2);
|
||||
LUAU_FASTFLAG(LintRedundantNativeAttribute);
|
||||
LUAU_FASTFLAG(LuauDeprecatedAttribute);
|
||||
LUAU_FASTFLAG(LuauNonReentrantGeneralization);
|
||||
|
||||
using namespace Luau;
|
||||
|
||||
|
@ -1923,6 +1924,9 @@ print(foo:bar(2.0))
|
|||
|
||||
TEST_CASE_FIXTURE(BuiltinsFixture, "TableOperations")
|
||||
{
|
||||
// FIXME: For now this flag causes a stack overflow on Windows.
|
||||
ScopedFastFlag _{FFlag::LuauNonReentrantGeneralization, false};
|
||||
|
||||
LintResult result = lint(R"(
|
||||
local t = {}
|
||||
local tt = {}
|
||||
|
|
|
@ -21,6 +21,7 @@ LUAU_FASTFLAG(LuauSubtypingStopAtNormFail)
|
|||
LUAU_FASTFLAG(LuauNormalizationCatchMetatableCycles)
|
||||
LUAU_FASTFLAG(LuauSubtypingEnableReasoningLimit)
|
||||
LUAU_FASTFLAG(LuauTypePackDetectCycles)
|
||||
LUAU_FASTFLAG(LuauNonReentrantGeneralization)
|
||||
|
||||
using namespace Luau;
|
||||
|
||||
|
@ -1219,6 +1220,7 @@ TEST_CASE_FIXTURE(BuiltinsFixture, "fuzz_propagate_normalization_failures")
|
|||
ScopedFastFlag luauNormalizeLimitFunctionSet{FFlag::LuauNormalizeLimitFunctionSet, true};
|
||||
ScopedFastFlag luauSubtypingStopAtNormFail{FFlag::LuauSubtypingStopAtNormFail, true};
|
||||
ScopedFastFlag luauSubtypingEnableReasoningLimit{FFlag::LuauSubtypingEnableReasoningLimit, true};
|
||||
ScopedFastFlag luauTurnOffNonreentrantGeneralization{FFlag::LuauNonReentrantGeneralization, false};
|
||||
|
||||
CheckResult result = check(R"(
|
||||
function _(_,"").readu32(l0)
|
||||
|
|
|
@ -34,6 +34,7 @@ LUAU_FASTFLAG(LuauTypeCheckerAcceptNumberConcats)
|
|||
LUAU_FASTFLAG(LuauPreprocessTypestatedArgument)
|
||||
LUAU_FASTFLAG(LuauCacheInferencePerAstExpr)
|
||||
LUAU_FASTFLAG(LuauMagicFreezeCheckBlocked)
|
||||
LUAU_FASTFLAG(LuauNonReentrantGeneralization)
|
||||
|
||||
using namespace Luau;
|
||||
|
||||
|
@ -433,14 +434,15 @@ TEST_CASE_FIXTURE(Fixture, "check_block_recursion_limit")
|
|||
TEST_CASE_FIXTURE(Fixture, "check_expr_recursion_limit")
|
||||
{
|
||||
#if defined(LUAU_ENABLE_ASAN)
|
||||
int limit = 250;
|
||||
int limit = 200;
|
||||
#elif defined(_DEBUG) || defined(_NOOPT)
|
||||
int limit = 300;
|
||||
int limit = 250;
|
||||
#else
|
||||
int limit = 600;
|
||||
int limit = 500;
|
||||
#endif
|
||||
ScopedFastInt luauRecursionLimit{FInt::LuauRecursionLimit, limit + 100};
|
||||
ScopedFastInt luauCheckRecursionLimit{FInt::LuauCheckRecursionLimit, limit - 100};
|
||||
ScopedFastFlag _{FFlag::LuauNonReentrantGeneralization, false};
|
||||
|
||||
CheckResult result = check(R"(("foo"))" + rep(":lower()", limit));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue