author | Benjamin Bouvier <benj@benj.me> |
Wed, 25 Apr 2018 12:22:42 +0200 | |
changeset 415644 | 8c74001d3808e8b385c60da11f6ca99053bd816b |
parent 415643 | 417514d1ff3429cb266037937b330a9e0c9b641b |
child 415645 | d7dd8b0d2473d38abcc425e583c377eac734d14c |
push id | 33901 |
push user | apavel@mozilla.com |
push date | Thu, 26 Apr 2018 06:05:37 +0000 |
treeherder | mozilla-central@b62ad926cf2a [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jonco |
bugs | 1455611 |
milestone | 61.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
js/src/gc/GC.cpp | file | annotate | diff | comparison | revisions | |
js/src/jit-test/tests/wasm/gc/block-gczeal.js | file | annotate | diff | comparison | revisions |
--- a/js/src/gc/GC.cpp +++ b/js/src/gc/GC.cpp @@ -1065,16 +1065,31 @@ static const mozilla::EnumSet<ZealMode> ZealMode::YieldBeforeSweepingShapeTrees }; void GCRuntime::setZeal(uint8_t zeal, uint32_t frequency) { MOZ_ASSERT(zeal <= unsigned(ZealMode::Limit)); +#ifdef ENABLE_WASM_GC + // If we run with wasm-gc enabled and there's wasm frames on the stack, + // then GCs are suppressed and we should not allow to set the GC zeal, + // which presupposes that GC can be run right away. + // TODO (bug 1456824) This is temporary and should be removed once proper + // GC support is implemented. + JSContext* cx = rt->mainContextFromOwnThread(); + if (cx->options().wasmGc()) { + for (FrameIter iter(cx); !iter.done(); ++iter) { + if (iter.isWasm()) + return; + } + } +#endif + if (verifyPreData) VerifyBarriers(rt, PreBarrierVerifier); if (zeal == 0) { if (hasZealMode(ZealMode::GenerationalGC)) { evictNursery(JS::gcreason::DEBUG_GC); nursery().leaveZealMode(); } @@ -3992,17 +4007,17 @@ class MOZ_RAII js::gc::AutoRunParallelTa void run() override { func_(runtime()); } }; void GCRuntime::purgeRuntimeForMinorGC() -{ +{ // If external strings become nursery allocable, remember to call // zone->externalStringCache().purge() (and delete this assert.) MOZ_ASSERT(!IsNurseryAllocable(AllocKind::EXTERNAL_STRING)); for (ZonesIter zone(rt, SkipAtoms); !zone.done(); zone.next()) zone->functionToStringCache().purge(); rt->caches().purgeForMinorGC(rt);
new file mode 100644 --- /dev/null +++ b/js/src/jit-test/tests/wasm/gc/block-gczeal.js @@ -0,0 +1,11 @@ +wasmEvalText(`(module + (import "global" "func" (result i32)) + (func (export "func_0") (result i32) + call 0 ;; calls the import, which is func #0 + ) +)`, { global: { + func() { + gczeal(7,6); + gczeal(); + } +} }).exports.func_0();