Skip to content

refactor(value): migrate Value::Array to Array storage abstraction - #65

Open
anakrish wants to merge 1 commit into
storage-abstraction-array-foundationfrom
storage-abstraction-array-migration
Open

refactor(value): migrate Value::Array to Array storage abstraction#65
anakrish wants to merge 1 commit into
storage-abstraction-array-foundationfrom
storage-abstraction-array-migration

Conversation

@anakrish

@anakrish anakrish commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Swap Value::Array payload storage from Vec to value::Array while preserving Vec conversion compatibility.
  • Update as_array/as_array_mut to expose Array and delegate Value construction through Array::into_value.
  • Serialize RVM binary array payloads via Array-aware references and deserialize into Array.
  • Rewrite IterationState::Array around ArrayCursor; setup_next_iteration now self-advances and advance() is a no-op.
  • Migrate array builtins, interpreter/RVM sites, metadata, Azure helpers, schema/value tests, and the WASM binding test to the Array API.

Judgment calls

  • Kept Value::from(Vec) and made the internal from_array helper generic for compatibility while storing Array internally.
  • Added no new foundation methods; used existing Array APIs/as_slice where needed.

Validation

  • cargo +1.92.0 xtask fmt
  • cargo +1.92.0 xtask clippy
  • cargo +1.92.0 test --lib --all-features
  • cargo +1.92.0 test --doc --all-features
  • cargo +1.92.0 test --all-features

@anakrish
anakrish force-pushed the storage-abstraction-array-foundation branch from 872e582 to 05a1592 Compare June 4, 2026 20:30
@anakrish
anakrish force-pushed the storage-abstraction-array-migration branch from 2785962 to 05d332e Compare June 4, 2026 20:34
Swap Value::Array payload storage from Vec<Value> to the value::Array abstraction while preserving Vec<Value> conversion compatibility. Update as_array/as_array_mut to expose Array and delegate array Value construction through Array::into_value.

Delegate RVM binary serialization through Array-aware references and deserialize array payloads into Array. Rewrite IterationState::Array around ArrayCursor so setup_next_iteration self-advances and advance() is a no-op, with Rc copy-on-write snapshot coverage.

Migrate array builtin, interpreter, RVM, metadata, schema test, binding test, and language construction sites to the Array API. Judgment call: kept Value::from(Vec<Value>) and a generic internal from_array helper for existing compatibility while storing Array internally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@anakrish
anakrish force-pushed the storage-abstraction-array-foundation branch from 05a1592 to 81ae161 Compare June 6, 2026 12:58
@anakrish
anakrish force-pushed the storage-abstraction-array-migration branch from 05d332e to 121583f Compare June 6, 2026 12:58
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