Skip to content

Conversation

ZoomRmc
Copy link
Contributor

@ZoomRmc ZoomRmc commented Sep 19, 2025

  • Removed redundant len and reserved sets already performed by prior rawNewStringNoInit calls.
  • Reuse appendChar
  • Removed never used newOwnedString
  • Added internal toOwnedCopy
  • Documents differences in impls of internal procs used for system.string.setLen:
    • strs_v2.setLengthStrV2:
      • does not set the terminating zero byte when new length is 0
      • does not handle negative new length
    • sysstr.setLengthStr:
      • sets the terminating zero byte when new length is 0
      • bounds negative new length to 0

- Removed redundant `len` and `reserved` sets already
     performed by prior `rawNewStringNoInit` calls.
- Reuse `appendChar`
- Removed never used `newOwnedString`
- Added internal `toOwnedCopy`
- Documents differences in impls of internal procs used for
  `system.string.setLen`:
  + `strs_v2.setLengthStrV2`:
    - does not set the terminating zero byte when new length is 0
    - does not handle negative new length
  + `sysstr.setLengthStr`:
    - sets the terminating zero byte when new length is 0
    - bounds negative new length to 0
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.

1 participant