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.
Split shootout compatibility module into three — normal, GMP, and RE2 (…
…chapel-lang#23443) [trivial, not reviewed] In chapel-lang#23428, I failed to recognize the obvious — that in introducing my 'Compat' module, I was infecting all tests that `use`d it with potential dependencies (GMP, RE2) that their skipifs wouldn't skip past. Here, I'm splitting the Compat module into three so that each test can only bring in those third-party dependencies that it was already expecting to use.
- Loading branch information
Showing
8 changed files
with
23 additions
and
19 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 |
---|---|---|
@@ -1,21 +1,6 @@ | ||
use IO, BigInteger, Regex; | ||
use IO; | ||
|
||
@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,6 @@ | ||
use BigInteger; | ||
|
||
@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); | ||
} |
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,11 @@ | ||
use Regex; | ||
|
||
@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 |
---|---|---|
|
@@ -68,4 +68,4 @@ iter genDigits(numDigits) { | |
numer *= 10; | ||
} | ||
} | ||
use Compat; | ||
use Compat, CompatGMP; |
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,4 +58,4 @@ proc main(args: [] string) { | |
writeln(data.size); | ||
writeln(copy.size); | ||
} | ||
use Compat; | ||
use Compat, CompatRE2; |
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,4 +59,4 @@ proc main(args: [] string) { | |
writeln(data.size); | ||
writeln(copy.size); | ||
} | ||
use Compat; | ||
use Compat, CompatRE2; |