Skip to content

D120: copy-on-write value collections and structs; resource type #2304

Closed

Description

@ehartford

Ruling D120 (2026-10-09). Implement alongside the List header change (D115 Amendment 1), after D118's rename and D119:

  • value-ness is compositional: List/HashMap/HashSet/BTreeMap of values, structs whose fields are values with no Drop and no resource type; resource type contextual keyword (implied by Drop).
  • copy-on-write with an atomic count in the allocation; uniqueness check at mutations not proven unique, hoisted out of loops; unique before a mutable pointer goes to C; generics per instantiation; a report of where CoW copies can occur.
    Merge conditions: self-host compile time and the pcre2/zlib corpus test suites within 2% (interleaved local A/B, repeated runs). A held regression goes to Eric with numbers and a profile. Tracked, not blocking: push through a field, element write through a parameter, share-then-mutate.

Activity

  1. ehartford commented on Oct 18, 2026

    @ehartford
    ContributorAuthor

    Completed all 6 stages of D120 (PRs #2440–#2446, merged at 5b4939669).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions