Skip to content

fix: More accurate source locations for method names. #92

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

Merged
merged 19 commits into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b780d55
test: Add test with slightly wrong output for structs.
varungandhi-src Aug 31, 2022
bccfec4
fix: Propagate method name source locations.
varungandhi-src Sep 5, 2022
2ff521a
cleanup: Move formatting function to core::Loc for reuse.
varungandhi-src Sep 5, 2022
a6904da
fix: Fix source locations for def_delegator.
varungandhi-src Sep 5, 2022
f499313
cleanup: Remove some TODOs and add a named FIXME for aliases.
varungandhi-src Sep 5, 2022
8a4c034
cleanup: Fix some source locations + remove debug print statements.
varungandhi-src Sep 5, 2022
1e99c8f
fix: Fix source locations for delegate.
varungandhi-src Sep 5, 2022
768fd6e
fix: Fix source locations for Flatfile DSL.
varungandhi-src Sep 5, 2022
35b3c8b
cleanup: Reduce noise in snapshot output.
varungandhi-src Sep 6, 2022
f379c50
test: Add test cases for cattr, mattr, minitest.
varungandhi-src Sep 6, 2022
aafb493
test: Add test for singleton + remove TODOs.
varungandhi-src Sep 6, 2022
4826271
fix: Fix source locations for test case DSL.
varungandhi-src Sep 6, 2022
ef4bed2
fix: Fix source locations for minitest DSL.
varungandhi-src Sep 6, 2022
0e51150
test: Add test for encrypted_prop + minor output cleanup.
varungandhi-src Sep 6, 2022
dec2112
fix: Fix source location for module_function.
varungandhi-src Sep 6, 2022
0af7b92
cleanup: De-duplicate symbol references for same location.
varungandhi-src Sep 6, 2022
b8a0e8a
test: Add test for prop.
varungandhi-src Sep 6, 2022
96ba9fd
fix: Fix source location for initialize function.
varungandhi-src Sep 6, 2022
8dca7dc
cleanup: Remove debug print statement + commented out code.
varungandhi-src Sep 6, 2022
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
25 changes: 13 additions & 12 deletions ast/Helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,36 +244,37 @@ class MK {
core::make_type<core::NamedLiteralType>(core::Symbols::String(), value));
}

