Skip to content

Commit b26bc06

Browse files
authored
Merge pull request #1613 from justinmichaud/eng/ARMv7-Disable-caches-to-reduce-memory-footprint-backport
[ARMv7] Disable caches to reduce memory footprint
2 parents 0e58074 + 5029e4e commit b26bc06

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

Source/JavaScriptCore/assembler/AssemblerBuffer.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ namespace JSC {
119119
// from initialization
120120
poisonInlineBuffer();
121121
#endif
122+
if constexpr (is32Bit())
123+
return;
122124
if constexpr (type == AssemblerDataType::Code)
123125
takeBufferIfLarger(*threadSpecificAssemblerData());
124126
#if ENABLE(JIT_SIGN_ASSEMBLER_BUFFER)
@@ -181,14 +183,16 @@ namespace JSC {
181183

182184
~AssemblerDataImpl()
183185
{
184-
if constexpr (type == AssemblerDataType::Code)
185-
threadSpecificAssemblerData()->takeBufferIfLarger(*this);
186+
if constexpr (!is32Bit()) {
187+
if constexpr (type == AssemblerDataType::Code)
188+
threadSpecificAssemblerData()->takeBufferIfLarger(*this);
186189
#if ENABLE(JIT_SIGN_ASSEMBLER_BUFFER)
187-
if constexpr (type == AssemblerDataType::Hashes)
188-
threadSpecificAssemblerHashes()->takeBufferIfLarger(*this);
190+
if constexpr (type == AssemblerDataType::Hashes)
191+
threadSpecificAssemblerHashes()->takeBufferIfLarger(*this);
189192
#else
190-
static_assert(type != AssemblerDataType::Hashes);
193+
static_assert(type != AssemblerDataType::Hashes);
191194
#endif
195+
}
192196
clear();
193197
}
194198

Source/JavaScriptCore/runtime/OptionsList.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ bool hasCapacityToUseLargeGigacage();
499499
\
500500
v(Bool, useSuperSampler, false, Normal, nullptr) \
501501
\
502-
v(Bool, useSourceProviderCache, true, Normal, "If false, the parser will not use the source provider cache. It's good to verify everything works when this is false. Because the cache is so successful, it can mask bugs."_s) \
503-
v(Bool, useCodeCache, true, Normal, "If false, the unlinked byte code cache will not be used."_s) \
502+
v(Bool, useSourceProviderCache, is64Bit(), Normal, "If false, the parser will not use the source provider cache. It's good to verify everything works when this is false. Because the cache is so successful, it can mask bugs."_s) \
503+
v(Bool, useCodeCache, is64Bit(), Normal, "If false, the unlinked byte code cache will not be used."_s) \
504504
\
505505
v(Bool, useWasm, true, Normal, "Expose the Wasm global object."_s) \
506506
\

0 commit comments

Comments
 (0)