From 79a35a52a64f5274f97af0a4ffe260cc0088aff9 Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Wed, 12 Feb 2020 10:55:40 +0000 Subject: [PATCH] Bug 1614622 part 4 - Remove now unused youngestFrameLocationAtAddr. r=djvj Differential Revision: https://phabricator.services.mozilla.com/D62428 --HG-- extra : moz-landing-system : lando --- js/src/jit/JitcodeMap.cpp | 27 --------------------------- js/src/jit/JitcodeMap.h | 29 ----------------------------- 2 files changed, 56 deletions(-) diff --git a/js/src/jit/JitcodeMap.cpp b/js/src/jit/JitcodeMap.cpp index a3814e42a6e1..3532039e133f 100644 --- a/js/src/jit/JitcodeMap.cpp +++ b/js/src/jit/JitcodeMap.cpp @@ -100,21 +100,6 @@ uint32_t JitcodeGlobalEntry::IonEntry::callStackAtAddr( return count; } -void JitcodeGlobalEntry::IonEntry::youngestFrameLocationAtAddr( - void* ptr, JSScript** script, jsbytecode** pc) const { - uint32_t ptrOffset; - JitcodeRegionEntry region = RegionAtAddr(*this, ptr, &ptrOffset); - - JitcodeRegionEntry::ScriptPcIterator locationIter = region.scriptPcIterator(); - MOZ_ASSERT(locationIter.hasMore()); - uint32_t scriptIdx, pcOffset; - locationIter.readNext(&scriptIdx, &pcOffset); - pcOffset = region.findPcOffset(ptrOffset, pcOffset); - - *script = getScript(scriptIdx); - *pc = (*script)->offsetToPC(pcOffset); -} - uint64_t JitcodeGlobalEntry::IonEntry::lookupRealmID(void* ptr) const { uint32_t ptrOffset; JitcodeRegionEntry region = RegionAtAddr(*this, ptr, &ptrOffset); @@ -195,13 +180,6 @@ uint32_t JitcodeGlobalEntry::BaselineEntry::callStackAtAddr( return 1; } -void JitcodeGlobalEntry::BaselineEntry::youngestFrameLocationAtAddr( - void* ptr, JSScript** script, jsbytecode** pc) const { - uint8_t* addr = reinterpret_cast(ptr); - *script = script_; - *pc = script_->baselineScript()->approximatePcForNativeAddress(script_, addr); -} - uint64_t JitcodeGlobalEntry::BaselineEntry::lookupRealmID() const { return script_->realm()->creationOptions().profilerRealmID(); } @@ -229,11 +207,6 @@ uint32_t JitcodeGlobalEntry::BaselineInterpreterEntry::callStackAtAddr( MOZ_CRASH("shouldn't be called for BaselineInterpreter entries"); } -void JitcodeGlobalEntry::BaselineInterpreterEntry::youngestFrameLocationAtAddr( - void* ptr, JSScript** script, jsbytecode** pc) const { - MOZ_CRASH("shouldn't be called for BaselineInterpreter entries"); -} - uint64_t JitcodeGlobalEntry::BaselineInterpreterEntry::lookupRealmID() const { MOZ_CRASH("shouldn't be called for BaselineInterpreter entries"); } diff --git a/js/src/jit/JitcodeMap.h b/js/src/jit/JitcodeMap.h index 1f3f47863c23..95412b84c3a9 100644 --- a/js/src/jit/JitcodeMap.h +++ b/js/src/jit/JitcodeMap.h @@ -322,9 +322,6 @@ class JitcodeGlobalEntry { uint32_t callStackAtAddr(void* ptr, const char** results, uint32_t maxResults) const; - void youngestFrameLocationAtAddr(void* ptr, JSScript** script, - jsbytecode** pc) const; - uint64_t lookupRealmID(void* ptr) const; bool hasTrackedOptimizations() const { return !!optsRegionTable_; } @@ -409,9 +406,6 @@ class JitcodeGlobalEntry { uint32_t callStackAtAddr(void* ptr, const char** results, uint32_t maxResults) const; - void youngestFrameLocationAtAddr(void* ptr, JSScript** script, - jsbytecode** pc) const; - uint64_t lookupRealmID() const; template @@ -437,9 +431,6 @@ class JitcodeGlobalEntry { uint32_t callStackAtAddr(void* ptr, const char** results, uint32_t maxResults) const; - void youngestFrameLocationAtAddr(void* ptr, JSScript** script, - jsbytecode** pc) const; - uint64_t lookupRealmID() const; }; @@ -468,12 +459,6 @@ class JitcodeGlobalEntry { return 0; } - void youngestFrameLocationAtAddr(JSRuntime* rt, void* ptr, - JSScript** script, jsbytecode** pc) const { - *script = nullptr; - *pc = nullptr; - } - uint64_t lookupRealmID() const { return 0; } }; @@ -715,20 +700,6 @@ class JitcodeGlobalEntry { return false; } - void youngestFrameLocationAtAddr(JSRuntime* rt, void* ptr, JSScript** script, - jsbytecode** pc) const { - switch (kind()) { - case Ion: - return ionEntry().youngestFrameLocationAtAddr(ptr, script, pc); - case Baseline: - return baselineEntry().youngestFrameLocationAtAddr(ptr, script, pc); - case Dummy: - return dummyEntry().youngestFrameLocationAtAddr(rt, ptr, script, pc); - default: - MOZ_CRASH("Invalid JitcodeGlobalEntry kind."); - } - } - uint64_t lookupRealmID(JSRuntime* rt, void* ptr) const { switch (kind()) { case Ion: