diff --git a/js/src/ion/IonFrames.cpp b/js/src/ion/IonFrames.cpp index f6b643b4e78f..3fdfc97e08c7 100644 --- a/js/src/ion/IonFrames.cpp +++ b/js/src/ion/IonFrames.cpp @@ -26,7 +26,6 @@ #include "ion/IonFrameIterator-inl.h" #include "ion/IonFrames-inl.h" -#include "ion/PcScriptCache-inl.h" #include "vm/Probes-inl.h" namespace js { diff --git a/js/src/ion/PcScriptCache-inl.h b/js/src/ion/PcScriptCache-inl.h deleted file mode 100644 index 0a3b126488d4..000000000000 --- a/js/src/ion/PcScriptCache-inl.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- - * vim: set ts=8 sts=4 et sw=4 tw=99: - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#ifndef ion_PcScriptCache_inl_h -#define ion_PcScriptCache_inl_h - -#include "ion/PcScriptCache.h" - -namespace js { -namespace ion { - -// Get a value from the cache. May perform lazy allocation. -bool -PcScriptCache::get(JSRuntime *rt, uint32_t hash, uint8_t *addr, - JSScript **scriptRes, jsbytecode **pcRes) -{ - // If a GC occurred, lazily clear the cache now. - if (gcNumber != rt->gcNumber) { - clear(rt->gcNumber); - return false; - } - - if (entries[hash].returnAddress != addr) - return false; - - *scriptRes = entries[hash].script; - if (pcRes) - *pcRes = entries[hash].pc; - - return true; -} - -} // namespace ion -} // namespace js - -#endif /* ion_PcScriptCache_inl_h */ diff --git a/js/src/ion/PcScriptCache.h b/js/src/ion/PcScriptCache.h index 81fceb7e0c47..6158dadbd985 100644 --- a/js/src/ion/PcScriptCache.h +++ b/js/src/ion/PcScriptCache.h @@ -41,9 +41,24 @@ struct PcScriptCache } // Get a value from the cache. May perform lazy allocation. - // Defined in PcScriptCache-inl.h. bool get(JSRuntime *rt, uint32_t hash, uint8_t *addr, - JSScript **scriptRes, jsbytecode **pcRes); + JSScript **scriptRes, jsbytecode **pcRes) + { + // If a GC occurred, lazily clear the cache now. + if (gcNumber != rt->gcNumber) { + clear(rt->gcNumber); + return false; + } + + if (entries[hash].returnAddress != addr) + return false; + + *scriptRes = entries[hash].script; + if (pcRes) + *pcRes = entries[hash].pc; + + return true; + } void add(uint32_t hash, uint8_t *addr, jsbytecode *pc, JSScript *script) { entries[hash].returnAddress = addr;