Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync to upstream/release/566 #853

Merged
merged 86 commits into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
c6ac06e
Sync to upstream/release/543
zeux Sep 1, 2022
75b8a2a
Merge branch 'upstream' into merge
zeux Sep 1, 2022
dec4b67
Sync to upstream/release/544
zeux Sep 8, 2022
ff18a63
Merge branch 'master' into merge
zeux Sep 8, 2022
71df988
Merge branch 'upstream' into merge
zeux Sep 8, 2022
6c70897
Patch the test for now to work with 16K pages
zeux Sep 8, 2022
dd710f6
Sync to upstream/release/545
zeux Sep 15, 2022
19ac72a
Merge branch 'master' into merge
zeux Sep 15, 2022
6e957a4
Merge branch 'upstream' into merge
zeux Sep 15, 2022
48fb5a3
Sync to upstream/release/546
zeux Sep 23, 2022
cd66ad6
Merge branch 'master' into merge
zeux Sep 23, 2022
7bea908
Merge branch 'upstream' into merge
zeux Sep 23, 2022
4176e1c
Fix internals library
zeux Sep 23, 2022
d0989b9
Sync to upstream/release/547
zeux Sep 29, 2022
123649d
Merge branch 'master' into merge
zeux Sep 29, 2022
ebf252f
Merge branch 'upstream' into merge
zeux Sep 29, 2022
91e144a
Sync to upstream/release/548
zeux Oct 6, 2022
9bfe2b8
Merge branch 'master' into merge
zeux Oct 6, 2022
4a79c7f
Merge branch 'upstream' into merge
zeux Oct 6, 2022
d82e736
Sync to upstream/release/549
vegorov-rbx Oct 13, 2022
6aafd2b
Merge branch 'master' into merge
vegorov-rbx Oct 13, 2022
1dca05d
Merge branch 'upstream' into merge
vegorov-rbx Oct 13, 2022
48fd16d
Fix build error
vegorov-rbx Oct 14, 2022
6a98d15
Responding to PR comments
vegorov-rbx Oct 14, 2022
2eff6cf
Sync to upstream/release/550
andyfriesen Oct 21, 2022
72fdf6f
Merge branch 'master' into merge
andyfriesen Oct 21, 2022
b9451c6
Merge branch 'upstream' into merge
andyfriesen Oct 21, 2022
99c0db3
Sync to upstream/release/551
vegorov-rbx Oct 27, 2022
dbedb3c
Merge remote-tracking branch 'upstream/master' into merge
vegorov-rbx Oct 27, 2022
b4b125c
Merge branch 'upstream' into merge
vegorov-rbx Oct 27, 2022
a6cbb0f
Fix clang-14 / GNU ld interaction for target_clones
zeux Oct 28, 2022
e3fdab3
Sync to upstream/release/552
andyfriesen Nov 4, 2022
d189305
Merge branch 'master' into merge
andyfriesen Nov 4, 2022
8fd7d22
Merge branch 'upstream' into merge
andyfriesen Nov 4, 2022
3155ba0
Sync to upstream/release/553
vegorov-rbx Nov 10, 2022
3289fc1
Merge remote-tracking branch 'upstream/master' into merge
vegorov-rbx Nov 10, 2022
2b36613
Merge branch 'upstream' into merge
vegorov-rbx Nov 10, 2022
f521695
Sync to upstream/release/554
andyfriesen Nov 18, 2022
d5ff348
Merge remote-tracking branch 'origin/master' into merge
andyfriesen Nov 18, 2022
3ac3798
Merge branch 'upstream' into merge
andyfriesen Nov 18, 2022
fc45969
Sync to upstream/release/555
vegorov-rbx Dec 2, 2022
471ec75
Merge branch 'master' into merge
vegorov-rbx Dec 2, 2022
621d21d
Merge branch 'upstream' into merge
vegorov-rbx Dec 2, 2022
f10b294
What even is this
vegorov-rbx Dec 2, 2022
6cd507d
Work-around for gcc
vegorov-rbx Dec 2, 2022
abe6768
Sync to upstream/release/556
andyfriesen Dec 9, 2022
4ba102f
Merge branch 'master' into merge
andyfriesen Dec 9, 2022
1197bcd
Merge branch 'upstream' into merge
andyfriesen Dec 9, 2022
9958d23
Sync to upstream/release/557
vegorov-rbx Jan 3, 2023
11e129f
Merge branch 'master' into merge
vegorov-rbx Jan 3, 2023
c48b4d7
Merge branch 'upstream' into merge
vegorov-rbx Jan 3, 2023
ee364a3
Fixed iterator invalidation issue
vegorov-rbx Jan 3, 2023
1958676
Re-using uncleared normalizer in unsafe
vegorov-rbx Jan 4, 2023
36f5009
Sync to upstream/release/558
vegorov-rbx Jan 6, 2023
5e3fbc4
Merge branch 'master' into merge
vegorov-rbx Jan 6, 2023
cf45ce6
Merge branch 'upstream' into merge
vegorov-rbx Jan 6, 2023
5db9675
Smaller recursion limit to not hit stack overflow in debug on Windows
vegorov-rbx Jan 6, 2023
a2365f2
Fix build warning
vegorov-rbx Jan 6, 2023
96c1caf
Sync to upstream/release/559
andyfriesen Jan 13, 2023
b1000a6
Merge branch 'master' into merge
andyfriesen Jan 13, 2023
efaf15e
Merge branch 'upstream' into merge
andyfriesen Jan 13, 2023
eec289a
Sync to upstream/release/560
vegorov-rbx Jan 20, 2023
652f319
Merge branch 'master' into merge
vegorov-rbx Jan 20, 2023
7a43ae3
Merge branch 'upstream' into merge
vegorov-rbx Jan 20, 2023
b0b7dfb
Fix a few style changes that went out-of-sync
vegorov-rbx Jan 20, 2023
53d03f9
Sync to upstream/release/561
andyfriesen Jan 27, 2023
7c5dd3c
Merge branch 'master' into merge
andyfriesen Jan 27, 2023
a17481b
Merge branch 'upstream' into merge
andyfriesen Jan 27, 2023
b7af49c
Fix signed/unsigned comparison warnings on GCC.
andyfriesen Jan 27, 2023
523db5e
Another GCC fix.
andyfriesen Jan 27, 2023
dba2936
Sync to upstream/release/562
vegorov-rbx Feb 3, 2023
f49f073
Merge branch 'master' into merge
vegorov-rbx Feb 3, 2023
c76dd1c
Merge branch 'upstream' into merge
vegorov-rbx Feb 3, 2023
b388e27
Sync to upstream/release/563
andyfriesen Feb 10, 2023
41ff9cb
Merge branch 'master' into merge
andyfriesen Feb 10, 2023
c3b1945
Merge branch 'upstream' into merge
andyfriesen Feb 10, 2023
5c77305
Sync to upstream/release/564
vegorov-rbx Feb 17, 2023
1f8ec89
Merge branch 'master' into merge
vegorov-rbx Feb 17, 2023
be06c31
Merge branch 'upstream' into merge
vegorov-rbx Feb 17, 2023
1e7b23f
Sync to upstream/release/565
andyfriesen Feb 24, 2023
3974fcc
Merge branch 'master' into merge
andyfriesen Feb 24, 2023
7a822c9
Merge branch 'upstream' into merge
andyfriesen Feb 24, 2023
e58bb1b
GCC fix.
andyfriesen Feb 24, 2023
9a281f0
Sync to upstream/release/566
vegorov-rbx Mar 3, 2023
ca34b44
Merge branch 'master' into merge
vegorov-rbx Mar 3, 2023
ac9718e
Merge branch 'upstream' into merge
vegorov-rbx Mar 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions Analysis/include/Luau/Breadcrumb.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
#pragma once

#include "Luau/Def.h"
#include "Luau/NotNull.h"
#include "Luau/Variant.h"

#include <string>
#include <optional>

namespace Luau
{

using NullableBreadcrumbId = const struct Breadcrumb*;
using BreadcrumbId = NotNull<const struct Breadcrumb>;

struct FieldMetadata
{
std::string prop;
};

struct SubscriptMetadata
{
BreadcrumbId key;
};

using Metadata = Variant<FieldMetadata, SubscriptMetadata>;

struct Breadcrumb
{
NullableBreadcrumbId previous;
DefId def;
std::optional<Metadata> metadata;
std::vector<BreadcrumbId> children;
};

inline Breadcrumb* asMutable(NullableBreadcrumbId breadcrumb)
{
LUAU_ASSERT(breadcrumb);
return const_cast<Breadcrumb*>(breadcrumb);
}

template<typename T>
const T* getMetadata(NullableBreadcrumbId breadcrumb)
{
if (!breadcrumb || !breadcrumb->metadata)
return nullptr;

return get_if<T>(&*breadcrumb->metadata);
}

struct BreadcrumbArena
{
TypedAllocator<Breadcrumb> allocator;

template<typename... Args>
BreadcrumbId add(NullableBreadcrumbId previous, DefId def, Args&&... args)
{
Breadcrumb* bc = allocator.allocate(Breadcrumb{previous, def, std::forward<Args>(args)...});
if (previous)
asMutable(previous)->children.push_back(NotNull{bc});
return NotNull{bc};
}

template<typename T, typename... Args>
BreadcrumbId emplace(NullableBreadcrumbId previous, DefId def, Args&&... args)
{
Breadcrumb* bc = allocator.allocate(Breadcrumb{previous, def, Metadata{T{std::forward<Args>(args)...}}});
if (previous)
asMutable(previous)->children.push_back(NotNull{bc});
return NotNull{bc};
}
};

} // namespace Luau
1 change: 0 additions & 1 deletion Analysis/include/Luau/Constraint.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#pragma once

