Skip to content

Commit 3f0b733

Browse files
committed
Cache bytecode to disk
https://bugs.webkit.org/show_bug.cgi?id=192782 <rdar://problem/46084932> Reviewed by Keith Miller. Source/JavaScriptCore: Add the logic to serialize and deserialize the new JSC bytecode. For now, the cache is only used for tests. Each class that can be serialized has a counterpart in CachedTypes, which handles the decoding and encoding. When decoding, the cached objects are mmap'd from disk, but only used for creating instances of the respective in-memory version of each object. Ideally, the mmap'd objects should be used at runtime in the future. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * Sources.txt: * builtins/BuiltinNames.cpp: (JSC::BuiltinNames::BuiltinNames): * builtins/BuiltinNames.h: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::setConstantIdentifierSetRegisters): * bytecode/CodeBlock.h: * bytecode/HandlerInfo.h: (JSC::UnlinkedHandlerInfo::UnlinkedHandlerInfo): * bytecode/InstructionStream.h: * bytecode/UnlinkedCodeBlock.h: (JSC::UnlinkedCodeBlock::addSetConstant): (JSC::UnlinkedCodeBlock::constantIdentifierSets): * bytecode/UnlinkedEvalCodeBlock.h: * bytecode/UnlinkedFunctionCodeBlock.h: * bytecode/UnlinkedFunctionExecutable.h: * bytecode/UnlinkedGlobalCodeBlock.h: (JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock): * bytecode/UnlinkedMetadataTable.h: * bytecode/UnlinkedModuleProgramCodeBlock.h: * bytecode/UnlinkedProgramCodeBlock.h: * interpreter/Interpreter.cpp: * jsc.cpp: (functionQuit): (runJSC): * parser/SourceCode.h: * parser/SourceCodeKey.h: (JSC::SourceCodeKey::operator!= const): * parser/UnlinkedSourceCode.h: * parser/VariableEnvironment.h: * runtime/CachedTypes.cpp: Added. (JSC::Encoder::Allocation::buffer const): (JSC::Encoder::Allocation::offset const): (JSC::Encoder::Allocation::Allocation): (JSC::Encoder::Encoder): (JSC::Encoder::vm): (JSC::Encoder::malloc): (JSC::Encoder::offsetOf): (JSC::Encoder::cachePtr): (JSC::Encoder::offsetForPtr): (JSC::Encoder::release): (JSC::Encoder::Page::Page): (JSC::Encoder::Page::malloc): (JSC::Encoder::Page::buffer const): (JSC::Encoder::Page::size const): (JSC::Encoder::Page::getOffset const): (JSC::Encoder::allocateNewPage): (JSC::Decoder::Decoder): (JSC::Decoder::~Decoder): (JSC::Decoder::vm): (JSC::Decoder::offsetOf): (JSC::Decoder::cacheOffset): (JSC::Decoder::addFinalizer): (JSC::encode): (JSC::decode): (JSC::VariableLengthObject::buffer const): (JSC::VariableLengthObject::allocate): (JSC::CachedPtr::encode): (JSC::CachedPtr::decode const): (JSC::CachedPtr::operator-> const): (JSC::CachedPtr::get const): (JSC::CachedRefPtr::encode): (JSC::CachedRefPtr::decode const): (JSC::CachedWriteBarrier::encode): (JSC::CachedWriteBarrier::decode const): (JSC::CachedVector::encode): (JSC::CachedVector::decode const): (JSC::CachedPair::encode): (JSC::CachedPair::decode const): (JSC::CachedHashMap::encode): (JSC::CachedHashMap::decode const): (JSC::CachedUniquedStringImpl::encode): (JSC::CachedUniquedStringImpl::decode const): (JSC::CachedStringImpl::encode): (JSC::CachedStringImpl::decode const): (JSC::CachedString::encode): (JSC::CachedString::decode const): (JSC::CachedIdentifier::encode): (JSC::CachedIdentifier::decode const): (JSC::CachedOptional::encode): (JSC::CachedOptional::decode const): (JSC::CachedOptional::decodeAsPtr const): (JSC::CachedSimpleJumpTable::encode): (JSC::CachedSimpleJumpTable::decode const): (JSC::CachedStringJumpTable::encode): (JSC::CachedStringJumpTable::decode const): (JSC::CachedCodeBlockRareData::encode): (JSC::CachedCodeBlockRareData::decode const): (JSC::CachedBitVector::encode): (JSC::CachedBitVector::decode const): (JSC::CachedHashSet::encode): (JSC::CachedHashSet::decode const): (JSC::CachedConstantIdentifierSetEntry::encode): (JSC::CachedConstantIdentifierSetEntry::decode const): (JSC::CachedVariableEnvironment::encode): (JSC::CachedVariableEnvironment::decode const): (JSC::CachedArray::encode): (JSC::CachedArray::decode const): (JSC::CachedScopedArgumentsTable::encode): (JSC::CachedScopedArgumentsTable::decode const): (JSC::CachedSymbolTableEntry::encode): (JSC::CachedSymbolTableEntry::decode const): (JSC::CachedSymbolTable::encode): (JSC::CachedSymbolTable::decode const): (JSC::CachedImmutableButterfly::encode): (JSC::CachedImmutableButterfly::decode const): (JSC::CachedRegExp::encode): (JSC::CachedRegExp::decode const): (JSC::CachedTemplateObjectDescriptor::encode): (JSC::CachedTemplateObjectDescriptor::decode const): (JSC::CachedBigInt::encode): (JSC::CachedBigInt::decode const): (JSC::CachedJSValue::encode): (JSC::CachedJSValue::decode const): (JSC::CachedInstructionStream::encode): (JSC::CachedInstructionStream::decode const): (JSC::CachedMetadataTable::encode): (JSC::CachedMetadataTable::decode const): (JSC::CachedSourceOrigin::encode): (JSC::CachedSourceOrigin::decode const): (JSC::CachedTextPosition::encode): (JSC::CachedTextPosition::decode const): (JSC::CachedSourceProviderShape::encode): (JSC::CachedSourceProviderShape::decode const): (JSC::CachedStringSourceProvider::encode): (JSC::CachedStringSourceProvider::decode const): (JSC::CachedWebAssemblySourceProvider::encode): (JSC::CachedWebAssemblySourceProvider::decode const): (JSC::CachedSourceProvider::encode): (JSC::CachedSourceProvider::decode const): (JSC::CachedUnlinkedSourceCodeShape::encode): (JSC::CachedUnlinkedSourceCodeShape::decode const): (JSC::CachedSourceCode::encode): (JSC::CachedSourceCode::decode const): (JSC::CachedFunctionExecutable::firstLineOffset const): (JSC::CachedFunctionExecutable::lineCount const): (JSC::CachedFunctionExecutable::unlinkedFunctionNameStart const): (JSC::CachedFunctionExecutable::unlinkedBodyStartColumn const): (JSC::CachedFunctionExecutable::unlinkedBodyEndColumn const): (JSC::CachedFunctionExecutable::startOffset const): (JSC::CachedFunctionExecutable::sourceLength const): (JSC::CachedFunctionExecutable::parametersStartOffset const): (JSC::CachedFunctionExecutable::typeProfilingStartOffset const): (JSC::CachedFunctionExecutable::typeProfilingEndOffset const): (JSC::CachedFunctionExecutable::parameterCount const): (JSC::CachedFunctionExecutable::features const): (JSC::CachedFunctionExecutable::sourceParseMode const): (JSC::CachedFunctionExecutable::isInStrictContext const): (JSC::CachedFunctionExecutable::hasCapturedVariables const): (JSC::CachedFunctionExecutable::isBuiltinFunction const): (JSC::CachedFunctionExecutable::isBuiltinDefaultClassConstructor const): (JSC::CachedFunctionExecutable::constructAbility const): (JSC::CachedFunctionExecutable::constructorKind const): (JSC::CachedFunctionExecutable::functionMode const): (JSC::CachedFunctionExecutable::scriptMode const): (JSC::CachedFunctionExecutable::superBinding const): (JSC::CachedFunctionExecutable::derivedContextType const): (JSC::CachedFunctionExecutable::name const): (JSC::CachedFunctionExecutable::ecmaName const): (JSC::CachedFunctionExecutable::inferredName const): (JSC::CachedCodeBlock::instructions const): (JSC::CachedCodeBlock::thisRegister const): (JSC::CachedCodeBlock::scopeRegister const): (JSC::CachedCodeBlock::globalObjectRegister const): (JSC::CachedCodeBlock::sourceURLDirective const): (JSC::CachedCodeBlock::sourceMappingURLDirective const): (JSC::CachedCodeBlock::usesEval const): (JSC::CachedCodeBlock::isStrictMode const): (JSC::CachedCodeBlock::isConstructor const): (JSC::CachedCodeBlock::hasCapturedVariables const): (JSC::CachedCodeBlock::isBuiltinFunction const): (JSC::CachedCodeBlock::superBinding const): (JSC::CachedCodeBlock::scriptMode const): (JSC::CachedCodeBlock::isArrowFunctionContext const): (JSC::CachedCodeBlock::isClassContext const): (JSC::CachedCodeBlock::wasCompiledWithDebuggingOpcodes const): (JSC::CachedCodeBlock::constructorKind const): (JSC::CachedCodeBlock::derivedContextType const): (JSC::CachedCodeBlock::evalContextType const): (JSC::CachedCodeBlock::hasTailCalls const): (JSC::CachedCodeBlock::lineCount const): (JSC::CachedCodeBlock::endColumn const): (JSC::CachedCodeBlock::numVars const): (JSC::CachedCodeBlock::numCalleeLocals const): (JSC::CachedCodeBlock::numParameters const): (JSC::CachedCodeBlock::features const): (JSC::CachedCodeBlock::parseMode const): (JSC::CachedCodeBlock::codeType const): (JSC::CachedCodeBlock::rareData const): (JSC::CachedProgramCodeBlock::encode): (JSC::CachedProgramCodeBlock::decode const): (JSC::CachedModuleCodeBlock::encode): (JSC::CachedModuleCodeBlock::decode const): (JSC::CachedEvalCodeBlock::encode): (JSC::CachedEvalCodeBlock::decode const): (JSC::CachedFunctionCodeBlock::encode): (JSC::CachedFunctionCodeBlock::decode const): (JSC::UnlinkedFunctionCodeBlock::UnlinkedFunctionCodeBlock): (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock): (JSC::CachedCodeBlock<CodeBlockType>::decode const): (JSC::UnlinkedProgramCodeBlock::UnlinkedProgramCodeBlock): (JSC::UnlinkedModuleProgramCodeBlock::UnlinkedModuleProgramCodeBlock): (JSC::UnlinkedEvalCodeBlock::UnlinkedEvalCodeBlock): (JSC::CachedFunctionExecutable::encode): (JSC::CachedFunctionExecutable::decode const): (JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable): (JSC::CachedCodeBlock<CodeBlockType>::encode): (JSC::CachedSourceCodeKey::encode): (JSC::CachedSourceCodeKey::decode const): (JSC::CacheEntry::encode): (JSC::CacheEntry:: const): (JSC:: const): (JSC::encodeCodeBlock): (JSC::decodeCodeBlockImpl): * runtime/CachedTypes.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedGlobalCodeBlock.h. (JSC::decodeCodeBlock): * runtime/CodeCache.cpp: (JSC::CodeCacheMap::pruneSlowCase): (JSC::CodeCache::getUnlinkedGlobalCodeBlock): (JSC::CodeCache::getUnlinkedGlobalFunctionExecutable): (JSC::CodeCache::write): * runtime/CodeCache.h: (JSC::CodeCacheMap::begin): (JSC::CodeCacheMap::end): (JSC::CodeCacheMap::fetchFromDiskImpl): (JSC::CodeCacheMap::findCacheAndUpdateAge): (JSC::writeCodeBlock): * runtime/JSBigInt.cpp: * runtime/JSBigInt.h: * runtime/Options.cpp: (JSC::recomputeDependentOptions): * runtime/Options.h: * runtime/RegExp.h: * runtime/ScopedArgumentsTable.h: * runtime/StackFrame.h: * runtime/StructureInlines.h: * runtime/SymbolTable.h: Source/WTF: BitVectors have to be friends with JSC::CacheBitVector to allow serializing its buffer as part of the bytecode cache encoding. * wtf/BitVector.h: Tools: Add test helper to execute bytecode-cache tests: it executes each test twice, the first with JSC_diskCachePath set to a temporary directory and second with JSC_forceDiskCache=true (in addition to the cache path) to guarantee that only the disk cache is being used and no new UnlinkedCodeBlocks are being created. * Scripts/jsc-stress-test-helpers/bytecode-cache-test-helper: Added. * Scripts/run-jsc-stress-tests: Canonical link: https://commits.webkit.org/208132@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 66c1ad6 commit 3f0b733

42 files changed

Lines changed: 2657 additions & 32 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Source/JavaScriptCore/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,7 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS
833833
runtime/JSGlobalLexicalEnvironment.h
834834
runtime/JSGlobalObject.h
835835
runtime/JSGlobalObjectInlines.h
836+
runtime/JSImmutableButterfly.h
836837
runtime/JSInternalPromise.h
837838
runtime/JSInternalPromiseDeferred.h
838839
runtime/JSMicrotask.h
@@ -848,6 +849,7 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS
848849
runtime/JSPromise.h
849850
runtime/JSPromiseConstructor.h
850851
runtime/JSPromiseDeferred.h
852+
runtime/JSPropertyNameEnumerator.h
851853
runtime/JSProxy.h
852854
runtime/JSRunLoopTimer.h
853855
runtime/JSScope.h

Source/JavaScriptCore/ChangeLog

Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,260 @@
1+
2019-01-20 Tadeu Zagallo <tzagallo@apple.com>
2+
3+
Cache bytecode to disk
4+
https://bugs.webkit.org/show_bug.cgi?id=192782
5+
<rdar://problem/46084932>
6+
7+
Reviewed by Keith Miller.
8+
9+
Add the logic to serialize and deserialize the new JSC bytecode. For now,
10+
the cache is only used for tests.
11+
12+
Each class that can be serialized has a counterpart in CachedTypes, which
13+
handles the decoding and encoding. When decoding, the cached objects are
14+
mmap'd from disk, but only used for creating instances of the respective
15+
in-memory version of each object. Ideally, the mmap'd objects should be
16+
used at runtime in the future.
17+
18+
* CMakeLists.txt:
19+
* JavaScriptCore.xcodeproj/project.pbxproj:
20+
* Sources.txt:
21+
* builtins/BuiltinNames.cpp:
22+
(JSC::BuiltinNames::BuiltinNames):
23+
* builtins/BuiltinNames.h:
24+
* bytecode/CodeBlock.cpp:
25+
(JSC::CodeBlock::setConstantIdentifierSetRegisters):
26+
* bytecode/CodeBlock.h:
27+
* bytecode/HandlerInfo.h:
28+
(JSC::UnlinkedHandlerInfo::UnlinkedHandlerInfo):
29+
* bytecode/InstructionStream.h:
30+
* bytecode/UnlinkedCodeBlock.h:
31+
(JSC::UnlinkedCodeBlock::addSetConstant):
32+
(JSC::UnlinkedCodeBlock::constantIdentifierSets):
33+
* bytecode/UnlinkedEvalCodeBlock.h:
34+
* bytecode/UnlinkedFunctionCodeBlock.h:
35+
* bytecode/UnlinkedFunctionExecutable.h:
36+
* bytecode/UnlinkedGlobalCodeBlock.h:
37+
(JSC::UnlinkedGlobalCodeBlock::UnlinkedGlobalCodeBlock):
38+
* bytecode/UnlinkedMetadataTable.h:
39+
* bytecode/UnlinkedModuleProgramCodeBlock.h:
40+
* bytecode/UnlinkedProgramCodeBlock.h:
41+
* interpreter/Interpreter.cpp:
42+
* jsc.cpp:
43+
(functionQuit):
44+
(runJSC):
45+
* parser/SourceCode.h:
46+
* parser/SourceCodeKey.h:
47+
(JSC::SourceCodeKey::operator!= const):
48+
* parser/UnlinkedSourceCode.h:
49+
* parser/VariableEnvironment.h:
50+
* runtime/CachedTypes.cpp: Added.
51+
(JSC::Encoder::Allocation::buffer const):
52+
(JSC::Encoder::Allocation::offset const):
53+
(JSC::Encoder::Allocation::Allocation):
54+
(JSC::Encoder::Encoder):
55+
(JSC::Encoder::vm):
56+
(JSC::Encoder::malloc):
57+
(JSC::Encoder::offsetOf):
58+
(JSC::Encoder::cachePtr):
59+
(JSC::Encoder::offsetForPtr):
60+
(JSC::Encoder::release):
61+
(JSC::Encoder::Page::Page):
62+
(JSC::Encoder::Page::malloc):
63+
(JSC::Encoder::Page::buffer const):
64+
(JSC::Encoder::Page::size const):
65+
(JSC::Encoder::Page::getOffset const):
66+
(JSC::Encoder::allocateNewPage):
67+
(JSC::Decoder::Decoder):
68+
(JSC::Decoder::~Decoder):
69+
(JSC::Decoder::vm):
70+
(JSC::Decoder::offsetOf):
71+
(JSC::Decoder::cacheOffset):
72+
(JSC::Decoder::addFinalizer):
73+
(JSC::encode):
74+
(JSC::decode):
75+
(JSC::VariableLengthObject::buffer const):
76+
(JSC::VariableLengthObject::allocate):
77+
(JSC::CachedPtr::encode):
78+
(JSC::CachedPtr::decode const):
79+
(JSC::CachedPtr::operator-> const):
80+
(JSC::CachedPtr::get const):
81+
(JSC::CachedRefPtr::encode):
82+
(JSC::CachedRefPtr::decode const):
83+
(JSC::CachedWriteBarrier::encode):
84+
(JSC::CachedWriteBarrier::decode const):
85+
(JSC::CachedVector::encode):
86+
(JSC::CachedVector::decode const):
87+
(JSC::CachedPair::encode):
88+
(JSC::CachedPair::decode const):
89+
(JSC::CachedHashMap::encode):
90+
(JSC::CachedHashMap::decode const):
91+
(JSC::CachedUniquedStringImpl::encode):
92+
(JSC::CachedUniquedStringImpl::decode const):
93+
(JSC::CachedStringImpl::encode):
94+
(JSC::CachedStringImpl::decode const):
95+
(JSC::CachedString::encode):
96+
(JSC::CachedString::decode const):
97+
(JSC::CachedIdentifier::encode):
98+
(JSC::CachedIdentifier::decode const):
99+
(JSC::CachedOptional::encode):
100+
(JSC::CachedOptional::decode const):
101+
(JSC::CachedOptional::decodeAsPtr const):
102+
(JSC::CachedSimpleJumpTable::encode):
103+
(JSC::CachedSimpleJumpTable::decode const):
104+
(JSC::CachedStringJumpTable::encode):
105+
(JSC::CachedStringJumpTable::decode const):
106+
(JSC::CachedCodeBlockRareData::encode):
107+
(JSC::CachedCodeBlockRareData::decode const):
108+
(JSC::CachedBitVector::encode):
109+
(JSC::CachedBitVector::decode const):
110+
(JSC::CachedHashSet::encode):
111+
(JSC::CachedHashSet::decode const):
112+
(JSC::CachedConstantIdentifierSetEntry::encode):
113+
(JSC::CachedConstantIdentifierSetEntry::decode const):
114+
(JSC::CachedVariableEnvironment::encode):
115+
(JSC::CachedVariableEnvironment::decode const):
116+
(JSC::CachedArray::encode):
117+
(JSC::CachedArray::decode const):
118+
(JSC::CachedScopedArgumentsTable::encode):
119+
(JSC::CachedScopedArgumentsTable::decode const):
120+
(JSC::CachedSymbolTableEntry::encode):
121+
(JSC::CachedSymbolTableEntry::decode const):
122+
(JSC::CachedSymbolTable::encode):
123+
(JSC::CachedSymbolTable::decode const):
124+
(JSC::CachedImmutableButterfly::encode):
125+
(JSC::CachedImmutableButterfly::decode const):
126+
(JSC::CachedRegExp::encode):
127+
(JSC::CachedRegExp::decode const):
128+
(JSC::CachedTemplateObjectDescriptor::encode):
129+
(JSC::CachedTemplateObjectDescriptor::decode const):
130+
(JSC::CachedBigInt::encode):
131+
(JSC::CachedBigInt::decode const):
132+
(JSC::CachedJSValue::encode):
133+
(JSC::CachedJSValue::decode const):
134+
(JSC::CachedInstructionStream::encode):
135+
(JSC::CachedInstructionStream::decode const):
136+
(JSC::CachedMetadataTable::encode):
137+
(JSC::CachedMetadataTable::decode const):
138+
(JSC::CachedSourceOrigin::encode):
139+
(JSC::CachedSourceOrigin::decode const):
140+
(JSC::CachedTextPosition::encode):
141+
(JSC::CachedTextPosition::decode const):
142+
(JSC::CachedSourceProviderShape::encode):
143+
(JSC::CachedSourceProviderShape::decode const):
144+
(JSC::CachedStringSourceProvider::encode):
145+
(JSC::CachedStringSourceProvider::decode const):
146+
(JSC::CachedWebAssemblySourceProvider::encode):
147+
(JSC::CachedWebAssemblySourceProvider::decode const):
148+
(JSC::CachedSourceProvider::encode):
149+
(JSC::CachedSourceProvider::decode const):
150+
(JSC::CachedUnlinkedSourceCodeShape::encode):
151+
(JSC::CachedUnlinkedSourceCodeShape::decode const):
152+
(JSC::CachedSourceCode::encode):
153+
(JSC::CachedSourceCode::decode const):
154+
(JSC::CachedFunctionExecutable::firstLineOffset const):
155+
(JSC::CachedFunctionExecutable::lineCount const):
156+
(JSC::CachedFunctionExecutable::unlinkedFunctionNameStart const):
157+
(JSC::CachedFunctionExecutable::unlinkedBodyStartColumn const):
158+
(JSC::CachedFunctionExecutable::unlinkedBodyEndColumn const):
159+
(JSC::CachedFunctionExecutable::startOffset const):
160+
(JSC::CachedFunctionExecutable::sourceLength const):
161+
(JSC::CachedFunctionExecutable::parametersStartOffset const):
162+
(JSC::CachedFunctionExecutable::typeProfilingStartOffset const):
163+
(JSC::CachedFunctionExecutable::typeProfilingEndOffset const):
164+
(JSC::CachedFunctionExecutable::parameterCount const):
165+
(JSC::CachedFunctionExecutable::features const):
166+
(JSC::CachedFunctionExecutable::sourceParseMode const):
167+
(JSC::CachedFunctionExecutable::isInStrictContext const):
168+
(JSC::CachedFunctionExecutable::hasCapturedVariables const):
169+
(JSC::CachedFunctionExecutable::isBuiltinFunction const):
170+
(JSC::CachedFunctionExecutable::isBuiltinDefaultClassConstructor const):
171+
(JSC::CachedFunctionExecutable::constructAbility const):
172+
(JSC::CachedFunctionExecutable::constructorKind const):
173+
(JSC::CachedFunctionExecutable::functionMode const):
174+
(JSC::CachedFunctionExecutable::scriptMode const):
175+
(JSC::CachedFunctionExecutable::superBinding const):
176+
(JSC::CachedFunctionExecutable::derivedContextType const):
177+
(JSC::CachedFunctionExecutable::name const):
178+
(JSC::CachedFunctionExecutable::ecmaName const):
179+
(JSC::CachedFunctionExecutable::inferredName const):
180+
(JSC::CachedCodeBlock::instructions const):
181+
(JSC::CachedCodeBlock::thisRegister const):
182+
(JSC::CachedCodeBlock::scopeRegister const):
183+
(JSC::CachedCodeBlock::globalObjectRegister const):
184+
(JSC::CachedCodeBlock::sourceURLDirective const):
185+
(JSC::CachedCodeBlock::sourceMappingURLDirective const):
186+
(JSC::CachedCodeBlock::usesEval const):
187+
(JSC::CachedCodeBlock::isStrictMode const):
188+
(JSC::CachedCodeBlock::isConstructor const):
189+
(JSC::CachedCodeBlock::hasCapturedVariables const):
190+
(JSC::CachedCodeBlock::isBuiltinFunction const):
191+
(JSC::CachedCodeBlock::superBinding const):
192+
(JSC::CachedCodeBlock::scriptMode const):
193+
(JSC::CachedCodeBlock::isArrowFunctionContext const):
194+
(JSC::CachedCodeBlock::isClassContext const):
195+
(JSC::CachedCodeBlock::wasCompiledWithDebuggingOpcodes const):
196+
(JSC::CachedCodeBlock::constructorKind const):
197+
(JSC::CachedCodeBlock::derivedContextType const):
198+
(JSC::CachedCodeBlock::evalContextType const):
199+
(JSC::CachedCodeBlock::hasTailCalls const):
200+
(JSC::CachedCodeBlock::lineCount const):
201+
(JSC::CachedCodeBlock::endColumn const):
202+
(JSC::CachedCodeBlock::numVars const):
203+
(JSC::CachedCodeBlock::numCalleeLocals const):
204+
(JSC::CachedCodeBlock::numParameters const):
205+
(JSC::CachedCodeBlock::features const):
206+
(JSC::CachedCodeBlock::parseMode const):
207+
(JSC::CachedCodeBlock::codeType const):
208+
(JSC::CachedCodeBlock::rareData const):
209+
(JSC::CachedProgramCodeBlock::encode):
210+
(JSC::CachedProgramCodeBlock::decode const):
211+
(JSC::CachedModuleCodeBlock::encode):
212+
(JSC::CachedModuleCodeBlock::decode const):
213+
(JSC::CachedEvalCodeBlock::encode):
214+
(JSC::CachedEvalCodeBlock::decode const):
215+
(JSC::CachedFunctionCodeBlock::encode):
216+
(JSC::CachedFunctionCodeBlock::decode const):
217+
(JSC::UnlinkedFunctionCodeBlock::UnlinkedFunctionCodeBlock):
218+
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
219+
(JSC::CachedCodeBlock<CodeBlockType>::decode const):
220+
(JSC::UnlinkedProgramCodeBlock::UnlinkedProgramCodeBlock):
221+
(JSC::UnlinkedModuleProgramCodeBlock::UnlinkedModuleProgramCodeBlock):
222+
(JSC::UnlinkedEvalCodeBlock::UnlinkedEvalCodeBlock):
223+
(JSC::CachedFunctionExecutable::encode):
224+
(JSC::CachedFunctionExecutable::decode const):
225+
(JSC::UnlinkedFunctionExecutable::UnlinkedFunctionExecutable):
226+
(JSC::CachedCodeBlock<CodeBlockType>::encode):
227+
(JSC::CachedSourceCodeKey::encode):
228+
(JSC::CachedSourceCodeKey::decode const):
229+
(JSC::CacheEntry::encode):
230+
(JSC::CacheEntry:: const):
231+
(JSC:: const):
232+
(JSC::encodeCodeBlock):
233+
(JSC::decodeCodeBlockImpl):
234+
* runtime/CachedTypes.h: Copied from Source/JavaScriptCore/bytecode/UnlinkedGlobalCodeBlock.h.
235+
(JSC::decodeCodeBlock):
236+
* runtime/CodeCache.cpp:
237+
(JSC::CodeCacheMap::pruneSlowCase):
238+
(JSC::CodeCache::getUnlinkedGlobalCodeBlock):
239+
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):
240+
(JSC::CodeCache::write):
241+
* runtime/CodeCache.h:
242+
(JSC::CodeCacheMap::begin):
243+
(JSC::CodeCacheMap::end):
244+
(JSC::CodeCacheMap::fetchFromDiskImpl):
245+
(JSC::CodeCacheMap::findCacheAndUpdateAge):
246+
(JSC::writeCodeBlock):
247+
* runtime/JSBigInt.cpp:
248+
* runtime/JSBigInt.h:
249+
* runtime/Options.cpp:
250+
(JSC::recomputeDependentOptions):
251+
* runtime/Options.h:
252+
* runtime/RegExp.h:
253+
* runtime/ScopedArgumentsTable.h:
254+
* runtime/StackFrame.h:
255+
* runtime/StructureInlines.h:
256+
* runtime/SymbolTable.h:
257+
1258
2019-01-20 Antoine Quint <graouts@apple.com>
2259

