Skip to content

Commit

Permalink
Merge branch 'chapel-lang:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
milthorpe authored Sep 24, 2024
2 parents c02d14a + 0cad0bf commit ede605b
Show file tree
Hide file tree
Showing 2,916 changed files with 68,775 additions and 34,201 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
run: |
./util/buildRelease/smokeTest quickstart docs
- name: upload docs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: documentation
path: doc/html
Expand Down Expand Up @@ -129,6 +129,9 @@ jobs:
run: |
CHPL_LLVM=none make test-venv
CHPL_LLVM=none CHPL_HOME=$PWD ./util/test/run-in-test-venv.bash ./util/test/check_annotations.py
- name: check perf graphs
run: |
python3 ./util/test/check_perf_graphs.py
- name: smokeTest lint
run: |
./util/buildRelease/smokeTest lint
435 changes: 434 additions & 1 deletion CHANGES.md

Large diffs are not rendered by default.

12 changes: 2 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# These values will be written to <build_dir>/frontend/include/chpl/config/config.h

set(CHPL_MAJOR_VERSION 2)
set(CHPL_MINOR_VERSION 1)
set(CHPL_MINOR_VERSION 2)
set(CHPL_PATCH_VERSION 0)
set(CHPL_BUILD_VERSION 0)

# Flip this to 'true' when we're ready to roll out a release; then back
# after branching
set(CHPL_OFFICIAL_RELEASE false)
set(CHPL_OFFICIAL_RELEASE true)

### END config.h version value setting - configured_prefix set below ###

Expand Down Expand Up @@ -355,14 +355,6 @@ add_subdirectory(compiler)
add_subdirectory(frontend)
add_subdirectory(tools/chpldoc)

# We are not ready to include 'chpldef' in an official release just yet. This
# check works because the 'chpldef' source files are currently not included
# in source releases.
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/tools/chpldef)
# Exclude the language server from being included in 'make all'.
add_subdirectory(tools/chpldef EXCLUDE_FROM_ALL)
endif()

# Adjust the install rpath for chpl and chpldoc
if (INSTALLATION_MODE STREQUAL "prefix")
# let the build and install rpaths be absolute (which is the default)
Expand Down
17 changes: 9 additions & 8 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,32 @@ Chapel Contributors

The following people have contributed to Chapel releases:

Contributors to the Chapel 2.1 release
Contributors to the Chapel 2.2 release
--------------------------------------
* Jade Abraham, [HPE]
* [Dan Bonachea], [Lawrence Berkeley National Laboratory]
* Gabriel Brown, individual contributor
* [Brad Chamberlain], [HPE]
* Soohoon Choi, [HPE]
* Sarah Coghlan, [HPE]
* Jeremiah Corrado, [HPE]
* Mark Dewing, individual contributor
* Lydia Duncan, [HPE]
* Daniel Fedorin, [HPE]
* Michael Ferguson, [HPE]
* Luca Ferranti, individual contributor
* [Paul H. Hargrove], [Lawrence Berkeley National Laboratory]
* Ben Harshbarger, [HPE]
* John Hartman, [HPE]
* Guillaume Helbecque, individual contributor
* Bonnie Hurwitz, [University of Arizona] / [HPE] contractor
* Ian Henriksen, [Sandia National Laboratories]
* Engin Kayraklioglu, [HPE]
* [Shreyas Khandekar], [HPE] (former intern from [University of Arizona])
* Vassily Litvinov, [HPE]
* David Longnecker, [HPE]
* Ben McDonald, [HPE] (former intern from [Gonzaga University])
* Josh Milthorpe, [ORNL]
* Fábio Malacco Moreira, individual contributor
* Brandon Neth, [HPE] (former intern from [University of Arizona])
* Ahmad Rezaii, [HPE]
* Anna Rift, [HPE]
* Andy Stone, [HPE] (former [Cray Inc.] intern from [Colorado State University])
* Michelle Mills Strout, [HPE]
* [Nicole Vadot], individual contributor
* Tim Zinsky, [HPE]

Contributors to previous releases
Expand All @@ -55,6 +49,7 @@ Contributors to previous releases
* Sean Billig, individual contributor
* Robert Bocchino, [Cray Inc.] intern from [University of Illinois, Urbana-Champaign]
* Kyle Brady, [Cray Inc.]
* Gabriel Brown, individual contributor
* Daniel Buettner, [LTS]
* John Byrne, [HPE]
* Zixian Cai, individual contributor
Expand All @@ -72,6 +67,7 @@ Contributors to previous releases
* Laura Delaney, [Cray Inc.] intern from [Whitworth University]
* Joel Denny, [ETI]
* Garvit Dewan, individual contributor, [GSoC 2020] mentor, [GSoC 2019] student from [Indian Institute of Technology Roorkee]
* Mark Dewing, individual contributor
* Krishna Kumar Dey, [GSoC 2021] and [GSoC 2020] mentor, [GSoC 2019] student from [Indian Institute of Information Technology, Sri City]
* Roxana Diaconescu, [CalTech]
* Nelson Luís Dias, individual contributor
Expand All @@ -80,6 +76,7 @@ Contributors to previous releases
* Prasanth Duvvuri, [GSoC 2021] student from [Northeastern University] (former individual contributor)
* Saliya Ekanayake, [Indiana University]
* Omar Elawady, individual contributor
* Luca Ferranti, individual contributor
* Samuel Figueroa[*](#footnote), [Cray Inc.]
* Roald Frederickx, individual contributor
* Rahul Ghangas, [GSoC 2020] student from [Australian National University]
Expand All @@ -92,6 +89,7 @@ Contributors to previous releases
* Shannon Hoffswell[*](#footnote), [Cray Inc.]
* Samuel Howard, individual contributor
* Mary Beth Hribar[*](#footnote), [Cray Inc.]
* Bonnie Hurwitz, [University of Arizona] / [HPE] contractor
* Serghei Iakovlev, individual contributor
* Sai Rajendra Immadi, individual contributor
* David Iten, [HPE]
Expand Down Expand Up @@ -126,9 +124,11 @@ Contributors to previous releases
* Cory McCartan, [Cray Inc.] intern from Sammamish High School
* Damian McGuckin, [Pacific Engineering Systems International]
* Erin Melia, individual contributor
* Josh Milthorpe, [ORNL]
* Kyle Milz, individual contributor
* Iain Moncrief, [HPE] intern from [Oregon State University]
* Barry Moore, [University of Pittsburgh]
* Fábio Malacco Moreira, individual contributor
* Sarthak Munshi, individual contributor / [GSoC 2017] student from [Pune Institute of Computer Technology]
* Ram Nad, individual contributor
* Mohammed Nafees, [GSoC 2019] student from [University of Waterloo]
Expand Down Expand Up @@ -193,6 +193,7 @@ Contributors to previous releases
* Max Tursi, [HPE]
* Anubhav Ujjawal, individual contributor
* Rob Upcraft, individual contributor
* [Nicole Vadot], individual contributor
* Thomas Van Doren, individual contributor / [Cray Inc.]
* Varsha Verma, individual contributor
* Branch Vincent, individual contributor
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ WORKDIR $CHPL_HOME
# Build stage: build Chapel from sources
# ======================================

FROM chapel-base as chapel-build
FROM chapel-base AS chapel-build

# acquire sources
COPY . .
Expand Down Expand Up @@ -85,7 +85,7 @@ RUN rm -rf third-party/llvm/llvm-src
# Final stage: copy build results, but omit large files.
# ======================================

FROM chapel-base as chapel
FROM chapel-base AS chapel
COPY --from=chapel-build $CHPL_HOME $CHPL_HOME

ENV PATH="${PATH}:${CHPL_HOME}/bin:${CHPL_HOME}/util"
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,6 @@ chpldoc: third-party-chpldoc-venv
@cd modules && $(MAKE)
@test -r Makefile.devel && $(MAKE) man-chpldoc || echo ""

chpldef: FORCE
@echo "Making chpldef..."
@cd third-party && $(MAKE) llvm
cd compiler && $(MAKE) chpldef
@cd modules && $(MAKE)

chpldef-fast: FORCE
cd compiler && $(MAKE) chpldef-fast

always-build-test-venv: FORCE
-@if [ -n "$$CHPL_ALWAYS_BUILD_TEST_VENV" ]; then \
$(MAKE) test-venv; \
Expand Down Expand Up @@ -216,7 +207,7 @@ lint-standard-modules: chplcheck FORCE
tools/chplcheck/chplcheck --skip-unstable \
--internal-prefix "_" \
--internal-prefix "chpl_" \
--disable-rule "RedundantParentheses" \
--disable-rule "ControlFlowParentheses" \
$(MODULES_TO_LINT)

compile-util-python: FORCE
Expand Down Expand Up @@ -271,12 +262,16 @@ clobber: FORCE
cd tools/mason && $(MAKE) clobber
-cd tools/protoc-gen-chpl && $(MAKE) clobber
cd tools/chpldoc && $(MAKE) clobber
cd tools/chpl-language-server && $(MAKE) clobber
cd tools/chplcheck && $(MAKE) clobber
if [ -e doc/Makefile ]; then cd doc && $(MAKE) clobber; fi
rm -rf bin
rm -rf lib
rm -rf build
rm -f util/chplenv/*.pyc
rm -rf util/chplenv/__pycache__
rm -rf util/config/__pycache__
rm -rf util/test/__pycache__
rm -f compiler/main/CONFIGURED_PREFIX
# these files might be generated by ./configure
rm -f configured-chplconfig configured-prefix configured-chpl-home chplconfig
Expand Down
3 changes: 0 additions & 3 deletions Makefile.devel
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ run-frontend-linters: FORCE

run-dyno-linters: run-frontend-linters FORCE

test-chpldef: FORCE
@cd compiler && $(MAKE) test-chpldef

SPECTEST_DIR = ./test/release/examples/spec
spectests: FORCE
rm -rf $(SPECTEST_DIR)
Expand Down
59 changes: 44 additions & 15 deletions compiler/AST/AggregateType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@

#include <queue>

AggregateType* dtObject = NULL;
AggregateType* dtBytes = NULL;
AggregateType* dtString = NULL;
AggregateType* dtLocale = NULL;
AggregateType* dtRange = NULL;
AggregateType* dtOwned = NULL;
AggregateType* dtShared = NULL;

AggregateType::AggregateType(AggregateTag initTag) :
Type(E_AggregateType, NULL) {

Expand All @@ -63,6 +55,7 @@ AggregateType::AggregateType(AggregateTag initTag) :
builtReaderInit = false;
initializerResolved = false;
iteratorInfo = NULL;
thunkInvoke = NULL;
doc = NULL;

instantiatedFrom = NULL;
Expand Down Expand Up @@ -993,6 +986,22 @@ AggregateType* AggregateType::generateType(CallExpr* call,

INT_ASSERT(notNamed.size() == 0);

// Don't even allow creating an instantiation of something like
// 'owned' with a non-class.
bool isManagedPtrType = symbol->hasFlag(FLAG_MANAGED_POINTER);
if (isManagedPtrType && genericFields.size() > 0) {
// Assume first generic field is the underlying type.
auto field = genericFields[0];

if (auto sub = toTypeSymbol(map.get(field))) {
if (!isClassLike(sub->typeInfo())) {
USR_FATAL(call, "cannot use non-class type '%s' with memory management specifiers",
sub->name);
}
}
}


ret = ret->generateType(map, call, callString, evalDefaults, getInstantiationPoint(call));

if (ret != this) {
Expand Down Expand Up @@ -1646,9 +1655,6 @@ void AggregateType::renameInstantiation() {
} else if (!developer && symbol->hasFlag(FLAG_SYNC)) {
name = "sync ";
buildFieldNames(this, name, false);
} else if (!developer && symbol->hasFlag(FLAG_SINGLE)) {
name = "single ";
buildFieldNames(this, name, false);
} else if (!developer && symbol->hasFlag(FLAG_ATOMIC_TYPE)) {
name = "atomic ";
buildFieldNames(this, name, false);
Expand Down Expand Up @@ -2894,6 +2900,21 @@ void AggregateType::addClassToHierarchy() {
addClassToHierarchy(localSeen);
}

static BlockStmt* getEnclosingBlockForImplements(Symbol* sym) {
auto parentSym = sym->defPoint->parentSymbol;
if (auto fn = toFnSymbol(parentSym)) {
return fn->body;
} else if (auto mod = toModuleSymbol(parentSym)) {
return mod->block;
} else if( auto ty = toTypeSymbol(parentSym)) {
return getEnclosingBlockForImplements(ty);
} else {
// Fallback, this shouldn't happen but if it does, we'll just return the
// module's block
return sym->getModule()->block;
}
}

void AggregateType::addClassToHierarchy(std::set<AggregateType*>& localSeen) {
// classes already in hierarchy
static std::set<AggregateType*> globalSeen;
Expand Down Expand Up @@ -2934,8 +2955,8 @@ void AggregateType::addClassToHierarchy(std::set<AggregateType*>& localSeen) {
}

auto ifcActuals = new CallExpr(PRIM_ACTUALS_LIST, new SymExpr(implementFor));
auto istmt = ImplementsStmt::build(isym->name, ifcActuals, nullptr);
this->symbol->getModule()->block->insertAtTail(istmt);
auto istmt = ImplementsStmt::build(isym, ifcActuals, nullptr);
getEnclosingBlockForImplements(this->symbol)->insertAtTail(istmt);

expr->remove();
continue;
Expand Down Expand Up @@ -3046,9 +3067,17 @@ void AggregateType::discoverParentAndCheck(Expr* storesName,
USR_FATAL(storesName, "Illegal super class");
}

ts->maybeGenerateDeprecationWarning(storesName);
// When Dyno is handling the conversion, it automatically inserts
// 'anymanaged' into class references. What we want for inheritance is
// not 'anymanaged C' but 'C', so use `canonicalClassType`.
Type* ct = canonicalClassType(ts->type);
bool dynoWasUsed = (ct != ts->type);
AggregateType* pt = toAggregateType(ct);

AggregateType* pt = toAggregateType(ts->type);
// Dyno would already have issued the deprecation warning
if (!dynoWasUsed) {
ts->maybeGenerateDeprecationWarning(storesName);
}

if (pt == NULL) {
USR_FATAL(storesName, "Illegal super class %s", ts->name);
Expand Down
16 changes: 11 additions & 5 deletions compiler/AST/AstDump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ bool AstDump::enterDefExpr(DefExpr* node) {
if (isAggregateType(sym->type)) {
if (sym->hasFlag(FLAG_SYNC))
write("sync");

if (sym->hasFlag(FLAG_SINGLE))
write("single");
}

writeSymbol("type", sym, true);
Expand All @@ -245,8 +242,6 @@ bool AstDump::enterDefExpr(DefExpr* node) {
if (isSyncType(vs->type)) {
write("sync");

} else if (isSingleType(vs->type)) {
write("single");
}

write(true, sym->qualType().qualStr(), false);
Expand Down Expand Up @@ -854,6 +849,17 @@ void AstDump::exitCatchStmt(CatchStmt* node) {
write("}");
}

//
// ImplementsStmt
//
bool AstDump::enterImplementsStmt(ImplementsStmt* node) {
newline();
write("ifc");
if (fLogIds)
fprintf(mFP, "[%d]", node->id);
return true;
}

//
// Helper functions
//
Expand Down
5 changes: 0 additions & 5 deletions compiler/AST/AstDumpToHtml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ bool AstDumpToHtml::enterDefExpr(DefExpr* node) {
if (node->sym->hasFlag(FLAG_SYNC))
fprintf(mFP, "<B>sync</B> ");

if (node->sym->hasFlag(FLAG_SINGLE))
fprintf(mFP, "<B>single</B> ");

fprintf(mFP, "<B>type ");
writeSymbol(node->sym, true);
fprintf(mFP, "</B><UL>\n");
Expand All @@ -267,8 +264,6 @@ bool AstDumpToHtml::enterDefExpr(DefExpr* node) {
if (isSyncType(vs->type)) {
fprintf(mFP, "<B>sync </B>");

} else if (isSingleType(vs->type)) {
fprintf(mFP, "<B>single </B>");
}

fprintf(mFP, "<B>var </B> ");
Expand Down
Loading

0 comments on commit ede605b

Please sign in to comment.