pc2 / pc2/sus-compiler

Allow Unset arrays

Open
#178 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
Rust
Stars
126
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Right now when an array is declared it'll have an initial value that is an array of unsets. But if we don't initialize anything, this is a bit of a waste, and could lead to unneccesary OOMs. (Think arrays representing large memory blocks). Instead, allow an array itself to be Unset, and only fill it out when an element is actually needed.

Ties into #159

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the array initialization and unset-value handling in the compiler, then follow the relationship to issue #159. The change is complete when an uninitialized array can remain Unset without eagerly creating an array of unsets, while elements become available when they are actually needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.