mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
use new fancy C++ syntax
This commit is contained in:
parent
80ecbe6fff
commit
81b28ff6c5
1 changed files with 3 additions and 9 deletions
|
@ -3707,25 +3707,19 @@ void compileOrThrow(BytecodeBuilder& bytecode, AstStatBlock* root, const AstName
|
||||||
// since access to some global objects may result in values that change over time, we block imports from non-readonly tables
|
// since access to some global objects may result in values that change over time, we block imports from non-readonly tables
|
||||||
if (FFlag::LuauGenericSpecialGlobals)
|
if (FFlag::LuauGenericSpecialGlobals)
|
||||||
{
|
{
|
||||||
AstName name = names.get("_G");
|
if (AstName name = names.get("_G"); name.value)
|
||||||
|
|
||||||
if (name.value)
|
|
||||||
compiler.globals[name].writable = true;
|
compiler.globals[name].writable = true;
|
||||||
|
|
||||||
if (options.mutableGlobalNames)
|
if (options.mutableGlobalNames)
|
||||||
for (const char** ptr = options.mutableGlobalNames; *ptr != NULL; ++ptr)
|
for (const char** ptr = options.mutableGlobalNames; *ptr != NULL; ++ptr)
|
||||||
{
|
{
|
||||||
AstName name = names.get(*ptr);
|
if (AstName name = names.get(*ptr); name.value)
|
||||||
|
|
||||||
if (name.value)
|
|
||||||
compiler.globals[name].writable = true;
|
compiler.globals[name].writable = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const char* global : kSpecialGlobals)
|
for (const char* global : kSpecialGlobals)
|
||||||
{
|
{
|
||||||
AstName name = names.get(global);
|
if (AstName name = names.get(global); name.value)
|
||||||
|
|
||||||
if (name.value)
|
|
||||||
compiler.globals[name].writable = true;
|
compiler.globals[name].writable = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue