Skip to content

Commit

Permalink
Workaround issue #16233 / #15973
Browse files Browse the repository at this point in the history
For e.g. test/library/standard/DataFrames/psahabu/AddSeries.chpl
  • Loading branch information
mppf committed Sep 3, 2020
1 parent 237cd31 commit 18312d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions compiler/resolution/callDestructors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1110,11 +1110,12 @@ static void insertCopiesForYields()
// Add an auto-copy here.
SET_LINENO(call);
Type* type = foundSe->symbol()->getValType();
Symbol* tmp = newTemp("_yield_expr_tmp_", type);
FnSymbol* copyFn = getAutoCopyForType(type);
Symbol* tmp = newTemp("_yield_expr_tmp_", copyFn->retType);
Expr* stmt = foundSe->getStmtExpr();
stmt->insertBefore(new DefExpr(tmp));
stmt->insertBefore(new CallExpr(PRIM_MOVE, tmp,
new CallExpr(getAutoCopyForType(type),
new CallExpr(copyFn,
foundSe->copy(),
new SymExpr(gFalse))));

Expand Down
20 changes: 10 additions & 10 deletions test/library/standard/DataFrames/DataFrames.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -495,33 +495,33 @@ module DataFrames {
}

iter items_fast() {
for t in zip(ords, data) do
yield t;
for (o,d) in zip(ords, data) do
yield (o,d);
}

iter items_fast(type idxType) {
if idx {
for t in zip(idx!.these(idxType), data) do
yield t;
for (i,d) in zip(idx!.these(idxType), data) do
yield (i,d);
}
}

// yields tuples where the first value is the valid bit
pragma "no doc" iter _these() {
for t in zip(valid_bits, data) do
yield t;
for (v,d) in zip(valid_bits, data) do
yield (v,d);
}

pragma "no doc"
iter _items() {
for t in zip(valid_bits, this.items_fast()) do
yield t;
for (v,d) in zip(valid_bits, this.items_fast()) do
yield (v,d);
}

pragma "no doc"
iter _items(type idxType) {
for t in zip(valid_bits, this.items_fast(idxType)) do
yield t;
for (v,d) in zip(valid_bits, this.items_fast(idxType)) do
yield (v,d);
}

/*
Expand Down

0 comments on commit 18312d8

Please sign in to comment.