Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test262.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ concurrency:

jobs:
run_test262:
if: ${{ github.base_ref != 'dev/oscars-gc' }}
if: true
name: Run the test262 test suite
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 120
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
5 changes: 3 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/gc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ either = { workspace = true, optional = true }
thin-vec = { workspace = true, optional = true }
icu_locale_core = { workspace = true, optional = true }
arrayvec = { workspace = true, optional = true }
oscars = { git = "https://github.com/boa-dev/oscars.git", branch = "main", features = ["mark_sweep_branded"], optional = true }
oscars = { git = "https://github.com/shruti2522/oscars.git", branch = "fix-oom", features = ["mark_sweep_branded"], optional = true }
typeid = { workspace = true, optional = true }

[lints]
Expand Down
13 changes: 4 additions & 9 deletions core/gc/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,11 @@ impl GcContext {
#[must_use]
pub fn gc_collector(&self) -> &'static MutationContext<'static, 'static> {
thread_local! {
static COLLECTOR: &'static oscars::collectors::mark_sweep_branded::Collector =
Box::leak(Box::new(oscars::collectors::mark_sweep_branded::Collector::new()));

static DUMMY: &'static MutationContext<'static, 'static> = COLLECTOR.with(|c| {
Box::leak(Box::new(unsafe {
MutationContext::from_collector_erased(c)
}))
});
static GLOBAL_CTX: &'static MutationContext<'static, 'static> = {
Box::leak(Box::new(MutationContext::global()))
};
}
DUMMY.with(|dummy| *dummy)
GLOBAL_CTX.with(|ctx| *ctx)
}
}

Expand Down
4 changes: 3 additions & 1 deletion core/gc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,6 @@ mod test;

#[cfg(feature = "oscars_backend")]
/// Forces a garbage collection
pub fn force_collect() {}
pub fn force_collect() {
oscars::collectors::mark_sweep_branded::MutationContext::global().collect();
}
2 changes: 1 addition & 1 deletion core/string/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repository.workspace = true
rust-version.workspace = true

[dependencies]
oscars = { git = "https://github.com/boa-dev/oscars.git", branch = "main", features = ["mark_sweep_branded"], optional = true }
oscars = { git = "https://github.com/shruti2522/oscars.git", branch = "fix-oom", features = ["mark_sweep_branded"], optional = true }
itoa.workspace = true
rustc-hash = { workspace = true, features = ["std"] }
ryu-js.workspace = true
Expand Down
1 change: 1 addition & 0 deletions tests/tester/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ rust-version.workspace = true
[dependencies]
boa_engine = { workspace = true, features = ["float16"] }
boa_runtime = { workspace = true, features = ["test262"] }
boa_gc = { workspace = true }
clap = { workspace = true, features = ["derive"] }
serde = { workspace = true, features = ["derive"] }
serde_yaml = "0.9.34" # TODO: Track https://github.com/saphyr-rs/saphyr.
Expand Down
2 changes: 2 additions & 0 deletions tests/tester/src/exec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,8 @@ impl Test {
},
);

boa_gc::force_collect();

self.create_result(result, result_text, strict, verbosity)
}

Expand Down
Loading