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

Two tiny cleanups to convert-uast #25906

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Changes from all commits
Commits
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
14 changes: 2 additions & 12 deletions compiler/passes/convert-uast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,7 @@ struct Converter {

bool shouldScopeResolve(ID symbolId) {
if (canScopeResolve) {
return fDynoScopeBundled ||
!chpl::parsing::idIsInBundledModule(context, symbolId);
return fDynoScopeBundled || topLevelModTag == MOD_USER;
}

return false;
Expand All @@ -418,7 +417,7 @@ struct Converter {
}
bool shouldResolve(ID symbolId) {
if (fDynoCompilerLibrary) {
return !chpl::parsing::idIsInBundledModule(context, symbolId);
return topLevelModTag == MOD_USER;
} else {
return shouldResolve(symbolId.symbolPath());
}
Expand Down Expand Up @@ -459,15 +458,6 @@ struct Converter {
return FLAG_UNKNOWN;
}

static bool isBlockComment(const uast::Comment* node) {
const auto& str = node->str();
if (str.size() < 4) return false;
if (str[0] != '/' || str[1] != '*') return false;
INT_ASSERT(str[str.size()-1] == '/');
INT_ASSERT(str[str.size()-2] == '*');
return true;
}

Expr* visit(const uast::Comment* node) {
return nullptr;
}
Expand Down