2023-05-19 19:59:59 +01:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
|
|
#include "luacodegen.h"
|
|
|
|
|
|
|
|
#include "Luau/CodeGen.h"
|
|
|
|
|
|
|
|
#include "lapi.h"
|
|
|
|
|
2024-03-30 22:49:03 +00:00
|
|
|
LUAU_FASTFLAG(LuauCodegenDetailedCompilationResult)
|
|
|
|
|
2023-05-19 19:59:59 +01:00
|
|
|
int luau_codegen_supported()
|
|
|
|
{
|
|
|
|
return Luau::CodeGen::isSupported();
|
|
|
|
}
|
|
|
|
|
|
|
|
void luau_codegen_create(lua_State* L)
|
|
|
|
{
|
|
|
|
Luau::CodeGen::create(L);
|
|
|
|
}
|
|
|
|
|
|
|
|
void luau_codegen_compile(lua_State* L, int idx)
|
|
|
|
{
|
2024-03-30 22:49:03 +00:00
|
|
|
if (FFlag::LuauCodegenDetailedCompilationResult)
|
|
|
|
Luau::CodeGen::compile(L, idx);
|
|
|
|
else
|
|
|
|
Luau::CodeGen::compile_DEPRECATED(L, idx);
|
2023-05-19 19:59:59 +01:00
|
|
|
}
|