forked from chapel-lang/chapel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request chapel-lang#2338 from mppf/fix-localizeReturnSymbols
Fix localizeReturnSymbols to handle = with ref LHS The condition to replace = with PRIM_MOVE no longer fires because we are doing insertReferenceTemps before this code is run, and we did not in the past. The fix is to track symbols storing addr_of the ret argument. Two options for better fixes: - delay the insertion of reference temps until later in the program translation. - rework normalization for iterators so that there is no need to localize iterator symbols (possibly following Note #1 at the end of lowerIterators.cpp).
- Loading branch information
Showing
3 changed files
with
76 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
var A = ["this", "is", "a", "test"]; | ||
|
||
iter myiter() : string { | ||
for a in A do yield a; | ||
} | ||
|
||
proc main() { | ||
|
||
var baz: string; | ||
|
||
for x in myiter() { | ||
writeln(x); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
this | ||
is | ||
a | ||
test |