mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
We've made a few small changes to reduce the amount of stack we use when typechecking nested method calls (eg `foo:bar():baz():quux()`). We've also fixed a small bytecode compiler issue that caused us to emit redundant jump instructions in code that conditionally uses `break` or `continue`. On the new solver, we've switched to a new, better way to handle augmentations to unsealed tables. We've also made some substantial improvements to type inference and error reporting on function calls. These things should both be on par with the old solver now. The main improvements to the native code generator have been elimination of some redundant type tag checks. Also, we are starting to inline particular fastcalls directly to IR. --------- Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
39 lines
1.9 KiB
C++
39 lines
1.9 KiB
C++
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "ltm.h"
|
|
|
|
typedef uint32_t Instruction;
|
|
typedef struct lua_TValue TValue;
|
|
|
|
namespace Luau
|
|
{
|
|
namespace CodeGen
|
|
{
|
|
|
|
class AssemblyBuilderX64;
|
|
struct Label;
|
|
struct ModuleHelpers;
|
|
|
|
void emitInstNameCall(AssemblyBuilderX64& build, const Instruction* pc, int pcpos, const TValue* k, Label& next, Label& fallback);
|
|
void emitInstCall(AssemblyBuilderX64& build, ModuleHelpers& helpers, const Instruction* pc, int pcpos);
|
|
void emitInstReturn(AssemblyBuilderX64& build, ModuleHelpers& helpers, const Instruction* pc, int pcpos);
|
|
void emitInstSetList(AssemblyBuilderX64& build, const Instruction* pc, Label& next);
|
|
void emitInstFastCall1(AssemblyBuilderX64& build, const Instruction* pc, int pcpos, Label& fallback);
|
|
void emitInstFastCall2(AssemblyBuilderX64& build, const Instruction* pc, int pcpos, Label& fallback);
|
|
void emitInstFastCall2K(AssemblyBuilderX64& build, const Instruction* pc, int pcpos, Label& fallback);
|
|
void emitInstFastCall(AssemblyBuilderX64& build, const Instruction* pc, int pcpos, Label& fallback);
|
|
void emitinstForGLoop(AssemblyBuilderX64& build, const Instruction* pc, int pcpos, Label& loopRepeat, Label& loopExit, Label& fallback);
|
|
void emitinstForGLoopFallback(AssemblyBuilderX64& build, const Instruction* pc, int pcpos, Label& loopRepeat);
|
|
void emitInstForGPrepXnextFallback(AssemblyBuilderX64& build, const Instruction* pc, int pcpos, Label& target);
|
|
void emitInstAnd(AssemblyBuilderX64& build, const Instruction* pc);
|
|
void emitInstAndK(AssemblyBuilderX64& build, const Instruction* pc);
|
|
void emitInstOr(AssemblyBuilderX64& build, const Instruction* pc);
|
|
void emitInstOrK(AssemblyBuilderX64& build, const Instruction* pc);
|
|
void emitInstGetImportFallback(AssemblyBuilderX64& build, int ra, uint32_t aux);
|
|
void emitInstCoverage(AssemblyBuilderX64& build, int pcpos);
|
|
|
|
} // namespace CodeGen
|
|
} // namespace Luau
|