#include "Luau/Ast.h" // Used for some of the enumerations
#include "Luau/Def.h"
#include "Luau/DenseHash.h"
#include "Luau/NotNull.h"
#include "Luau/Type.h"
Expand Down
13 changes: 10 additions & 3 deletions Analysis/include/Luau/ConstraintGraphBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ struct ConstraintGraphBuilder
* @param inTypeArguments whether we are resolving a type that's contained within type arguments, `<...>`.
* @return the type of the AST annotation.
**/
TypeId resolveType(const ScopePtr& scope, AstType* ty, bool inTypeArguments);
TypeId resolveType(const ScopePtr& scope, AstType* ty, bool inTypeArguments, bool replaceErrorWithFresh = false);

/**
* Resolves a type pack from its AST annotation.
Expand All @@ -233,7 +233,7 @@ struct ConstraintGraphBuilder
* @param inTypeArguments whether we are resolving a type that's contained within type arguments, `<...>`.
* @return the type pack of the AST annotation.
**/
TypePackId resolveTypePack(const ScopePtr& scope, AstTypePack* tp, bool inTypeArguments);
TypePackId resolveTypePack(const ScopePtr& scope, AstTypePack* tp, bool inTypeArguments, bool replaceErrorWithFresh = false);

/**
* Resolves a type pack from its AST annotation.
Expand All @@ -242,7 +242,7 @@ struct ConstraintGraphBuilder
* @param inTypeArguments whether we are resolving a type that's contained within type arguments, `<...>`.
* @return the type pack of the AST annotation.
**/
TypePackId resolveTypePack(const ScopePtr& scope, const AstTypeList& list, bool inTypeArguments);
TypePackId resolveTypePack(const ScopePtr& scope, const AstTypeList& list, bool inTypeArguments, bool replaceErrorWithFresh = false);

/**
* Creates generic types given a list of AST definitions, resolving default
Expand Down Expand Up @@ -282,10 +282,17 @@ struct ConstraintGraphBuilder
* initial scan of the AST and note what globals are defined.
*/
void prepopulateGlobalScope(const ScopePtr& globalScope, AstStatBlock* program);

/** Given a function type annotation, return a vector describing the expected types of the calls to the function
* For example, calling a function with annotation ((number) -> string & ((string) -> number))
* yields a vector of size 1, with value: [number | string]
*/
std::vector<std::optional<TypeId>> getExpectedCallTypesForFunctionOverloads(const TypeId fnType);
};

/** Borrow a vector of pointers from a vector of owning pointers to constraints.
*/
std::vector<NotNull<Constraint>> borrowConstraints(const std::vector<ConstraintPtr>& constraints);


} // namespace Luau
4 changes: 2 additions & 2 deletions Analysis/include/Luau/ConstraintSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ struct ConstraintSolver
bool tryDispatchIterableFunction(
TypeId nextTy, TypeId tableTy, TypeId firstIndexTy, const IterableConstraint& c, NotNull<const Constraint> constraint, bool force);

std::optional<TypeId> lookupTableProp(TypeId subjectType, const std::string& propName);
std::optional<TypeId> lookupTableProp(TypeId subjectType, const std::string& propName, std::unordered_set<TypeId>& seen);
std::pair<std::vector<TypeId>, std::optional<TypeId>> lookupTableProp(TypeId subjectType, const std::string& propName);
std::pair<std::vector<TypeId>, std::optional<TypeId>> lookupTableProp(TypeId subjectType, const std::string& propName, std::unordered_set<TypeId>& seen);

void block(NotNull<const Constraint> target, NotNull<const Constraint> constraint);
/**
Expand Down
120 changes: 75 additions & 45 deletions Analysis/include/Luau/DataFlowGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

// Do not include LValue. It should never be used here.
#include "Luau/Ast.h"
#include "Luau/Breadcrumb.h"
#include "Luau/DenseHash.h"
#include "Luau/Def.h"
#include "Luau/Symbol.h"
Expand All @@ -17,39 +18,44 @@ struct DataFlowGraph
DataFlowGraph(DataFlowGraph&&) = default;
DataFlowGraph& operator=(DataFlowGraph&&) = default;

// TODO: AstExprLocal, AstExprGlobal, and AstLocal* are guaranteed never to return nullopt.
// We leave them to return an optional as we build it out, but the end state is for them to return a non-optional DefId.
std::optional<DefId> getDef(const AstExpr* expr) const;
std::optional<DefId> getDef(const AstLocal* local) const;
NullableBreadcrumbId getBreadcrumb(const AstExpr* expr) const;

/// Retrieve the Def that corresponds to the given Symbol.
///
/// We do not perform dataflow analysis on globals, so this function always
/// yields nullopt when passed a global Symbol.
std::optional<DefId> getDef(const Symbol& symbol) const;
BreadcrumbId getBreadcrumb(const AstLocal* local) const;
BreadcrumbId getBreadcrumb(const AstExprLocal* local) const;
BreadcrumbId getBreadcrumb(const AstExprGlobal* global) const;

BreadcrumbId getBreadcrumb(const AstStatDeclareGlobal* global) const;
BreadcrumbId getBreadcrumb(const AstStatDeclareFunction* func) const;

private:
DataFlowGraph() = default;

DataFlowGraph(const DataFlowGraph&) = delete;
DataFlowGraph& operator=(const DataFlowGraph&) = delete;

DefArena arena;
DenseHashMap<const AstExpr*, const Def*> astDefs{nullptr};
DenseHashMap<const AstLocal*, const Def*> localDefs{nullptr};
DefArena defs;
BreadcrumbArena breadcrumbs;

DenseHashMap<const AstExpr*, NullableBreadcrumbId> astBreadcrumbs{nullptr};

// Sometimes we don't have the AstExprLocal* but we have AstLocal*, and sometimes we need to extract that DefId.
DenseHashMap<const AstLocal*, NullableBreadcrumbId> localBreadcrumbs{nullptr};

// There's no AstStatDeclaration, and it feels useless to introduce it just to enforce an invariant in one place.
// All keys in this maps are really only statements that ambiently declares a symbol.
DenseHashMap<const AstStat*, NullableBreadcrumbId> declaredBreadcrumbs{nullptr};

friend struct DataFlowGraphBuilder;
};

struct DfgScope
{
DfgScope* parent;
DenseHashMap<Symbol, const Def*> bindings{Symbol{}};
};
DenseHashMap<Symbol, NullableBreadcrumbId> bindings{Symbol{}};
DenseHashMap<const Def*, std::unordered_map<std::string, NullableBreadcrumbId>> props{nullptr};

struct ExpressionFlowGraph
{
std::optional<DefId> def;
NullableBreadcrumbId lookup(Symbol symbol) const;
NullableBreadcrumbId lookup(DefId def, const std::string& key) const;
};

// Currently unsound. We do not presently track the control flow of the program.
Expand All @@ -65,23 +71,19 @@ struct DataFlowGraphBuilder
DataFlowGraphBuilder& operator=(const DataFlowGraphBuilder&) = delete;

DataFlowGraph graph;
NotNull<DefArena> arena{&graph.arena};
struct InternalErrorReporter* handle;
std::vector<std::unique_ptr<DfgScope>> scopes;
NotNull<DefArena> defs{&graph.defs};
NotNull<BreadcrumbArena> breadcrumbs{&graph.breadcrumbs};

// Does not belong in DataFlowGraphBuilder, but the old solver allows properties to escape the scope they were defined in,
// so we will need to be able to emulate this same behavior here too. We can kill this once we have better flow sensitivity.
DenseHashMap<const Def*, std::unordered_map<std::string, const Def*>> props{nullptr};
struct InternalErrorReporter* handle = nullptr;
DfgScope* moduleScope = nullptr;

DfgScope* childScope(DfgScope* scope);
std::vector<std::unique_ptr<DfgScope>> scopes;

std::optional<DefId> use(DfgScope* scope, Symbol symbol, AstExpr* e);
DefId use(DefId def, AstExprIndexName* e);
DfgScope* childScope(DfgScope* scope);

void visit(DfgScope* scope, AstStatBlock* b);
void visitBlockWithoutChildScope(DfgScope* scope, AstStatBlock* b);

// TODO: visit type aliases
void visit(DfgScope* scope, AstStat* s);
void visit(DfgScope* scope, AstStatIf* i);
void visit(DfgScope* scope, AstStatWhile* w);
Expand All @@ -97,24 +99,52 @@ struct DataFlowGraphBuilder
void visit(DfgScope* scope, AstStatCompoundAssign* c);
void visit(DfgScope* scope, AstStatFunction* f);
void visit(DfgScope* scope, AstStatLocalFunction* l);

ExpressionFlowGraph visitExpr(DfgScope* scope, AstExpr* e);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprLocal* l);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprGlobal* g);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprCall* c);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprIndexName* i);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprIndexExpr* i);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprFunction* f);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprTable* t);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprUnary* u);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprBinary* b);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprTypeAssertion* t);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprIfElse* i);
ExpressionFlowGraph visitExpr(DfgScope* scope, AstExprInterpString* i);

// TODO: visitLValue
// TODO: visitTypes (because of typeof which has access to values namespace, needs unreachable scope)
// TODO: visitTypePacks (because of typeof which has access to values namespace, needs unreachable scope)
void visit(DfgScope* scope, AstStatTypeAlias* t);
void visit(DfgScope* scope, AstStatDeclareGlobal* d);
void visit(DfgScope* scope, AstStatDeclareFunction* d);
void visit(DfgScope* scope, AstStatDeclareClass* d);
void visit(DfgScope* scope, AstStatError* error);

BreadcrumbId visitExpr(DfgScope* scope, AstExpr* e);
BreadcrumbId visitExpr(DfgScope* scope, AstExprLocal* l);
BreadcrumbId visitExpr(DfgScope* scope, AstExprGlobal* g);
BreadcrumbId visitExpr(DfgScope* scope, AstExprCall* c);
BreadcrumbId visitExpr(DfgScope* scope, AstExprIndexName* i);
BreadcrumbId visitExpr(DfgScope* scope, AstExprIndexExpr* i);
BreadcrumbId visitExpr(DfgScope* scope, AstExprFunction* f);
BreadcrumbId visitExpr(DfgScope* scope, AstExprTable* t);
BreadcrumbId visitExpr(DfgScope* scope, AstExprUnary* u);
BreadcrumbId visitExpr(DfgScope* scope, AstExprBinary* b);
BreadcrumbId visitExpr(DfgScope* scope, AstExprTypeAssertion* t);
BreadcrumbId visitExpr(DfgScope* scope, AstExprIfElse* i);
BreadcrumbId visitExpr(DfgScope* scope, AstExprInterpString* i);
BreadcrumbId visitExpr(DfgScope* scope, AstExprError* error);

void visitLValue(DfgScope* scope, AstExpr* e);
void visitLValue(DfgScope* scope, AstExprLocal* l);
void visitLValue(DfgScope* scope, AstExprGlobal* g);
void visitLValue(DfgScope* scope, AstExprIndexName* i);
void visitLValue(DfgScope* scope, AstExprIndexExpr* i);
void visitLValue(DfgScope* scope, AstExprError* e);

void visitType(DfgScope* scope, AstType* t);
void visitType(DfgScope* scope, AstTypeReference* r);
void visitType(DfgScope* scope, AstTypeTable* t);
void visitType(DfgScope* scope, AstTypeFunction* f);
void visitType(DfgScope* scope, AstTypeTypeof* t);
void visitType(DfgScope* scope, AstTypeUnion* u);
void visitType(DfgScope* scope, AstTypeIntersection* i);
void visitType(DfgScope* scope, AstTypeError* error);

void visitTypePack(DfgScope* scope, AstTypePack* p);
void visitTypePack(DfgScope* scope, AstTypePackExplicit* e);
void visitTypePack(DfgScope* scope, AstTypePackVariadic* v);
void visitTypePack(DfgScope* scope, AstTypePackGeneric* g);

void visitTypeList(DfgScope* scope, AstTypeList l);

void visitGenerics(DfgScope* scope, AstArray<AstGenericType> g);
void visitGenericPacks(DfgScope* scope, AstArray<AstGenericTypePack> g);
};

} // namespace Luau
8 changes: 0 additions & 8 deletions Analysis/include/Luau/Def.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ namespace Luau
struct Def;
using DefId = NotNull<const Def>;

struct FieldMetadata
{
DefId parent;
std::string propName;
};

/**
* A cell is a "single-object" value.
*
Expand All @@ -29,7 +23,6 @@ struct FieldMetadata
*/
struct Cell
{
std::optional<struct FieldMetadata> field;
};

/**
Expand Down Expand Up @@ -83,7 +76,6 @@ struct DefArena
TypedAllocator<Def> allocator;

DefId freshCell();
DefId freshCell(DefId parent, const std::string& prop);
// TODO: implement once we have cases where we need to merge in definitions
// DefId phi(const std::vector<DefId>& defs);
};
Expand Down
21 changes: 8 additions & 13 deletions Analysis/include/Luau/Frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ struct Frontend
ScopePtr getGlobalScope();

private:
ModulePtr check(const SourceModule& sourceModule, Mode mode, std::vector<RequireCycle> requireCycles,
bool forAutocomplete = false);
ModulePtr check(const SourceModule& sourceModule, Mode mode, std::vector<RequireCycle> requireCycles, bool forAutocomplete = false, bool recordJsonLog = false);

std::pair<SourceNode*, SourceModule*> getSourceNode(const ModuleName& name);
SourceModule parse(const ModuleName& name, std::string_view src, const ParseOptions& parseOptions);
Expand Down Expand Up @@ -202,16 +201,12 @@ struct Frontend
ScopePtr globalScope;
};

ModulePtr check(
const SourceModule& sourceModule,
const std::vector<RequireCycle>& requireCycles,
NotNull<BuiltinTypes> builtinTypes,
NotNull<InternalErrorReporter> iceHandler,
NotNull<ModuleResolver> moduleResolver,
NotNull<FileResolver> fileResolver,
const ScopePtr& globalScope,
NotNull<UnifierSharedState> unifierState,
FrontendOptions options
);
ModulePtr check(const SourceModule& sourceModule, const std::vector<RequireCycle>& requireCycles, NotNull<BuiltinTypes> builtinTypes,
NotNull<InternalErrorReporter> iceHandler, NotNull<ModuleResolver> moduleResolver, NotNull<FileResolver> fileResolver,
const ScopePtr& globalScope, FrontendOptions options);

ModulePtr check(const SourceModule& sourceModule, const std::vector<RequireCycle>& requireCycles, NotNull<BuiltinTypes> builtinTypes,
NotNull<InternalErrorReporter> iceHandler, NotNull<ModuleResolver> moduleResolver, NotNull<FileResolver> fileResolver,
const ScopePtr& globalScope, FrontendOptions options, bool recordJsonLog);

} // namespace Luau
Loading