3260
Add a POINTER_EVENTS feature flag

Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@
826826
262D85B71C0D650F006ACB61 /* AirFixPartialRegisterStalls.h in Headers */ = {isa = PBXBuildFile; fileRef = 262D85B51C0D650F006ACB61 /* AirFixPartialRegisterStalls.h */; };
827827
2684D4381C00161C0081D663 /* AirLiveness.h in Headers */ = {isa = PBXBuildFile; fileRef = 2684D4371C00161C0081D663 /* AirLiveness.h */; };
828828
269D636E1BFBE5D100101B1D /* FTLOutput.h in Headers */ = {isa = PBXBuildFile; fileRef = 269D636D1BFBE5D000101B1D /* FTLOutput.h */; };
829-
2A05ABD61961DF2400341750 /* JSPropertyNameEnumerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A05ABD41961DF2400341750 /* JSPropertyNameEnumerator.h */; };
829+
2A05ABD61961DF2400341750 /* JSPropertyNameEnumerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A05ABD41961DF2400341750 /* JSPropertyNameEnumerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
830830
2A111246192FCE79005EE18D /* CustomGetterSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A111244192FCE79005EE18D /* CustomGetterSetter.h */; settings = {ATTRIBUTES = (Private, ); }; };
831831
2A48D1911772365B00C65A5F /* APICallbackFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = C211B574176A224D000E2A23 /* APICallbackFunction.h */; };
832832
2A4BB7F318A41179008A0FCD /* JSManagedValueInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A4BB7F218A41179008A0FCD /* JSManagedValueInternal.h */; };
@@ -1062,7 +1062,7 @@
10621062
53EAFE2F208DFAB4007D524B /* testapi.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 531D4E191F59CDD200EC836C /* testapi.cpp */; };
10631063
53EE01B6218F691600AD1F8D /* JSScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EE01B5218F690F00AD1F8D /* JSScript.h */; settings = {ATTRIBUTES = (Private, ); }; };
10641064
53EE01B8218F7EFF00AD1F8D /* JSScriptInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EE01B7218F7EFF00AD1F8D /* JSScriptInternal.h */; };
1065-
53F11F41209138D700E411A7 /* JSImmutableButterfly.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F11F40209138D700E411A7 /* JSImmutableButterfly.h */; };
1065+
53F11F41209138D700E411A7 /* JSImmutableButterfly.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F11F40209138D700E411A7 /* JSImmutableButterfly.h */; settings = {ATTRIBUTES = (Private, ); }; };
10661066
53F40E851D58F9770099A1B6 /* WasmSections.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F40E841D58F9770099A1B6 /* WasmSections.h */; };
10671067
53F40E8B1D5901BB0099A1B6 /* WasmFunctionParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F40E8A1D5901BB0099A1B6 /* WasmFunctionParser.h */; };
10681068
53F40E8D1D5901F20099A1B6 /* WasmParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 53F40E8C1D5901F20099A1B6 /* WasmParser.h */; };
@@ -3128,6 +3128,7 @@
31283128
14386A731DD69895008652C4 /* DirectEvalExecutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DirectEvalExecutable.h; sourceTree = "<group>"; };
31293129
14386A761DD6989C008652C4 /* IndirectEvalExecutable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndirectEvalExecutable.cpp; sourceTree = "<group>"; };
31303130
14386A771DD6989C008652C4 /* IndirectEvalExecutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndirectEvalExecutable.h; sourceTree = "<group>"; };
3131+
143BE26521C857770020CD17 /* CachedTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedTypes.h; sourceTree = "<group>"; };
31313132
1440051F0A531D3B0005F061 /* Node.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Node.h; path = tests/Node.h; sourceTree = "<group>"; };
31323133
144005200A531D3B0005F061 /* Node.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Node.c; path = tests/Node.c; sourceTree = "<group>"; };
31333134
144007480A536CC20005F061 /* NodeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NodeList.h; path = tests/NodeList.h; sourceTree = "<group>"; };
@@ -3242,6 +3243,7 @@
32423243
14D857740A4696C80032146C /* testapi.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = testapi.js; path = API/tests/testapi.js; sourceTree = "<group>"; };
32433244
14DA818E0D99FD2000B0A4FB /* JSLexicalEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSLexicalEnvironment.h; sourceTree = "<group>"; };
32443245
14DA818F0D99FD2000B0A4FB /* JSLexicalEnvironment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSLexicalEnvironment.cpp; sourceTree = "<group>"; };
3246+
14DAFA4521E3B871004B68F7 /* CachedTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedTypes.cpp; sourceTree = "<group>"; };
32453247
14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSGlobalObject.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
32463248
14DF04D916B3996D0016A513 /* StaticPropertyAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticPropertyAnalysis.h; sourceTree = "<group>"; };
32473249
14E84F9914EE1ACC00D6D5D4 /* WeakBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakBlock.cpp; sourceTree = "<group>"; };
@@ -6600,6 +6602,8 @@
66006602
9E729409190F0306001A91B5 /* BundlePath.mm */,
66016603
0FB7F38B15ED8E3800F167B2 /* Butterfly.h */,
66026604
0FB7F38C15ED8E3800F167B2 /* ButterflyInlines.h */,
6605+
14DAFA4521E3B871004B68F7 /* CachedTypes.cpp */,
6606+
143BE26521C857770020CD17 /* CachedTypes.h */,
66036607
0FEC3C5F1F379F5300F59B6C /* CagedBarrierPtr.h */,
66046608
BCA62DFE0E2826230004F30D /* CallData.cpp */,
66056609
145C507F0D9DF63B0088F6B9 /* CallData.h */,