static ExpressionPtr Method(core::LocOffsets loc, core::LocOffsets declLoc, core::NameRef name,
MethodDef::ARGS_store args, ExpressionPtr rhs,
static ExpressionPtr Method(core::LocOffsets loc, core::LocOffsets declLoc, core::LocOffsets nameLoc,
core::NameRef name, MethodDef::ARGS_store args, ExpressionPtr rhs,
MethodDef::Flags flags = MethodDef::Flags()) {
if (args.empty() || (!isa_tree<ast::Local>(args.back()) && !isa_tree<ast::BlockArg>(args.back()))) {
auto blkLoc = core::LocOffsets::none();
args.emplace_back(make_expression<ast::BlockArg>(blkLoc, MK::Local(blkLoc, core::Names::blkArg())));
}
return make_expression<MethodDef>(loc, declLoc, core::Symbols::todoMethod(), name, std::move(args),
return make_expression<MethodDef>(loc, declLoc, nameLoc, core::Symbols::todoMethod(), name, std::move(args),
std::move(rhs), flags);
}

static ExpressionPtr SyntheticMethod(core::LocOffsets loc, core::LocOffsets declLoc, core::NameRef name,
MethodDef::ARGS_store args, ExpressionPtr rhs,
static ExpressionPtr SyntheticMethod(core::LocOffsets loc, core::LocOffsets declLoc, core::LocOffsets nameLoc,
core::NameRef name, MethodDef::ARGS_store args, ExpressionPtr rhs,
MethodDef::Flags flags = MethodDef::Flags()) {
flags.isRewriterSynthesized = true;
return Method(loc, declLoc, name, std::move(args), std::move(rhs), flags);
return Method(loc, declLoc, nameLoc, name, std::move(args), std::move(rhs), flags);
}

static ExpressionPtr SyntheticMethod0(core::LocOffsets loc, core::LocOffsets declLoc, core::NameRef name,
ExpressionPtr rhs, MethodDef::Flags flags = MethodDef::Flags()) {
static ExpressionPtr SyntheticMethod0(core::LocOffsets loc, core::LocOffsets declLoc, core::LocOffsets nameLoc,
core::NameRef name, ExpressionPtr rhs,
MethodDef::Flags flags = MethodDef::Flags()) {
MethodDef::ARGS_store args;
return SyntheticMethod(loc, declLoc, name, std::move(args), std::move(rhs), flags);
return SyntheticMethod(loc, declLoc, nameLoc, name, std::move(args), std::move(rhs), flags);
}

static ExpressionPtr SyntheticMethod1(core::LocOffsets loc, core::LocOffsets declLoc, core::NameRef name,
ExpressionPtr arg0, ExpressionPtr rhs,
static ExpressionPtr SyntheticMethod1(core::LocOffsets loc, core::LocOffsets declLoc, core::LocOffsets nameLoc,
core::NameRef name, ExpressionPtr arg0, ExpressionPtr rhs,
MethodDef::Flags flags = MethodDef::Flags()) {
MethodDef::ARGS_store args;
args.emplace_back(std::move(arg0));
return SyntheticMethod(loc, declLoc, name, std::move(args), std::move(rhs), flags);
return SyntheticMethod(loc, declLoc, nameLoc, name, std::move(args), std::move(rhs), flags);
}

static ExpressionPtr ClassOrModule(core::LocOffsets loc, core::LocOffsets declLoc, ExpressionPtr name,
Expand Down
2 changes: 1 addition & 1 deletion ast/TreeCopying.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ExpressionPtr deepCopy(const void *avoid, const Tag tag, const void *tree, bool

case Tag::MethodDef: {
auto *exp = reinterpret_cast<const MethodDef *>(tree);
return make_expression<MethodDef>(exp->loc, exp->declLoc, exp->symbol, exp->name,
return make_expression<MethodDef>(exp->loc, exp->declLoc, exp->nameLoc, exp->symbol, exp->name,
deepCopyVec(avoid, exp->args), deepCopy(avoid, exp->rhs), exp->flags);
}

Expand Down
7 changes: 4 additions & 3 deletions ast/Trees.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@ ClassDef::ClassDef(core::LocOffsets loc, core::LocOffsets declLoc, core::ClassOr
_sanityCheck();
}

MethodDef::MethodDef(core::LocOffsets loc, core::LocOffsets declLoc, core::MethodRef symbol, core::NameRef name,
ARGS_store args, ExpressionPtr rhs, Flags flags)
: loc(loc), declLoc(declLoc), symbol(symbol), rhs(std::move(rhs)), args(std::move(args)), name(name), flags(flags) {
MethodDef::MethodDef(core::LocOffsets loc, core::LocOffsets declLoc, core::LocOffsets nameLoc, core::MethodRef symbol,
core::NameRef name, ARGS_store args, ExpressionPtr rhs, Flags flags)
: loc(loc), declLoc(declLoc), nameLoc(nameLoc), symbol(symbol), rhs(std::move(rhs)), args(std::move(args)),
name(name), flags(flags) {
categoryCounterInc("trees", "methoddef");
histogramInc("trees.methodDef.args", this->args.size());
_sanityCheck();
Expand Down
9 changes: 6 additions & 3 deletions ast/Trees.h
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ EXPRESSION(MethodDef) {
/// The range for the method declaration, including 'def' and ending
/// after the closing ')' after the parameter list.
core::LocOffsets declLoc;
/// The range for the name of the method itself in the method declaration,
/// excluding 'def' and the parameter list '(...)'.
core::LocOffsets nameLoc;
/// Reference to the method data.
core::MethodRef symbol;

Expand All @@ -401,8 +404,8 @@ EXPRESSION(MethodDef) {
using Flags = core::FoundMethod::Flags;
Flags flags;

MethodDef(core::LocOffsets loc, core::LocOffsets declLoc, core::MethodRef symbol, core::NameRef name,
ARGS_store args, ExpressionPtr rhs, Flags flags);
MethodDef(core::LocOffsets loc, core::LocOffsets declLoc, core::LocOffsets nameLoc, core::MethodRef symbol,
core::NameRef name, ARGS_store args, ExpressionPtr rhs, Flags flags);

ExpressionPtr deepCopy() const;

Expand All @@ -412,7 +415,7 @@ EXPRESSION(MethodDef) {

void _sanityCheck();
};
CheckSize(MethodDef, 64, 8);
CheckSize(MethodDef, 72, 8);

EXPRESSION(If) {
public:
Expand Down
15 changes: 8 additions & 7 deletions ast/desugar/Desugar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,9 @@ ExpressionPtr validateRBIBody(DesugarContext dctx, ExpressionPtr body) {
return body;
}

ExpressionPtr buildMethod(DesugarContext dctx, core::LocOffsets loc, core::LocOffsets declLoc, core::NameRef name,
unique_ptr<parser::Node> &argnode, unique_ptr<parser::Node> &body, bool isSelf) {
ExpressionPtr buildMethod(DesugarContext dctx, core::LocOffsets loc, core::LocOffsets declLoc, core::LocOffsets nameLoc,
core::NameRef name, unique_ptr<parser::Node> &argnode, unique_ptr<parser::Node> &body,
bool isSelf) {
// Reset uniqueCounter within this scope (to keep numbers small)
uint32_t uniqueCounter = 1;
DesugarContext dctx1(dctx.ctx, uniqueCounter, dctx.enclosingBlockArg, declLoc, name);
Expand All @@ -320,7 +321,7 @@ ExpressionPtr buildMethod(DesugarContext dctx, core::LocOffsets loc, core::LocOf
ExpressionPtr desugaredBody = desugarBody(dctx2, loc, body, std::move(destructures));
desugaredBody = validateRBIBody(dctx2, move(desugaredBody));

auto mdef = MK::Method(loc, declLoc, name, std::move(args), std::move(desugaredBody));
auto mdef = MK::Method(loc, declLoc, nameLoc, name, std::move(args), std::move(desugaredBody));
cast_tree<MethodDef>(mdef)->flags.isSelfMethod = isSelf;
return mdef;
}
Expand Down Expand Up @@ -1515,8 +1516,8 @@ ExpressionPtr node2TreeImpl(DesugarContext dctx, unique_ptr<parser::Node> what)
},
[&](parser::DefMethod *method) {
bool isSelf = false;
ExpressionPtr res =
buildMethod(dctx, method->loc, method->declLoc, method->name, method->args, method->body, isSelf);
ExpressionPtr res = buildMethod(dctx, method->loc, method->declLoc, method->nameLoc, method->name,
method->args, method->body, isSelf);
result = std::move(res);
},
[&](parser::DefS *method) {
Expand All @@ -1528,8 +1529,8 @@ ExpressionPtr node2TreeImpl(DesugarContext dctx, unique_ptr<parser::Node> what)
}
}
bool isSelf = true;
ExpressionPtr res =
buildMethod(dctx, method->loc, method->declLoc, method->name, method->args, method->body, isSelf);
ExpressionPtr res = buildMethod(dctx, method->loc, method->declLoc, method->nameLoc, method->name,
method->args, method->body, isSelf);
result = std::move(res);
},
[&](parser::SClass *sclass) {
Expand Down
24 changes: 13 additions & 11 deletions cfg/CFG.cc
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,18 @@ string CFG::toString(const core::GlobalState &gs) const {
string CFG::toTextualString(const core::GlobalState &gs, optional<core::FileRef> file) const {
fmt::memory_buffer buf;
string symbolName = this->symbol.showFullName(gs);
fmt::format_to(std::back_inserter(buf), "method {} {{\n\n", symbolName);
if (file) {
auto method = this->symbol.data(gs);
if (method->nameLoc.exists() && !method->nameLoc.empty()) {
fmt::format_to(std::back_inserter(buf), "method @ {} {} {{\n\n",
core::Loc(file.value(), method->nameLoc).showRawLineColumn(gs), symbolName);
} else {
fmt::format_to(std::back_inserter(buf), "method @ {} (full) {} {{\n\n", method->loc().showRawLineColumn(gs),
symbolName);
}
} else {
fmt::format_to(std::back_inserter(buf), "method {} {{\n\n", symbolName);
}
for (auto &basicBlock : this->basicBlocks) {
if (!basicBlock->backEdges.empty()) {
fmt::format_to(std::back_inserter(buf), "# backedges\n");
Expand Down Expand Up @@ -379,16 +390,7 @@ string BasicBlock::toTextualString(const core::GlobalState &gs, optional<core::F
for (const Binding &exp : this->exprs) {
string positionText = "";
if (file) {
if (exp.loc.exists() && !exp.loc.empty()) {
auto lineCol = core::Loc(file.value(), exp.loc).position(gs);
positionText =
lineCol.first.line == lineCol.second.line
? fmt::format(" @ {}:{}-{}", lineCol.first.line, lineCol.first.column, lineCol.second.column)
: fmt::format(" @ {}:{}-{}:{}", lineCol.first.line, lineCol.first.column, lineCol.second.line,
lineCol.second.column);
} else {
positionText = " @ <>";
}
positionText = fmt::format(" @ {}", core::Loc(file.value(), exp.loc).showRawLineColumn(gs));
}

fmt::format_to(std::back_inserter(buf), " {}{} = {}\n", exp.bind.toString(gs, cfg), positionText,
Expand Down
6 changes: 3 additions & 3 deletions class_flatten/class_flatten.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ class ClassFlattenWalk {
ast::MethodDef::ARGS_store args;
args.emplace_back(ast::make_expression<ast::Local>(blkLoc, blkLocalVar));

auto init =
ast::make_expression<ast::MethodDef>(classDef->declLoc, classDef->declLoc, sym, core::Names::staticInit(),
std::move(args), std::move(inits), ast::MethodDef::Flags());
auto init = ast::make_expression<ast::MethodDef>(classDef->declLoc, classDef->declLoc, core::LocOffsets::none(),
sym, core::Names::staticInit(), std::move(args),
std::move(inits), ast::MethodDef::Flags());
ast::cast_tree_nonnull<ast::MethodDef>(init).flags.isRewriterSynthesized = false;
ast::cast_tree_nonnull<ast::MethodDef>(init).flags.isSelfMethod = true;

Expand Down
3 changes: 2 additions & 1 deletion core/FoundDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ struct FoundMethod final {
core::NameRef name;
core::LocOffsets loc;
core::LocOffsets declLoc;
core::LocOffsets nameLoc;
std::vector<core::ParsedArg> parsedArgs;
core::ArityHash arityHash;
struct Flags {
Expand All @@ -161,7 +162,7 @@ struct FoundMethod final {

std::string toString(const core::GlobalState &gs, const FoundDefinitions &foundDefs, uint32_t id) const;
};
CheckSize(FoundMethod, 56, 8);
CheckSize(FoundMethod, 64, 8);

struct FoundModifier {
enum class Kind : uint8_t {
Expand Down
19 changes: 11 additions & 8 deletions core/GlobalState.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ struct MethodBuilder {
};

MethodBuilder enterMethod(GlobalState &gs, ClassOrModuleRef klass, NameRef name) {
return MethodBuilder{gs, gs.enterMethodSymbol(Loc::none(), klass, name)};
return MethodBuilder{gs, gs.enterMethodSymbol(Loc::none(), klass, name, LocOffsets::none())};
}

struct ParentLinearizationInformation {
Expand Down Expand Up @@ -303,7 +303,8 @@ void GlobalState::initEmpty() {
ClassOrModuleRef klass;
klass = synthesizeClass(core::Names::Constants::NoSymbol(), 0);
ENFORCE(klass == Symbols::noClassOrModule());
MethodRef method = enterMethodSymbol(Loc::none(), Symbols::noClassOrModule(), Names::noMethod());
MethodRef method =
enterMethodSymbol(Loc::none(), Symbols::noClassOrModule(), Names::noMethod(), LocOffsets::none());
ENFORCE(method == Symbols::noMethod());
FieldRef field = enterFieldSymbol(Loc::none(), Symbols::noClassOrModule(), Names::noFieldOrStaticField());
ENFORCE(field == Symbols::noField());
Expand Down Expand Up @@ -581,7 +582,7 @@ void GlobalState::initEmpty() {
method = enterMethod(*this, Symbols::Class(), Names::new_()).repeatedArg(Names::args()).build();
ENFORCE(method == Symbols::Class_new());

method = enterMethodSymbol(Loc::none(), Symbols::noClassOrModule(), Names::TodoMethod());
method = enterMethodSymbol(Loc::none(), Symbols::noClassOrModule(), Names::TodoMethod(), LocOffsets::none());
enterMethodArgumentSymbol(Loc::none(), method, Names::args());
ENFORCE(method == Symbols::todoMethod());

Expand Down Expand Up @@ -887,7 +888,7 @@ void GlobalState::installIntrinsics() {
break;
}
auto countBefore = methodsUsed();
auto method = enterMethodSymbol(Loc::none(), symbol, entry.method);
auto method = enterMethodSymbol(Loc::none(), symbol, entry.method, LocOffsets::none());
method.data(*this)->intrinsicOffset = offset + Method::FIRST_VALID_INTRINSIC_OFFSET;
if (countBefore != methodsUsed()) {
auto &blkArg = enterMethodArgumentSymbol(Loc::none(), method, Names::blkArg());
Expand Down Expand Up @@ -1192,7 +1193,7 @@ TypeArgumentRef GlobalState::enterTypeArgument(Loc loc, MethodRef owner, NameRef
return result;
}

MethodRef GlobalState::enterMethodSymbol(Loc loc, ClassOrModuleRef owner, NameRef name) {
MethodRef GlobalState::enterMethodSymbol(Loc loc, ClassOrModuleRef owner, NameRef name, LocOffsets nameLoc) {
ClassOrModuleData ownerScope = owner.dataAllowingNone(*this);
histogramInc("symbol_enter_by_name", ownerScope->members().size());

Expand All @@ -1211,6 +1212,7 @@ MethodRef GlobalState::enterMethodSymbol(Loc loc, ClassOrModuleRef owner, NameRe

MethodData data = result.dataAllowingNone(*this);
data->name = name;
data->nameLoc = nameLoc;
data->owner = owner;
data->addLoc(*this, loc);
DEBUG_ONLY(categoryCounterInc("symbols", "method"));
Expand All @@ -1225,7 +1227,7 @@ MethodRef GlobalState::enterNewMethodOverload(Loc sigLoc, MethodRef original, co
core::Loc loc = num == 0 ? original.data(*this)->loc()
: sigLoc; // use original Loc for main overload so that we get right jump-to-def for it.
auto owner = original.data(*this)->owner;
auto res = enterMethodSymbol(loc, owner, name);
auto res = enterMethodSymbol(loc, owner, name, original.data(*this)->nameLoc);
bool newMethod = res != original;
const auto &resArguments = res.data(*this)->arguments;
ENFORCE(newMethod || !resArguments.empty(), "must be at least the block arg");
Expand Down Expand Up @@ -2342,7 +2344,8 @@ const vector<shared_ptr<File>> &GlobalState::getFiles() const {

MethodRef GlobalState::staticInitForClass(ClassOrModuleRef klass, Loc loc) {
auto prevCount = methodsUsed();
auto sym = enterMethodSymbol(loc, klass.data(*this)->singletonClass(*this), core::Names::staticInit());
auto sym = enterMethodSymbol(loc, klass.data(*this)->singletonClass(*this), core::Names::staticInit(),
klass.data(*this)->loc().offsets());
if (prevCount != methodsUsed()) {
auto blkLoc = core::Loc::none(loc.file());
auto &blkSym = enterMethodArgumentSymbol(blkLoc, sym, core::Names::blkArg());
Expand All @@ -2361,7 +2364,7 @@ MethodRef GlobalState::lookupStaticInitForClass(ClassOrModuleRef klass, bool all
MethodRef GlobalState::staticInitForFile(Loc loc) {
auto nm = freshNameUnique(core::UniqueNameKind::Namer, core::Names::staticInit(), loc.file().id());
auto prevCount = this->methodsUsed();
auto sym = enterMethodSymbol(loc, core::Symbols::rootSingleton(), nm);
auto sym = enterMethodSymbol(loc, core::Symbols::rootSingleton(), nm, LocOffsets::none());
if (prevCount != this->methodsUsed()) {
auto blkLoc = core::Loc::none(loc.file());
auto &blkSym = this->enterMethodArgumentSymbol(blkLoc, sym, core::Names::blkArg());
Expand Down
2 changes: 1 addition & 1 deletion core/GlobalState.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class GlobalState final {
ClassOrModuleRef enterClassSymbol(Loc loc, ClassOrModuleRef owner, NameRef name);
TypeMemberRef enterTypeMember(Loc loc, ClassOrModuleRef owner, NameRef name, Variance variance);
TypeArgumentRef enterTypeArgument(Loc loc, MethodRef owner, NameRef name, Variance variance);
MethodRef enterMethodSymbol(Loc loc, ClassOrModuleRef owner, NameRef name);
MethodRef enterMethodSymbol(Loc loc, ClassOrModuleRef owner, NameRef name, LocOffsets nameLoc);
MethodRef enterNewMethodOverload(Loc loc, MethodRef original, core::NameRef originalName, uint32_t num,
const std::vector<bool> &argsToKeep);
FieldRef enterFieldSymbol(Loc loc, ClassOrModuleRef owner, NameRef name);
Expand Down
12 changes: 12 additions & 0 deletions core/Loc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,18 @@ string Loc::showRaw(const GlobalState &gs) const {
return fmt::format("Loc {{file={} start={}:{} end={}:{}}}", path, start.line, start.column, end.line, end.column);
}

string Loc::showRawLineColumn(const core::GlobalState &gs) const {
if (!this->exists()) {
return "<>";
}
if (this->empty()) {
return "<_>";
}
auto [start, end] = this->position(gs);
return start.line == end.line ? fmt::format("{}:{}-{}", start.line, start.column, end.column)
: fmt::format("{}:{}-{}:{}", start.line, start.column, end.line, end.column);
}

string Loc::filePosToString(const GlobalState &gs, bool showFull) const {
stringstream buf;
if (!file().exists()) {
Expand Down
1 change: 1 addition & 0 deletions core/Loc.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class Loc final {
return toStringWithTabs(gs);
}
std::string showRaw(const GlobalState &gs) const;
std::string showRawLineColumn(const GlobalState &gs) const;
std::string filePosToString(const GlobalState &gs, bool showFull = false) const;
std::optional<std::string_view> source(const GlobalState &gs) const;

Expand Down
5 changes: 3 additions & 2 deletions core/Symbols.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ void ClassOrModule::recordRequiredAncestorInternal(GlobalState &gs, ClassOrModul
// We store the required ancestors into a fake property called `<required-ancestors>`
auto ancestors = this->findMethod(gs, prop);
if (!ancestors.exists()) {
ancestors = gs.enterMethodSymbol(ancestor.loc, this->ref(gs), prop);
ancestors = gs.enterMethodSymbol(ancestor.loc, this->ref(gs), prop, LocOffsets::none());
ancestors.data(gs)->locs_.clear(); // Remove the original location

// Create the return type tuple to store RequiredAncestor.symbol
Expand Down Expand Up @@ -2140,7 +2140,8 @@ void Method::sanityCheck(const GlobalState &gs) const {
return;
}
MethodRef current = this->ref(gs);
MethodRef current2 = const_cast<GlobalState &>(gs).enterMethodSymbol(this->loc(), this->owner, this->name);
MethodRef current2 =
const_cast<GlobalState &>(gs).enterMethodSymbol(this->loc(), this->owner, this->name, this->nameLoc);

ENFORCE_NO_TIMER(current == current2);
for (auto &tp : typeArguments()) {
Expand Down
Loading