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.
Keep submitted shootouts in a testable state (chapel-lang#23428)
[trivial, not reviewed] With so many submitted shootouts relying on deprecated features that have now been removed, and so marked as `.notest` tests, we've lost the ability to make sure we haven't lost performance, and the value of keeping them in sync is reduced—particularly since we expect to submit updated 2.0-compatible versions of the shootouts shortly after the release. This PR keeps the tests limping along, for now with minimal source changes from what was submitted, by adding a 'Compat' module that implements all missing features in terms of existing features and 'use'-ing it at the end of the file to keep the clbg-diff's restricted to one line, and the .good and .perfkeys files the same. This will permit them to continue being tested until we have the chance to rewrite them in the form that we intend to submit them as updates.
- Loading branch information
Showing
31 changed files
with
49 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use IO, BigInteger, Regex; | ||
|
||
@deprecated("openfd is deprecated, please use the file initializer with a 'c_int' argument instead") | ||
proc openfd(x) { | ||
return new file(x); | ||
} | ||
|
||
@deprecated("bigint.div_q using Round is deprecated, use the standalone function div with roundingMode instead") | ||
proc ref bigint.div_q(x, y) { | ||
div(this, x, y); | ||
} | ||
|
||
@deprecated("'Regex.compile' is deprecated. Please use 'new regex()' instead.") | ||
proc compile(x) { | ||
return new regex(x); | ||
} | ||
|
||
@deprecated("regex.sub is deprecated. Please use string.replace.") | ||
proc regex.sub(x, y) { | ||
return y.replace(this, 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 @@ | ||
Compatability shim |
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,10 @@ | ||
SRCS := $(wildcard *.chpl) | ||
BINS = $(SRCS:%.chpl=%) | ||
|
||
all: $(BINS) | ||
echo $(SRCS) | ||
|
||
%: %.chpl | ||
chpl $< | ||
|
||
.PHONY: Compat |
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 |
---|---|---|
|
@@ -154,3 +154,4 @@ iter getRands(n) { | |
yield lastRand: real / IM; | ||
} | ||
} | ||
use Compat; |
Empty file.
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 |
---|---|---|
|
@@ -173,3 +173,4 @@ proc getRands(n, arr) { | |
arr[i] = lastRand; | ||
} | ||
} | ||
use Compat; |
Empty file.
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 |
---|---|---|
|
@@ -156,3 +156,4 @@ inline proc getNextRand() { | |
lastRand = (lastRand * IA + IC) % IM; | ||
return lastRand; | ||
} | ||
use Compat; |
Empty file.
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 |
---|---|---|
|
@@ -131,3 +131,4 @@ inline proc startsWithThree(data) { | |
data[3] == "H".toByte(); | ||
} | ||
|
||
use Compat; |
Empty file.
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 |
---|---|---|
|
@@ -137,3 +137,5 @@ record hashVal { | |
return val; | ||
} | ||
} | ||
|
||
use Compat; |
Empty file.
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 |
---|---|---|
|
@@ -64,3 +64,4 @@ proc main() { | |
w.writef("%i %i\n", n, n); | ||
w.write(image); | ||
} | ||
use Compat; |
Empty file.
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 |
---|---|---|
|
@@ -77,3 +77,4 @@ inline operator >(xs, y) { | |
return false; | ||
return true; | ||
} | ||
use Compat; |
Empty file.
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 |
---|---|---|
|
@@ -68,3 +68,4 @@ iter genDigits(numDigits) { | |
numer *= 10; | ||
} | ||
} | ||
use Compat; |
Empty file.
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 |
---|---|---|
|
@@ -58,3 +58,4 @@ proc main(args: [] string) { | |
writeln(data.size); | ||
writeln(copy.size); | ||
} | ||
use Compat; |
Empty file.
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 |
---|---|---|
|
@@ -59,3 +59,4 @@ proc main(args: [] string) { | |
writeln(data.size); | ||
writeln(copy.size); | ||
} | ||
use Compat; |
Empty file.
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 |
---|---|---|
|
@@ -101,3 +101,4 @@ proc createTable() { | |
|
||
return table; | ||
} | ||
use Compat; |
Empty file.
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
Empty file.
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
real | ||
verify:16666684:AACATTACAGGTAATGATAA | ||
verify:16666685:AACATTACAGGTAATGATAA |
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
Empty file.