This website requires JavaScript.
Explore
Help
Sign In
idris-lang
/
Idris2
Watch
1
Star
1
Fork
0
You've already forked Idris2
mirror of
https://github.com/idris-lang/Idris2.git
synced
2024-12-21 02:31:50 +03:00
Code
Issues
Projects
Releases
Wiki
Activity
1d7d07a667
Idris2
/
tests
/
refc
/
issue2424
/
run
5 lines
99 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Add testing utilities script
2023-08-29 13:47:42 +03:00
. ../../testutils.sh
RefC backend improvements (#2425) * RefC backend improvements 1. OnCollect had the wrong number of arguments. The code creator expects 3 arguments, but onCollect in prim.h expected 4 arguments. The first of which was an erased arguments. That is now fixed. 2. OnCollect did not call `newReference` when creating a new reference to the pointer and the freeing function 3. OnCollect and OnCollectAny still had a spurious printf statement Those issues have been fixed, the test case can be found in tests/refc/garbageCollect 4. The IORef mechanism expects that the %World token will be passed around consistently. This is not the case. States in Control.App make use of IORefs, but the function created from Control.App.prim_app_bind had the world token erased to NULL. Now, IORefs are managed using a global variable, IORef_Storage * global_IORef_Storage; referenced in cBackend.h, defined in the created .c file, and set to NULL in main(); 5. While multithreading and forking is still not supported, compiling a program that makes use of Control.App demands a C implementation of prim_fork. Files support/refc/threads.c and support/refc/threads.h provide a dummy implementation for it, so that Control.App programs compile and run. A test for these 2 issues is given in tests/refc/issue2424 * format changes to make the linter happy * format changes to make the linter happy * format changes to make the linter happy * spelling mistake braket -> bracket Co-authored-by: Volkmar Frinken <volkmar@onutechnology.com>
2022-04-27 15:59:32 +03:00
[RefC] [Test] Valgrind support & Fix invalid memory read of strSubstr (#3196)
2024-01-22 16:25:22 +03:00
idris2 --cg refc -o test ControlAppMonadTest.idr
$VALGRIND ./build/exec/test
Reference in New Issue
Copy Permalink