Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve support for lists in cptypes #858

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Conversation

mflatt
Copy link
Contributor

@mflatt mflatt commented Aug 3, 2024

Move list form the normalptr slot to the multiplet slot. In particular, this allows the reduction of

  (lambda (x f)
    (unless (list-assuming-immutable? x)
      (f)
      (list-assuming-immutable? x)))

pairs are split in list-pairs and nonlist-pairs. A pair may go from one classification to the other, so the internal representations of the list? predicate use both of them or neither.

@mflatt
Copy link
Contributor Author

mflatt commented Aug 3, 2024

This is an old commit by @gus-massa that I missed when merging Racket changes toward version 10. I discovered the missing commit when double-checking for differences between Racket's current copy of Chez Scheme and this repo.

I think maybe I was concerned at the time with issue discussed in racket/racket#4610, and meant to set it aside temporarily when merging. But as the discussion there says, this commit doesn't introduce the issue, and I believe it's an improvement on its own.

@@ -285,9 +288,13 @@
(define flvector*-mask #b0100000000000000)
(define box-mask #b1000000000000000)

;These two are more tricky, becuase they are not a constant property.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two are trickier, because they are not constant properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated - thanks

Move `list` form the normalptr slot to the multiplet slot.
In particular, this allows the reduction of

  (lambda (x f)
    (unless (list-assuming-immutable? x)
      (f)
      (list-assuming-immutable? x)))

`pair`s are split in `list-pairs` and `nonlist-pairs`.
A `pair` may go from one classification to the other,
so the internal representations of the `list?` predicate
use both of them or neither.
@mflatt mflatt merged commit a982d6b into cisco:main Aug 28, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants