Skip to content

Conversation

@phischu
Copy link
Collaborator

@phischu phischu commented Nov 22, 2025

  • Review resizable array (what is the intended semantics even)
  • Change names of vm primitives.
  • Check allocateZeros and allocateNones on JS
  • Measure performance cost

@phischu phischu force-pushed the stdlib/safe_array branch 2 times, most recently from 0a92742 to 8b71915 Compare November 24, 2025 10:40
@phischu
Copy link
Collaborator Author

phischu commented Nov 24, 2025

For some reason the stdlib tests go into an endless loop now.

@phischu phischu marked this pull request as ready for review November 24, 2025 17:30
@phischu phischu requested review from jiribenes and marzipankaiser and removed request for marzipankaiser December 11, 2025 13:05
}

/// Allocate a new, empty dynamic array
/// Aallocatellocate a new, empty dynamic array
Copy link
Contributor

Choose a reason for hiding this comment

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

typo 👀

a.checkOutOfBounds(-1)
a.add(1)
a.add(2)
a.checkOutOfBounds(2)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we somehow have a test for something like this, still? Even if just checking that it panics afterwards - for the resizable arrays, it might return the value at index 2 still (if capacity is >2) even if the length is just 2. And this might be hard to catch otherwise. 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd personally be fine with the resizable arrays still using Exception[OutOfBounds] everywhere (and perhaps later a fail instead).

@phischu phischu merged commit 6e4ff0c into master Dec 15, 2025
9 checks passed
@phischu phischu deleted the stdlib/safe_array branch December 15, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants