Skip to content

Add runtime string construction and concatenation #81

Description

@itsfuad

Goal

Add runtime construction and concatenation for owned str values.

Parent

Follow-up to #29. Existing literals, borrowed views, ranges, and compiler operations remain canonical.

Required semantics

  • Construct immutable owned str values from runtime data.
  • Define concatenation result ownership and allocator provenance.
  • Preserve UTF-8 validity and byte-length semantics.
  • Reuse existing owned string carrier and allocator descriptor.
  • Keep construction separate from C and FFI boundary conversion tracked by the sibling follow-up.

Constraints

  • No mutable string contents.
  • No hidden process allocator when an input owner carries allocator provenance.
  • No alternate string carrier or backend-only shortcut.
  • Source operations must lower through canonical semantic, HIR, MIR, and LLVM evidence.

Validation

  • Typechecker and ownership tests for construction and concatenation.
  • HIR, MIR, and LLVM tests for allocator and cleanup behavior.
  • Positive runtime fixtures for empty, ASCII, UTF-8, chained, and temporary values.
  • Negative fixtures for invalid ownership or unsupported operand forms.
  • 32-bit and 64-bit carrier checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlanguage-modelPeeper language model, ownership, pointer, optional, array/slice workruntime-loweringHIR/MIR/backend runtime lowering work

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions