mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-05 03:10:54 +01:00
- Fix DeprecatedGlobal warning text in cases when the global is deprecated without a suggested alternative - Fix an off-by-one error in type error text for incorrect use of string.format - Reduce stack consumption further during parsing, hopefully eliminating stack overflows during parsing/compilation for good - Mark interpolated string support as experimental (requires --fflags=LuauInterpolatedStringBaseSupport to enable) - Simplify garbage collection treatment of upvalues, reducing cache misses during sweeping stage and reducing the cost of upvalue assignment (SETUPVAL); supersedes #643 - Simplify garbage collection treatment of sleeping threads - Simplify sweeping of alive threads, reducing cache misses during sweeping stage - Simplify management of string buffers, removing redundant linked list operations
26 lines
762 B
C++
26 lines
762 B
C++
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
#pragma once
|
|
|
|
#include <string.h>
|
|
|
|
namespace Luau
|
|
{
|
|
|
|
inline bool isFlagExperimental(const char* flag)
|
|
{
|
|
// Flags in this list are disabled by default in various command-line tools. They may have behavior that is not fully final,
|
|
// or critical bugs that are found after the code has been submitted.
|
|
static const char* kList[] = {
|
|
"LuauLowerBoundsCalculation",
|
|
"LuauInterpolatedStringBaseSupport",
|
|
nullptr, // makes sure we always have at least one entry
|
|
};
|
|
|
|
for (const char* item : kList)
|
|
if (item && strcmp(item, flag) == 0)
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
} // namespace Luau
|