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

Builtin Arrays #319

Open
zilinc opened this issue Nov 21, 2019 · 0 comments
Open

Builtin Arrays #319

zilinc opened this issue Nov 21, 2019 · 0 comments
Assignees
Labels
TASK An umbrella ticket. Mostly used in the kanban board.

Comments

@zilinc
Copy link

zilinc commented Nov 21, 2019

Current Status

On master branch, the array implementation is bit-rotted, but it's behind a compiler flag -builtin-arrays so it doesn't affect the compilation when disabled. It implemented unboxed arrays, with a few operators on it. The design was trying to explore the dependent type system, allowing us to check for array bounds, etc. It didn't allow take or put operations.

Progress

The dargent branch (apart from the Dargent development) also includes a work-in-progress of built-in arrays. A limited form of take and put operations have been implemented. The programmer can only take one element from the array. This design greatly simplifies index checks. Arrays can now be either boxed or unboxed. If the array is boxed, then allocation and free should be done via the C FFI by the programmer. A map2 primitive function is implemented, which allows simultaneously mapping over two arrays.

The array features are still behind the same flag. We also allow a restricted form of Dargent layout on array types. The surface typechecker is at the moment unsound, due to index checking problems.

Related Issues

#315 #331

@zilinc zilinc self-assigned this Nov 21, 2019
@zilinc zilinc added the TASK An umbrella ticket. Mostly used in the kanban board. label Nov 21, 2019
@zilinc zilinc changed the title Builtin arrays Builtin Arrays Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TASK An umbrella ticket. Mostly used in the kanban board.
Projects
None yet
Development

No branches or pull requests

1 participant