mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-13 05:20:38 +00:00
c755875479
- Implemented [Require by String with Relative Paths](https://github.com/luau-lang/rfcs/blob/master/docs/new-require-by-string-semantics.md) RFC - Implemented [Require by String with Aliases](https://github.com/luau-lang/rfcs/blob/master/docs/require-by-string-aliases.md) RFC with support for `paths` and `alias` arrays in .luarc - Added SUBRK and DIVRK bytecode instructions to speed up constant-number and constant/number operations - Added `--vector-lib`, `--vector-ctor` and `--vector-type` options to luau-compile to support code with vectors New Solver - Correctness fixes to subtyping - Improvements to dataflow analysis Native Code Generation - Added bytecode analysis pass to predict type tags used in operations - Fixed rare cases of numerical loops being generated without an interrupt instruction - Restored optimization data propagation into the linear block - Duplicate buffer length checks are optimized away Miscellaneous - Small performance improvements to new non-strict mode - Introduced more scripts for fuzzing Luau and processing the results, including fuzzer build support for CMake Co-authored-by: Alexander McCord <amccord@roblox.com> Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Aviral Goel <agoel@roblox.com> Co-authored-by: David Cope <dcope@roblox.com> Co-authored-by: Lily Brown <lbrown@roblox.com> Co-authored-by: Vighnesh Vijay <vvijay@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com> --------- Co-authored-by: Aaron Weiss <aaronweiss@roblox.com> Co-authored-by: Alexander McCord <amccord@roblox.com> Co-authored-by: Andy Friesen <afriesen@roblox.com> Co-authored-by: Aviral Goel <agoel@roblox.com> Co-authored-by: David Cope <dcope@roblox.com> Co-authored-by: Lily Brown <lbrown@roblox.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
48 lines
1.5 KiB
C++
48 lines
1.5 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 "Luau/IrData.h"
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace Luau
|
|
{
|
|
namespace CodeGen
|
|
{
|
|
|
|
struct CfgInfo;
|
|
|
|
const char* getCmdName(IrCmd cmd);
|
|
const char* getBlockKindName(IrBlockKind kind);
|
|
|
|
struct IrToStringContext
|
|
{
|
|
std::string& result;
|
|
const std::vector<IrBlock>& blocks;
|
|
const std::vector<IrConst>& constants;
|
|
const CfgInfo& cfg;
|
|
};
|
|
|
|
void toString(IrToStringContext& ctx, const IrInst& inst, uint32_t index);
|
|
void toString(IrToStringContext& ctx, const IrBlock& block, uint32_t index); // Block title
|
|
void toString(IrToStringContext& ctx, IrOp op);
|
|
|
|
void toString(std::string& result, IrConst constant);
|
|
void toString(std::string& result, const BytecodeTypes& bcTypes);
|
|
|
|
void toStringDetailed(IrToStringContext& ctx, const IrBlock& block, uint32_t blockIdx, const IrInst& inst, uint32_t instIdx, bool includeUseInfo);
|
|
void toStringDetailed(IrToStringContext& ctx, const IrBlock& block, uint32_t index, bool includeUseInfo); // Block title
|
|
|
|
std::string toString(const IrFunction& function, bool includeUseInfo);
|
|
|
|
std::string dump(const IrFunction& function);
|
|
|
|
std::string toDot(const IrFunction& function, bool includeInst);
|
|
std::string toDotCfg(const IrFunction& function);
|
|
std::string toDotDjGraph(const IrFunction& function);
|
|
|
|
std::string dumpDot(const IrFunction& function, bool includeInst);
|
|
|
|
} // namespace CodeGen
|
|
} // namespace Luau
|