mirror of
https://github.com/luau-lang/luau.git
synced 2025-01-05 19:09:11 +00:00
fe7621ee8c
* Work toward affording parallel type checking * The interface to `LazyType` has changed: * `LazyType` now takes a second callback that is passed the `LazyType&` itself. This new callback is responsible for populating the field `TypeId LazyType::unwrapped`. Multithreaded implementations should acquire a lock in this callback. * Modules now retain their `humanReadableNames`. This reduces the number of cases where type checking has to call back to a `ModuleResolver`. * https://github.com/Roblox/luau/pull/902 * Add timing info to the Luau REPL compilation output We've also fixed some bugs and crashes in the new solver as we march toward readiness. * Thread ICEs (Internal Compiler Errors) back to the Frontend properly * Refinements are no longer applied to lvalues * More miscellaneous stability improvements Lots of activity in the new JIT engine: * Implement register spilling/restore for A64 * Correct Luau IR value restore location tracking * Fixed use-after-free in x86 register allocator spill restore * Use btz for bit tests * Finish branch assembly support for A64 * Codesize and performance improvements for A64 * The bit32 library has been implemented for arm and x64 --------- Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
38 lines
1,006 B
C++
38 lines
1,006 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 "Luau/IrData.h"
|
|
|
|
#include <array>
|
|
|
|
namespace Luau
|
|
{
|
|
namespace CodeGen
|
|
{
|
|
|
|
struct IrValueLocationTracking
|
|
{
|
|
IrValueLocationTracking(IrFunction& function);
|
|
|
|
void setRestoreCallack(void* context, void (*callback)(void* context, IrInst& inst));
|
|
|
|
void beforeInstLowering(IrInst& inst);
|
|
void afterInstLowering(IrInst& inst, uint32_t instIdx);
|
|
|
|
void recordRestoreOp(uint32_t instIdx, IrOp location);
|
|
void invalidateRestoreOp(IrOp location);
|
|
void invalidateRestoreVmRegs(int start, int count);
|
|
|
|
IrFunction& function;
|
|
|
|
std::array<uint32_t, 256> vmRegValue;
|
|
|
|
// For range/full invalidations, we only want to visit a limited number of data that we have recorded
|
|
int maxReg = 0;
|
|
|
|
void* restoreCallbackCtx = nullptr;
|
|
void (*restoreCallback)(void* context, IrInst& inst) = nullptr;
|
|
};
|
|
|
|
} // namespace CodeGen
|
|
} // namespace Luau
|