commit 14e68309490212624913c7b8acbbae1ac058382d
parent 492000b51e307a6017fbaea792e41730aa31ef3e
Author: Hannes Verschore <hv1989@gmail.com>
Date: Fri, 19 Dec 2025 19:14:22 +0000
Bug 2007094: Make sure we only use CACHEIR_SPEW functions if available r=iain
Differential Revision: https://phabricator.services.mozilla.com/D277162
Diffstat:
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/js/src/jit/StubFolding.cpp b/js/src/jit/StubFolding.cpp
@@ -113,10 +113,11 @@ static bool TryFoldingGuardShapes(JSContext* cx, ICFallbackStub* fallback,
uint32_t i = 0;
for (ICCacheIRStub* stub = firstStub; stub; stub = stub->nextCacheIR()) {
printer.printf("- stub %d (enteredCount: %d)\n", i, stub->enteredCount());
- ICCacheIRStub* cache_stub = stub->toCacheIRStub();
- CacheIRReader reader(cache_stub->stubInfo());
+# ifdef JS_CACHEIR_SPEW
+ ICCacheIRStub* cache_stub = stub->toCacheIRStub();
SpewCacheIROps(printer, " ", cache_stub->stubInfo());
+# endif
i++;
}
}
@@ -422,12 +423,14 @@ static bool TryFoldingGuardShapes(JSContext* cx, ICFallbackStub* fallback,
#ifdef JS_JITSPEW
if (JitSpewEnabled(JitSpew_StubFoldingDetails)) {
ICStub* newEntryStub = icEntry->firstStub();
- ICCacheIRStub* newStub = newEntryStub->toCacheIRStub();
Fprinter& printer(JitSpewPrinter());
- printer.printf("- stub 0 (enteredCount: %d)\n", newStub->enteredCount());
- CacheIRReader reader(newStub->stubInfo());
+ printer.printf("- stub 0 (enteredCount: %d)\n",
+ newEntryStub->enteredCount());
+# ifdef JS_CACHEIR_SPEW
+ ICCacheIRStub* newStub = newEntryStub->toCacheIRStub();
SpewCacheIROps(printer, " ", newStub->stubInfo());
+# endif
}
#endif