Commit Graph

144 Commits

Author SHA1 Message Date
Matthew Mosior
53f448c0db
[ base ] Add atomically function (#3380)
* Adding initial implementation of atomicModifyIORef in Data.IORef.

* Updating chez003 test (IORefs) to add atomicModifyIORef.

* Updating CHANGELOG_NEXT.md.

* Fixing linting in libs/base/Data/IORef.idr.

* Fixing expected and tests/chez/chez003/IORef.idr to more appropriately test atomicModifyIORef functionality.

* Add documentation for libs/base/Data/IORef.idr.

* Clean up atomicModifyIORef in libs/base/Data/IORef.idr.

* Updating atomicModifyIORef implementation to drop codegen check, let client decide this.  Also update test to ensure enough contention to test for true atomicity (thanks to @stefan-hoeck for help with both of these).

* Remove documentation regarding backends other than chez.

* Update libs/base/Data/IORef.idr

Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>

* Updating CHANGELOG_NEXT.md with new function name, atomically, and updating tests/chez/chez003/IORef.idr to reflect new function.

* Fix linting for libs/base/Data/IORef.idr.

* Update documentation for modifyIORef in libs/base/Data/IORef.idr.

---------

Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2024-09-11 09:18:47 +01:00
Denis Buzdalov
2482ebb432
[ performance ] Implement weak memoisation of lazy values for chez and racket (#2791)
* [ lazy ] Weakly memoise lazy expressions on chez and racket

* [ lazy ] Make weak memoisation to be controlled by codegen directive
2024-08-06 15:24:57 +01:00
Steve Dunham
4d46c18b5f [ fix ] Report chez failures 2024-08-02 20:05:20 +01:00
Denis Buzdalov
a6c5cf5af0 [ fixup #2939 ] Make futures not interfere with optimisations 2024-06-03 15:43:23 +01:00
Mathew Polzin
073fbef3d1
Remove use of deprecated getByte function (#3190)
* Add CHANGELOG_NEXT entry
2024-01-14 11:26:51 -06:00
Robert Wright
424bc20c27 Group tests by directory 2023-09-07 14:57:22 +01:00
Robert Wright
2bde9104e0 Add filter_test_dir test utility 2023-09-07 14:57:22 +01:00
Robert Wright
61878ef1b6 Remove trivial testing input files 2023-09-07 14:57:22 +01:00
Robert Wright
09466a96bb Add testing utilities script 2023-09-07 14:57:22 +01:00
Steve Dunham
ecf4765c4b
[ fix ] Fix issue with eager evaluation of crashing functions (fixes #3003) (#3004)
* [ fix ] Fix issue with eager evaluation of crashing functions

* Mark functions that call unsafe builtins as non-constant

* Better detection of crash primop when deciding if functions can be constant
2023-06-28 08:32:48 +01:00
stefan-hoeck
3c9393e5a8 [ codegen ] constant fold believe_me 2023-05-06 14:52:14 +01:00
Stefan Höck
e34b5a64f0
[ codegen ] get rid of trivial let statements (#2961) 2023-05-06 08:35:17 +01:00
G. Allais
310a8f12cd
[ new ] missing buffer primitives (#2893) 2023-02-26 17:50:52 +00:00
Guillaume Allais
001f48fba8 [ test ] for io_bind inlining 2022-12-06 11:55:28 +00:00
G. Allais
85bb822f3b
[ perf ] manually eta-expand unsaturated io_bind calls (#2785) 2022-12-01 15:31:00 +00:00
CodingCellist
70ef197cf6
[ base ] Deprecate setByte in favour of setBits8 (#2764)
* [ base ] Deprecate setByte in favour of setBits8
           Deprecate getByte; fix Core.Binary.Prims

Along with `setByte`, the `getByte` function should similarly be
deprecated since it also assumes the value will have the given size,
rather than guaranteeing it in the type.

CI highlighted some required changes in `Core.Binary.Prims` thanks to
`-Werror`. The fix was to add some `cast` calls where the old `getByte`
and `setByte` used to be.

The RefC buffer test will need updating once we remove the functions
completely. Added a note for future peeps.
2022-11-15 10:42:07 +01:00
G. Allais
19d0cbcd37
[ new ] put TTC files in a version-tagged directory (#2684) 2022-11-01 18:11:18 +00:00
G. Allais
51d00638b0
[ cosmetic ] Say when you start compiling the executable (#2714) 2022-10-14 16:21:19 +01:00
Sam Phillips
54a426356a Move channel tests to allschemes 2022-10-04 10:24:27 +02:00
Sam Phillips
795eeb23c5 Make Racket backend channels behave same as Chez.
Add tests for both that demonstrate equivalent behavior.
2022-10-04 10:24:27 +02:00
stefan-hoeck
2344004d9d [ test ] add another test case 2022-09-29 16:34:41 +02:00
stefan-hoeck
0543779200 [ performance ] constant fold prim__integerToNat 2022-09-29 16:30:03 +02:00
Stefan Höck
7eebeff905
[ fix ] natToFinLt is O(n) (#2689) 2022-09-29 14:36:32 +01:00
Stefan Höck
08f24e79fd
[ performance ] constant folding for all integral expressions (#2662) 2022-09-21 10:05:02 +01:00
Steve Dunham
4088dd863b Rebuild TTC if they don't contain needed incremental data (related to #2560) 2022-08-03 07:12:46 -07:00
Steve Dunham
0454dfd66a Address issue #2557 Incremental compilation is used when .so files are missing. 2022-06-25 19:56:56 -07:00
Denis Buzdalov
e8d3d788c1
[ base ] Add some more properties, functions and interface implementations (#2361) 2022-03-23 13:33:13 +00:00
G. Allais
35b2362487
[ new ] failing blocks (#2360) 2022-03-23 12:01:13 +00:00
stefan-hoeck
51eb854a60 [ fix ] euclidian mod and div for scheme backends 2022-03-08 17:40:29 +00:00
Denis Buzdalov
a09c5082c5
[ base ] Use Fin n as index in Bits (#2192) 2021-12-16 18:26:52 +00:00
André Videla
cc45ff957a
Merge pull request #2085 from andrevidela/string-parser-position
Show the line and column in diagnostic message in String.Parser
2021-11-15 11:09:57 +00:00
André Videla
7f932036e9 Show the line and column in diagnostic message
This also updates the error message of some common combinators
2021-11-10 00:44:09 +00:00
Robert Wright
c1fc487bec Return error code from pclose 2021-11-05 11:59:17 +00:00
Robert Wright
12955bc5bc Add takeUntil Data.String.Parser parser 2021-11-01 13:54:46 +00:00
madman-bob
a6a64c6ddf
[ contrib ] Alternating lists of known parity (#2043) 2021-10-30 00:12:44 +01:00
Mathew Polzin
fa06e9936b
Warn about unreachable default clauses (#1942)
* so much experimentation

* tests that show preliminary evidence the new stuff is working.

* small amount of cleanup

* more cleanup of various troubleshooting code.

* new test case added.

* only log unreachable indices if there are any.

* when traversing deeper simply skip over defaults since they have already been reviewed.

* Remove fallback clause that the changes in this PR correctly identified as unreachable.

* tidying up more.

* move some common functions to a new Core.Case.Util module.

* refer to case builder and case tree under new parent module.

* update imports to look for CaseTree in new submodule.

* update api ipkg

* remove unneeded application operators.

* remove or comment out unreachable default clauses caught by the changes in this PR.

* a bit of code documentation and renaming for clarity.

* bump previous version in CI.

* fix API usage of Util module.

* Add issue 1079 test cases.

* forgot to add new test cases file.

* remove commented-out lines by request of RefC author.

* Use a SortedSet instead of nubbing a list.

* update new case tree import.

* Update src/Core/Case/Util.idr

Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>

* remove function with nothing to offer above and beyond a differently named copy of the same code.

* replace a large tuple with a record; discover not all of the tuple's fields were needed.

* fix shadowing warning.

Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2021-10-02 12:55:21 +01:00
Stefan Höck
af5657d23a
[ performance ] Memoise toplevel constants (#1899)
* [ performance ] memoize toplevel constants

* [ test ] memoization tests

* [ fix ] fix blodwen-lazy for racket and gambit
2021-09-08 16:46:19 +01:00
Edwin Brady
f4cc2f1ea8
Merge pull request #1721 from edwinb/AliasQli-master
Updated: add doublePow to primitives
2021-07-15 23:17:53 +01:00
Stiopa Koltsov
c80a502627 Return Bool from IOArray.writeArray
As suggested in #1677.

Crashing on out-of-bounds might be more practical, but we can
reconsider it later.
2021-07-15 22:16:22 +01:00
Edwin Brady
f51aa22046 Bring #1719 up to date with latest changes 2021-07-15 22:04:49 +01:00
Edwin Brady
62586627d8 fix arity for blodwen-set-thread-data
This is an update of PR #540, thanks to @lodi
2021-07-15 15:02:43 +01:00
Stiopa Koltsov
9f61e542b4 Move rm -rf to the beginning of the test
While the discussion about how to refactor test framework is not
finished (#1654), make this change: move `rm -rf build` in the
beginning of the test. For these reasons:

* it is useful to inspect the contents of the `build` directory
  especially after the test failure
* if build crashes mid-test (e.g. process killed), next run should
  not be affected by the `build` directory from the previous run
2021-07-13 22:54:53 +01:00
Johann Rudloff
d5abff4e46
[ fix #1260 ] Use blodwen-stringbytelen instead of C's strlen (#1261) 2021-07-13 11:52:15 +01:00
Niklas Larsson
eb0c59c908
Enable incremental compilation on Windows. (#1694) 2021-07-13 11:29:34 +01:00
Edwin Brady
9bd32c4a3d Fix chez033 on windows
This prints lots of warnings since incremental compilation is not
available, so turn that off when running on windows for now.
2021-07-11 17:04:07 +01:00
Edwin Brady
c839c98c7d Add test for incremental compilation
Ideally we'd have a complete incremental build in CI, but that could be
a bit fiddly to set up at the moment (updating bootstrap code might make
it easier). This tests that the basic facilities work, though - there's
a lot can go wrong even in a small test like this, trust me, I have made
those mistakes :).
2021-07-11 00:05:00 +01:00
Zoe Stafford
0ecbd517e8
[ improvement ] VMCode (#1662) 2021-07-07 17:06:59 +01:00
CodingCellist
fac0e32f48
[ fix ] Chez channels (#1596) 2021-07-02 13:13:50 +01:00
Stefan Höck
6ed266d306
[ new ] Missing integer type interfaces (#1629)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-06-28 20:00:10 +01:00
Kamiλ Shakirov
8e30b296c0
[ refactor ] Remove Data.Strings module (#1607) 2021-06-28 13:48:37 +01:00