Source/JavaScriptCore/Sources.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,7 @@ runtime/BooleanConstructor.cpp
713713
runtime/BooleanObject.cpp
714714
runtime/BooleanPrototype.cpp
715715
runtime/CallData.cpp
716+
runtime/CachedTypes.cpp
716717
runtime/CatchScope.cpp
717718
runtime/ClassInfo.cpp
718719
runtime/ClonedArguments.cpp

Source/JavaScriptCore/builtins/BuiltinNames.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ BuiltinNames::BuiltinNames(VM* vm, CommonIdentifiers* commonIdentifiers)
6363
JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PRIVATE_TO_PUBLIC_ENTRY)
6464
JSC_FOREACH_BUILTIN_FUNCTION_NAME(INITIALIZE_PUBLIC_TO_PRIVATE_ENTRY)
6565
JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME(INITIALIZE_PUBLIC_TO_PRIVATE_ENTRY)
66+
JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(INITIALIZE_SYMBOL_PRIVATE_TO_PUBLIC_ENTRY)
6667
JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(INITIALIZE_SYMBOL_PUBLIC_TO_PRIVATE_ENTRY)
6768
m_privateToPublicMap.add(m_dollarVMPrivateName.impl(), &m_dollarVMName);
6869
m_publicToPrivateMap.add(m_dollarVMName.impl(), &m_dollarVMPrivateName);

0 commit comments

Comments
 (0)