Commit graph

35256 commits

Author SHA1 Message Date
Richard Feldman
bedcc21575
Use extern for serialized structs 2025-11-22 12:30:32 -05:00
Richard Feldman
fdc1a9832d
Update tests 2025-11-22 08:35:54 -05:00
Richard Feldman
49153aee7b
Restore missing skip 2025-11-22 08:18:15 -05:00
Richard Feldman
312eb1d8df
Fix lints 2025-11-22 08:15:19 -05:00
Richard Feldman
1d90005578
Fix remaining tests 2025-11-22 08:01:01 -05:00
Richard Feldman
083197e4ac
Fix tests 2025-11-21 20:04:32 -05:00
Richard Feldman
b5c28c3ee9
Merge remote-tracking branch 'origin/main' into poly-numbers 2025-11-21 19:49:07 -05:00
Richard Feldman
8d521e1848
Remove some plan .md files 2025-11-21 19:40:47 -05:00
Richard Feldman
67219da142
Fix tests 2025-11-21 18:31:29 -05:00
Richard Feldman
cb35a9f872
Finish implementing from_num_literal 2025-11-21 16:31:57 -05:00
Richard Feldman
807b494e0f
Initial implementation of from_num_literal 2025-11-21 16:17:29 -05:00
Anton-4
bddd3f6ac6
rm test_bundle_logic.zig (#8409)
This was not actually testing stuff defined outside the test.
2025-11-21 19:28:39 +01:00
Richard Feldman
bf716ff253
Fix some more tests 2025-11-21 13:09:36 -05:00
Richard Feldman
48772104e6
Fix custom number type tests 2025-11-21 12:52:04 -05:00
Anton-4
4d8fd89fbc
improved wiring check (#8408)
* better test wiring check

* unnecessary exclusion
2025-11-21 18:49:42 +01:00
Richard Feldman
94441483ae
Fix some more tests 2025-11-21 12:20:44 -05:00
Richard Feldman
d4e4b58dfd
Update some tests, delete obsolete ones 2025-11-21 11:20:41 -05:00
Anton-4
576a58c390
Fix test-cli deps (#8407)
* properly set up test-cli deps

* refactor
2025-11-21 16:21:09 +01:00
Richard Feldman
bd4006ce3a
Don't special-case Bool rendering 2025-11-21 09:59:59 -05:00
Richard Feldman
d3a0e0b12a
Flip the order of Bool's tags in Builtin.roc 2025-11-21 09:59:41 -05:00
Richard Feldman
259ddb5399
Fix some more eval stuff 2025-11-21 09:31:39 -05:00
Anton-4
15b4fc893e
cleanup addMainExe (#8403)
* cleanup addMainExe

* retry on 503

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-11-21 12:26:22 +01:00
Richard Feldman
c55bc046ea
wip 2025-11-20 21:51:07 -05:00
Richard Feldman
1b3017b839
Remove .bool special layout 2025-11-20 21:31:56 -05:00
Norbert Hajagos
724ba77685
Merge pull request #8384 from roc-lang/fix-detect-libc
fix failing to detect libc on NixOs
2025-11-21 03:27:25 +01:00
Richard Feldman
88e74d8a31
Unskip a bunch of tests 2025-11-20 20:45:11 -05:00
Richard Feldman
7e352a06d6
Merge pull request #8405 from roc-lang/if-without-else
Add if-without-else
2025-11-20 18:37:58 -05:00
Richard Feldman
11d57e404d
Merge pull request #8404 from roc-lang/while-loops
Add support for `while` loops
2025-11-20 18:31:58 -05:00
Richard Feldman
4e2ee4e38c
Add if-without-else 2025-11-20 16:49:48 -05:00
Richard Feldman
82287dbd3a
Add support for while loops 2025-11-20 16:48:18 -05:00
Richard Feldman
b65ba5bde3
Make builtins available to comptime evaluator 2025-11-20 14:38:19 -05:00
Richard Feldman
7423012999
Fix an e_low_level_lambda builtins bug 2025-11-20 13:34:27 -05:00
Anton-4
d4de4ba4d5
move cli integration tests together (#8402) 2025-11-20 16:46:38 +01:00
Richard Feldman
462ba4c109
wip 2025-11-20 10:37:41 -05:00
Norbert Hajagos
0ee216bbf0
Merge branch 'main' into fix-detect-libc 2025-11-20 13:55:43 +01:00
Norbert Hajagos
89e180fdf0
remove allcator field from LibcInfo, since it's going to the arena 2025-11-20 11:59:58 +01:00
Richard Feldman
5d5814653c
Fix match expression memory issues and implement tuple decref
This commit addresses two critical issues in the interpreter's match
expression handling:

1. Stack corruption in match expressions: The scrutinee's stack-allocated
   header was being corrupted when pattern match bindings allocated new
   stack space, reusing the same memory. Fixed by using pushCopy to
   allocate a fresh stack location for the scrutinee, protecting it from
   corruption during pattern matching.

2. Missing tuple element cleanup: StackValue.decref had no case for
   .tuple layout tags, causing it to skip cleanup entirely. This meant
   refcounted elements inside tuples (lists, strings, boxes, etc.) were
   never being decref'd. Added proper tuple decref logic that iterates
   through tuple elements and decrefs each one, similar to record handling.

The "match list pattern destructures" test now passes, though there are
still memory leaks from list allocations that need further investigation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 01:13:24 -05:00
Richard Feldman
0d8eabd609
Fix crash in match list pattern destructures test
The test was crashing with an integer overflow during memory deallocation.

Root cause:
1. The scrutinee (the list [1, 2, 3]) was evaluated and its RocList header
   was stored on the interpreter's stack
2. During pattern matching ([a, b, c]), new stack allocations for bindings
   reused the same memory region
3. The RocList header was corrupted by subsequent stack allocations
4. When the deferred scrutinee.decref tried to free the list, it read
   garbage from the corrupted header
5. This led to attempting to deallocate memory with size 0, causing integer
   overflow in old_memory.len - 1

Solution:
Changed the match expression handler to make a copy of the scrutinee before
pattern matching. The pushCopy call allocates a new stack location for the
RocList header and increments the refcount of the underlying data. This
protects the header from being corrupted by subsequent stack allocations
during pattern matching.

Result:
- Before: Test crashed with integer overflow (signal 6)
- After: Test passes successfully (with a minor memory leak)
- Overall: 262/287 tests passing (91.3% pass rate)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 00:30:03 -05:00
Richard Feldman
1f1c61091a
More number fixes 2025-11-20 00:06:05 -05:00
Richard Feldman
e9131727de
Add deferred literals for comptime evaluation 2025-11-19 16:31:04 -05:00
Richard Feldman
3c6f0bacd6
Hardcode numeric conversions for now 2025-11-19 15:26:15 -05:00
Richard Feldman
2fc3b7afb6
Merge pull request #8401 from roc-lang/remove-box-primitive
Remove .box primitive
2025-11-19 15:22:07 -05:00
Richard Feldman
cba3a47789
Address a TODO 2025-11-19 14:22:48 -05:00
Richard Feldman
e315d198b5
Fix some layout stuff 2025-11-19 13:43:03 -05:00
dependabot[bot]
f36d61a955
Bump js-yaml in /crates/compiler/checkmate/www (#8400)
Bumps  and [js-yaml](https://github.com/nodeca/js-yaml). These dependencies needed to be updated together.

Updates `js-yaml` from 4.1.0 to 4.1.1
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

Updates `js-yaml` from 3.14.1 to 3.14.2
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-19 19:30:56 +01:00
Richard Feldman
709caab65f
Remove .box primitive 2025-11-19 13:30:08 -05:00
Anton-4
9fafa499e6
fix bad path on check error (#8398)
* fix bad path on check error

* CI ignore .rules changes

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-11-19 19:09:29 +01:00
Anton-4
988ceab26d
use retry action everywhere (#8399) 2025-11-19 19:08:49 +01:00
Richard Feldman
e5153d7624
Use static dispatch for arithmetic 2025-11-19 12:29:55 -05:00
Richard Feldman
6aca9773b7
Fix defaulting to Dec + unification 2025-11-19 10:31:11 -05:00