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

Added Slice as its own type info in userland #1000

Merged
merged 2 commits into from May 9, 2018
Merged

Conversation

Hejsil
Copy link
Sponsor Contributor

@Hejsil Hejsil commented May 9, 2018

There are a few reasons why we want this:

  • Checking if something is a slice becomes trivial.
  • The pointer properties of the slice are immediately available. No need to get the ptr field and @typeInfo that.
  • When @createType/@reify becomes a thing, this will make it possible to actually construct slices.

This is only a userland change. The backend still treats slices as structs.

@Hejsil
Copy link
Sponsor Contributor Author

Hejsil commented May 9, 2018

Didn't realize that I got #1000. Nice 🎊 🎆

@andrewrk andrewrk merged commit 116914a into master May 9, 2018
@andrewrk
Copy link
Member

andrewrk commented May 9, 2018

Good idea

@Hejsil Hejsil deleted the slice-type-info branch May 9, 2018 13:34
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.

None yet

2 participants