Skip to content

[oscars-integration] Thread MutationContext through buitlin standard library objects - #5479

Draft
shruti2522 wants to merge 3 commits into
boa-dev:dev/oscars-gcfrom
shruti2522:feat/msb-phase3-builtins
Draft

[oscars-integration] Thread MutationContext through buitlin standard library objects#5479
shruti2522 wants to merge 3 commits into
boa-dev:dev/oscars-gcfrom
shruti2522:feat/msb-phase3-builtins

Conversation

@shruti2522

Copy link
Copy Markdown
Contributor

Stacked on #5478, this PR enforces threading MutationContext through all internal builtins, removing previous temporary fallbacks.

Key Changes:

  • Removed *_in methods, temporary methods like JsObject::new_in are gone. Main methods (e.g., JsObject::new) have absorbed their signatures and now require the context.
  • Removed Default for core objects: StandardConstructors, IntrinsicObjects and Intrinsics can no longer use Default::default(); they must be instantiated via uninit(mc)
  • Macros (eg., boa_class) were updated to dynamically fetch context.gc_collector() without violating Rust's mutable borrowing rules.
  • Signatures in the CLI, examples and tests were updated. Detached tests and macros temporarily use &unsafe { boa_gc::MutationContext::global() } to minimize immediate code breakage

@github-actions github-actions Bot added the Waiting On Review Waiting on reviews from the maintainers label Aug 17, 2026
@github-actions github-actions Bot added this to the v1.0.0 milestone Aug 17, 2026
@github-actions github-actions Bot added C-Dependencies Pull requests that update a dependency file C-Benchmark Issues and PRs related to the benchmark subsystem. C-CLI Issues and PRs related to the Boa command line interface. C-Tests Issues and PRs related to the tests. C-Builtins PRs and Issues related to builtins/intrinsics C-VM Issues and PRs related to the Boa Virtual Machine. C-Actions Pull requests that update Github Actions code C-GC Issue related to garbage collection C-Intl Changes related to the `Intl` implementation C-Runtime Issues and PRs related to Boa's runtime features labels Aug 17, 2026
@shruti2522 shruti2522 changed the title Feat/msb phase3 builtins [oscars-integration] Thread MutationContext through buitlin standard library objects Aug 17, 2026
@shruti2522
shruti2522 force-pushed the feat/msb-phase3-builtins branch 4 times, most recently from bd7e085 to 310be44 Compare August 17, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Actions Pull requests that update Github Actions code C-Benchmark Issues and PRs related to the benchmark subsystem. C-Builtins PRs and Issues related to builtins/intrinsics C-CLI Issues and PRs related to the Boa command line interface. C-Dependencies Pull requests that update a dependency file C-GC Issue related to garbage collection C-Intl Changes related to the `Intl` implementation C-Runtime Issues and PRs related to Boa's runtime features C-Tests Issues and PRs related to the tests. C-VM Issues and PRs related to the Boa Virtual Machine. Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant