0700fca5f6667a60767f2481c6a0b40e4bb07148
[WebKit-https.git] / Source / JavaScriptCore / runtime / VM.h
1 /*
2  * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1.  Redistributions of source code must retain the above copyright
9  *     notice, this list of conditions and the following disclaimer. 
10  * 2.  Redistributions in binary form must reproduce the above copyright
11  *     notice, this list of conditions and the following disclaimer in the
12  *     documentation and/or other materials provided with the distribution. 
13  * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
14  *     its contributors may be used to endorse or promote products derived
15  *     from this software without specific prior written permission. 
16  *
17  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28
29 #pragma once
30
31 #include "CallData.h"
32 #include "CodeSpecializationKind.h"
33 #include "CompleteSubspace.h"
34 #include "ConcurrentJSLock.h"
35 #include "ControlFlowProfiler.h"
36 #include "DateInstanceCache.h"
37 #include "DeleteAllCodeEffort.h"
38 #include "ExceptionEventLocation.h"
39 #include "ExecutableAllocator.h"
40 #include "FunctionHasExecutedCache.h"
41 #include "FuzzerAgent.h"
42 #include "Heap.h"
43 #include "Integrity.h"
44 #include "Intrinsic.h"
45 #include "IsoCellSet.h"
46 #include "IsoSubspace.h"
47 #include "JITThunks.h"
48 #include "JSCJSValue.h"
49 #include "JSLock.h"
50 #include "MacroAssemblerCodeRef.h"
51 #include "Microtask.h"
52 #include "NumericStrings.h"
53 #include "SmallStrings.h"
54 #include "Strong.h"
55 #include "StructureCache.h"
56 #include "SubspaceAccess.h"
57 #include "VMTraps.h"
58 #include "WasmContext.h"
59 #include "Watchpoint.h"
60 #include <wtf/BumpPointerAllocator.h>
61 #include <wtf/CheckedArithmetic.h>
62 #include <wtf/DateMath.h>
63 #include <wtf/Deque.h>
64 #include <wtf/DoublyLinkedList.h>
65 #include <wtf/Forward.h>
66 #include <wtf/Gigacage.h>
67 #include <wtf/HashMap.h>
68 #include <wtf/HashSet.h>
69 #include <wtf/SetForScope.h>
70 #include <wtf/StackBounds.h>
71 #include <wtf/StackPointer.h>
72 #include <wtf/Stopwatch.h>
73 #include <wtf/ThreadSafeRefCounted.h>
74 #include <wtf/ThreadSpecific.h>
75 #include <wtf/UniqueArray.h>
76 #include <wtf/text/SymbolRegistry.h>
77 #include <wtf/text/WTFString.h>
78 #if ENABLE(REGEXP_TRACING)
79 #include <wtf/ListHashSet.h>
80 #endif
81
82 #if ENABLE(EXCEPTION_SCOPE_VERIFICATION)
83 #include <wtf/StackTrace.h>
84 #endif
85
86 // Enable the Objective-C API for platforms with a modern runtime. This has to match exactly what we
87 // have in JSBase.h.
88 #if !defined(JSC_OBJC_API_ENABLED)
89 #if (defined(__clang__) && defined(__APPLE__) && (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)))
90 #define JSC_OBJC_API_ENABLED 1
91 #else
92 #define JSC_OBJC_API_ENABLED 0
93 #endif
94 #endif
95
96 namespace WTF {
97 class SimpleStats;
98 } // namespace WTF
99 using WTF::SimpleStats;
100
101 namespace JSC {
102
103 class BuiltinExecutables;
104 class BytecodeIntrinsicRegistry;
105 class CallFrame;
106 class CodeBlock;
107 class CodeCache;
108 class CommonIdentifiers;
109 class CompactVariableMap;
110 class CustomGetterSetter;
111 class DOMAttributeGetterSetter;
112 class Exception;
113 class ExceptionScope;
114 class FastMallocAlignedMemoryAllocator;
115 class GigacageAlignedMemoryAllocator;
116 class HandleStack;
117 class TypeProfiler;
118 class TypeProfilerLog;
119 class HasOwnPropertyCache;
120 class HeapProfiler;
121 class Identifier;
122 class Interpreter;
123 class JSCustomGetterSetterFunction;
124 class JSDestructibleObjectHeapCellType;
125 class JSGlobalObject;
126 class JSObject;
127 class JSPromise;
128 class JSPropertyNameEnumerator;
129 class JSRunLoopTimer;
130 class JSStringHeapCellType;
131 class JSWebAssemblyCodeBlockHeapCellType;
132 class JSWebAssemblyInstance;
133 class LLIntOffsetsExtractor;
134 class NativeExecutable;
135 class PromiseDeferredTimer;
136 class RegExp;
137 class RegExpCache;
138 class Register;
139 class RegisterAtOffsetList;
140 #if ENABLE(SAMPLING_PROFILER)
141 class SamplingProfiler;
142 #endif
143 class ShadowChicken;
144 class ScriptExecutable;
145 class SourceProvider;
146 class SourceProviderCache;
147 class StackFrame;
148 class Structure;
149 #if ENABLE(REGEXP_TRACING)
150 class RegExp;
151 #endif
152 class Symbol;
153 class TypedArrayController;
154 class UnlinkedCodeBlock;
155 class UnlinkedEvalCodeBlock;
156 class UnlinkedFunctionExecutable;
157 class UnlinkedProgramCodeBlock;
158 class UnlinkedModuleProgramCodeBlock;
159 class VirtualRegister;
160 class VMEntryScope;
161 class Watchdog;
162 class Watchpoint;
163 class WatchpointSet;
164 class WebAssemblyFunctionHeapCellType;
165
166 #if ENABLE(FTL_JIT)
167 namespace FTL {
168 class Thunks;
169 }
170 #endif // ENABLE(FTL_JIT)
171 namespace Profiler {
172 class Database;
173 }
174 namespace DOMJIT {
175 class Signature;
176 }
177
178 struct EntryFrame;
179 struct HashTable;
180 struct Instruction;
181 struct ValueProfile;
182
183 using ExecState = CallFrame;
184
185 struct LocalTimeOffsetCache {
186     LocalTimeOffsetCache()
187         : start(0.0)
188         , end(-1.0)
189         , increment(0.0)
190     {
191     }
192
193     void reset()
194     {
195         offset = LocalTimeOffset();
196         start = 0.0;
197         end = -1.0;
198         increment = 0.0;
199     }
200
201     LocalTimeOffset offset;
202     double start;
203     double end;
204     double increment;
205 };
206
207 class QueuedTask {
208     WTF_MAKE_NONCOPYABLE(QueuedTask);
209     WTF_MAKE_FAST_ALLOCATED;
210 public:
211     void run();
212
213     QueuedTask(VM& vm, JSGlobalObject* globalObject, Ref<Microtask>&& microtask)
214         : m_globalObject(vm, globalObject)
215         , m_microtask(WTFMove(microtask))
216     {
217     }
218
219 private:
220     Strong<JSGlobalObject> m_globalObject;
221     Ref<Microtask> m_microtask;
222 };
223
224 class ConservativeRoots;
225
226 #if COMPILER(MSVC)
227 #pragma warning(push)
228 #pragma warning(disable: 4200) // Disable "zero-sized array in struct/union" warning
229 #endif
230 struct ScratchBuffer {
231     ScratchBuffer()
232     {
233         u.m_activeLength = 0;
234     }
235
236     static ScratchBuffer* create(size_t size)
237     {
238         ScratchBuffer* result = new (fastMalloc(ScratchBuffer::allocationSize(size))) ScratchBuffer;
239
240         return result;
241     }
242
243     static size_t allocationSize(Checked<size_t> bufferSize) { return (sizeof(ScratchBuffer) + bufferSize).unsafeGet(); }
244     void setActiveLength(size_t activeLength) { u.m_activeLength = activeLength; }
245     size_t activeLength() const { return u.m_activeLength; };
246     size_t* addressOfActiveLength() { return &u.m_activeLength; };
247     void* dataBuffer() { return m_buffer; }
248
249     union {
250         size_t m_activeLength;
251         double pad; // Make sure m_buffer is double aligned.
252     } u;
253 #if CPU(MIPS) && (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == 2)
254     alignas(8) void* m_buffer[0];
255 #else
256     void* m_buffer[0];
257 #endif
258 };
259 #if COMPILER(MSVC)
260 #pragma warning(pop)
261 #endif
262
263 class VM : public ThreadSafeRefCounted<VM>, public DoublyLinkedListNode<VM> {
264 public:
265     // WebCore has a one-to-one mapping of threads to VMs;
266     // create() should only be called once
267     // on a thread, this is the 'default' VM (it uses the
268     // thread's default string uniquing table from Thread::current()).
269     // API contexts created using the new context group aware interface
270     // create APIContextGroup objects which require less locking of JSC
271     // than the old singleton APIShared VM created for use by
272     // the original API.
273     enum VMType { Default, APIContextGroup, APIShared };
274
275     struct ClientData {
276         JS_EXPORT_PRIVATE virtual ~ClientData() = 0;
277     };
278
279     bool isSharedInstance() { return vmType == APIShared; }
280     bool usingAPI() { return vmType != Default; }
281     JS_EXPORT_PRIVATE static bool sharedInstanceExists();
282     JS_EXPORT_PRIVATE static VM& sharedInstance();
283
284     JS_EXPORT_PRIVATE static Ref<VM> create(HeapType = SmallHeap);
285     static Ref<VM> createContextGroup(HeapType = SmallHeap);
286     JS_EXPORT_PRIVATE ~VM();
287
288     Watchdog& ensureWatchdog();
289     Watchdog* watchdog() { return m_watchdog.get(); }
290
291     HeapProfiler* heapProfiler() const { return m_heapProfiler.get(); }
292     JS_EXPORT_PRIVATE HeapProfiler& ensureHeapProfiler();
293
294 #if ENABLE(SAMPLING_PROFILER)
295     SamplingProfiler* samplingProfiler() { return m_samplingProfiler.get(); }
296     JS_EXPORT_PRIVATE SamplingProfiler& ensureSamplingProfiler(RefPtr<Stopwatch>&&);
297 #endif
298
299     FuzzerAgent* fuzzerAgent() const { return m_fuzzerAgent.get(); }
300     void setFuzzerAgent(std::unique_ptr<FuzzerAgent>&& fuzzerAgent)
301     {
302         m_fuzzerAgent = WTFMove(fuzzerAgent);
303     }
304
305     static unsigned numberOfIDs() { return s_numberOfIDs.load(); }
306     unsigned id() const { return m_id; }
307     bool isEntered() const { return !!entryScope; }
308
309     inline CallFrame* topJSCallFrame() const;
310
311     // Global object in which execution began.
312     JS_EXPORT_PRIVATE JSGlobalObject* vmEntryGlobalObject(const CallFrame*) const;
313
314     WeakRandom& random() { return m_random; }
315     Integrity::Random& integrityRandom() { return m_integrityRandom; }
316
317 private:
318     unsigned nextID();
319
320     static Atomic<unsigned> s_numberOfIDs;
321
322     unsigned m_id;
323     RefPtr<JSLock> m_apiLock;
324 #if USE(CF)
325     // These need to be initialized before heap below.
326     RetainPtr<CFRunLoopRef> m_runLoop;
327 #endif
328
329     WeakRandom m_random;
330     Integrity::Random m_integrityRandom;
331
332 public:
333     Heap heap;
334     
335     std::unique_ptr<FastMallocAlignedMemoryAllocator> fastMallocAllocator;
336     std::unique_ptr<GigacageAlignedMemoryAllocator> primitiveGigacageAllocator;
337     std::unique_ptr<GigacageAlignedMemoryAllocator> jsValueGigacageAllocator;
338
339     std::unique_ptr<HeapCellType> auxiliaryHeapCellType;
340     std::unique_ptr<HeapCellType> immutableButterflyHeapCellType;
341     std::unique_ptr<HeapCellType> cellHeapCellType;
342     std::unique_ptr<HeapCellType> destructibleCellHeapCellType;
343     std::unique_ptr<JSStringHeapCellType> stringHeapCellType;
344     std::unique_ptr<JSDestructibleObjectHeapCellType> destructibleObjectHeapCellType;
345 #if ENABLE(WEBASSEMBLY)
346     std::unique_ptr<JSWebAssemblyCodeBlockHeapCellType> webAssemblyCodeBlockHeapCellType;
347     std::unique_ptr<WebAssemblyFunctionHeapCellType> webAssemblyFunctionHeapCellType;
348 #endif
349     
350     CompleteSubspace primitiveGigacageAuxiliarySpace; // Typed arrays, strings, bitvectors, etc go here.
351     CompleteSubspace jsValueGigacageAuxiliarySpace; // Butterflies, arrays of JSValues, etc go here.
352     CompleteSubspace immutableButterflyJSValueGigacageAuxiliarySpace; // JSImmutableButterfly goes here.
353
354     // We make cross-cutting assumptions about typed arrays being in the primitive Gigacage and butterflies
355     // being in the JSValue gigacage. For some types, it's super obvious where they should go, and so we
356     // can hardcode that fact. But sometimes it's not clear, so we abstract it by having a Gigacage::Kind
357     // constant somewhere.
358     // FIXME: Maybe it would be better if everyone abstracted this?
359     // https://bugs.webkit.org/show_bug.cgi?id=175248
360     ALWAYS_INLINE CompleteSubspace& gigacageAuxiliarySpace(Gigacage::Kind kind)
361     {
362         switch (kind) {
363         case Gigacage::Primitive:
364             return primitiveGigacageAuxiliarySpace;
365         case Gigacage::JSValue:
366             return jsValueGigacageAuxiliarySpace;
367         case Gigacage::NumberOfKinds:
368             break;
369         }
370         RELEASE_ASSERT_NOT_REACHED();
371         return primitiveGigacageAuxiliarySpace;
372     }
373     
374     // Whenever possible, use subspaceFor<CellType>(vm) to get one of these subspaces.
375     CompleteSubspace cellSpace;
376     CompleteSubspace variableSizedCellSpace; // FIXME: This space is problematic because we have things in here like DirectArguments and ScopedArguments; those should be split into JSValueOOB cells and JSValueStrict auxiliaries. https://bugs.webkit.org/show_bug.cgi?id=182858
377     CompleteSubspace destructibleCellSpace;
378     CompleteSubspace stringSpace;
379     CompleteSubspace destructibleObjectSpace;
380     CompleteSubspace eagerlySweptDestructibleObjectSpace;
381     
382     IsoSubspace executableToCodeBlockEdgeSpace;
383     IsoSubspace functionSpace;
384     IsoSubspace internalFunctionSpace;
385     IsoSubspace nativeExecutableSpace;
386     IsoSubspace propertyTableSpace;
387     IsoSubspace structureRareDataSpace;
388     IsoSubspace structureSpace;
389     IsoSubspace symbolTableSpace;
390
391 #define DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(name) \
392     template<SubspaceAccess mode> \
393     IsoSubspace* name() \
394     { \
395         if (m_##name || mode == SubspaceAccess::Concurrently) \
396             return m_##name.get(); \
397         return name##Slow(); \
398     } \
399     IsoSubspace* name##Slow(); \
400     std::unique_ptr<IsoSubspace> m_##name;
401
402
403 #if JSC_OBJC_API_ENABLED
404     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(objCCallbackFunctionSpace)
405 #endif
406     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(boundFunctionSpace)
407     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(callbackFunctionSpace)
408     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(customGetterSetterFunctionSpace)
409     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(errorInstanceSpace)
410     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(nativeStdFunctionSpace)
411     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(proxyRevokeSpace)
412     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(weakObjectRefSpace)
413     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(weakSetSpace)
414     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(weakMapSpace)
415 #if ENABLE(WEBASSEMBLY)
416     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(webAssemblyCodeBlockSpace)
417     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(webAssemblyFunctionSpace)
418     DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(webAssemblyWrapperFunctionSpace)
419 #endif
420
421 #undef DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER
422     
423     IsoCellSet executableToCodeBlockEdgesWithConstraints;
424     IsoCellSet executableToCodeBlockEdgesWithFinalizers;
425
426 #define DYNAMIC_SPACE_AND_SET_DEFINE_MEMBER(name) \
427     template<SubspaceAccess mode> \
428     IsoSubspace* name() \
429     { \
430         if (auto* spaceAndSet = m_##name.get()) \
431             return &spaceAndSet->space; \
432         if (mode == SubspaceAccess::Concurrently) \
433             return nullptr; \
434         return name##Slow(); \
435     } \
436     IsoSubspace* name##Slow(); \
437     std::unique_ptr<SpaceAndSet> m_##name;
438     
439     struct SpaceAndSet {
440         WTF_MAKE_STRUCT_FAST_ALLOCATED;
441
442         IsoSubspace space;
443         IsoCellSet set;
444         
445         template<typename... Arguments>
446         SpaceAndSet(Arguments&&... arguments)
447             : space(std::forward<Arguments>(arguments)...)
448             , set(space)
449         {
450         }
451         
452         static IsoCellSet& setFor(Subspace& space)
453         {
454             return *bitwise_cast<IsoCellSet*>(
455                 bitwise_cast<char*>(&space) -
456                 OBJECT_OFFSETOF(SpaceAndSet, space) +
457                 OBJECT_OFFSETOF(SpaceAndSet, set));
458         }
459     };
460     
461     SpaceAndSet codeBlockSpace;
462
463     template<typename Func>
464     void forEachCodeBlockSpace(const Func& func)
465     {
466         // This should not include webAssemblyCodeBlockSpace because this is about subsclasses of
467         // JSC::CodeBlock.
468         func(codeBlockSpace);
469     }
470
471     DYNAMIC_SPACE_AND_SET_DEFINE_MEMBER(evalExecutableSpace)
472     DYNAMIC_SPACE_AND_SET_DEFINE_MEMBER(moduleProgramExecutableSpace)
473     SpaceAndSet functionExecutableSpace;
474     SpaceAndSet programExecutableSpace;
475
476     template<typename Func>
477     void forEachScriptExecutableSpace(const Func& func)
478     {
479         if (m_evalExecutableSpace)
480             func(*m_evalExecutableSpace);
481         func(functionExecutableSpace);
482         if (m_moduleProgramExecutableSpace)
483             func(*m_moduleProgramExecutableSpace);
484         func(programExecutableSpace);
485     }
486
487     SpaceAndSet unlinkedFunctionExecutableSpace;
488
489 #undef DYNAMIC_SPACE_AND_SET_DEFINE_MEMBER
490
491     VMType vmType;
492     ClientData* clientData;
493     EntryFrame* topEntryFrame;
494     // NOTE: When throwing an exception while rolling back the call frame, this may be equal to
495     // topEntryFrame.
496     // FIXME: This should be a void*, because it might not point to a CallFrame.
497     // https://bugs.webkit.org/show_bug.cgi?id=160441
498     ExecState* topCallFrame { nullptr };
499 #if ENABLE(WEBASSEMBLY)
500     Wasm::Context wasmContext;
501 #endif
502     Strong<Structure> structureStructure;
503     Strong<Structure> structureRareDataStructure;
504     Strong<Structure> terminatedExecutionErrorStructure;
505     Strong<Structure> stringStructure;
506     Strong<Structure> propertyNameEnumeratorStructure;
507     Strong<Structure> customGetterSetterStructure;
508     Strong<Structure> domAttributeGetterSetterStructure;
509     Strong<Structure> scopedArgumentsTableStructure;
510     Strong<Structure> apiWrapperStructure;
511     Strong<Structure> nativeExecutableStructure;
512     Strong<Structure> evalExecutableStructure;
513     Strong<Structure> programExecutableStructure;
514     Strong<Structure> functionExecutableStructure;
515 #if ENABLE(WEBASSEMBLY)
516     Strong<Structure> webAssemblyCodeBlockStructure;
517 #endif
518     Strong<Structure> moduleProgramExecutableStructure;
519     Strong<Structure> regExpStructure;
520     Strong<Structure> symbolStructure;
521     Strong<Structure> symbolTableStructure;
522     Strong<Structure> fixedArrayStructure;
523     Strong<Structure> immutableButterflyStructures[NumberOfCopyOnWriteIndexingModes];
524     Strong<Structure> sourceCodeStructure;
525     Strong<Structure> scriptFetcherStructure;
526     Strong<Structure> scriptFetchParametersStructure;
527     Strong<Structure> structureChainStructure;
528     Strong<Structure> sparseArrayValueMapStructure;
529     Strong<Structure> templateObjectDescriptorStructure;
530     Strong<Structure> arrayBufferNeuteringWatchpointStructure;
531     Strong<Structure> unlinkedFunctionExecutableStructure;
532     Strong<Structure> unlinkedProgramCodeBlockStructure;
533     Strong<Structure> unlinkedEvalCodeBlockStructure;
534     Strong<Structure> unlinkedFunctionCodeBlockStructure;
535     Strong<Structure> unlinkedModuleProgramCodeBlockStructure;
536     Strong<Structure> propertyTableStructure;
537     Strong<Structure> functionRareDataStructure;
538     Strong<Structure> exceptionStructure;
539     Strong<Structure> promiseDeferredStructure;
540     Strong<Structure> internalPromiseDeferredStructure;
541     Strong<Structure> nativeStdFunctionCellStructure;
542     Strong<Structure> programCodeBlockStructure;
543     Strong<Structure> moduleProgramCodeBlockStructure;
544     Strong<Structure> evalCodeBlockStructure;
545     Strong<Structure> functionCodeBlockStructure;
546     Strong<Structure> hashMapBucketSetStructure;
547     Strong<Structure> hashMapBucketMapStructure;
548     Strong<Structure> bigIntStructure;
549     Strong<Structure> executableToCodeBlockEdgeStructure;
550
551     Strong<Structure> m_setIteratorStructure;
552     Strong<Structure> m_mapIteratorStructure;
553
554     Strong<JSPropertyNameEnumerator> m_emptyPropertyNameEnumerator;
555
556     Strong<JSCell> m_sentinelSetBucket;
557     Strong<JSCell> m_sentinelMapBucket;
558
559     Ref<PromiseDeferredTimer> promiseDeferredTimer;
560     
561     JSCell* currentlyDestructingCallbackObject;
562     const ClassInfo* currentlyDestructingCallbackObjectClassInfo { nullptr };
563
564     AtomStringTable* m_atomStringTable;
565     WTF::SymbolRegistry m_symbolRegistry;
566     CommonIdentifiers* propertyNames;
567     const ArgList* emptyList;
568     SmallStrings smallStrings;
569     NumericStrings numericStrings;
570     DateInstanceCache dateInstanceCache;
571     std::unique_ptr<SimpleStats> machineCodeBytesPerBytecodeWordForBaselineJIT;
572     WeakGCMap<std::pair<CustomGetterSetter*, int>, JSCustomGetterSetterFunction> customGetterSetterFunctionMap;
573     WeakGCMap<StringImpl*, JSString, PtrHash<StringImpl*>> stringCache;
574     Strong<JSString> lastCachedString;
575
576     AtomStringTable* atomStringTable() const { return m_atomStringTable; }
577     WTF::SymbolRegistry& symbolRegistry() { return m_symbolRegistry; }
578
579     Structure* setIteratorStructure()
580     {
581         if (LIKELY(m_setIteratorStructure))
582             return m_setIteratorStructure.get();
583         return setIteratorStructureSlow();
584     }
585
586     Structure* mapIteratorStructure()
587     {
588         if (LIKELY(m_mapIteratorStructure))
589             return m_mapIteratorStructure.get();
590         return mapIteratorStructureSlow();
591     }
592
593     JSCell* sentinelSetBucket()
594     {
595         if (LIKELY(m_sentinelSetBucket))
596             return m_sentinelSetBucket.get();
597         return sentinelSetBucketSlow();
598     }
599
600     JSCell* sentinelMapBucket()
601     {
602         if (LIKELY(m_sentinelMapBucket))
603             return m_sentinelMapBucket.get();
604         return sentinelMapBucketSlow();
605     }
606
607     JSPropertyNameEnumerator* emptyPropertyNameEnumerator()
608     {
609         if (LIKELY(m_emptyPropertyNameEnumerator))
610             return m_emptyPropertyNameEnumerator.get();
611         return emptyPropertyNameEnumeratorSlow();
612     }
613
614     WeakGCMap<SymbolImpl*, Symbol, PtrHash<SymbolImpl*>> symbolImplToSymbolMap;
615
616     enum class DeletePropertyMode {
617         // Default behaviour of deleteProperty, matching the spec.
618         Default,
619         // This setting causes deleteProperty to force deletion of all
620         // properties including those that are non-configurable (DontDelete).
621         IgnoreConfigurable
622     };
623
624     DeletePropertyMode deletePropertyMode()
625     {
626         return m_deletePropertyMode;
627     }
628
629     class DeletePropertyModeScope {
630     public:
631         DeletePropertyModeScope(VM& vm, DeletePropertyMode mode)
632             : m_vm(vm)
633             , m_previousMode(vm.m_deletePropertyMode)
634         {
635             m_vm.m_deletePropertyMode = mode;
636         }
637
638         ~DeletePropertyModeScope()
639         {
640             m_vm.m_deletePropertyMode = m_previousMode;
641         }
642
643     private:
644         VM& m_vm;
645         DeletePropertyMode m_previousMode;
646     };
647
648     static JS_EXPORT_PRIVATE bool canUseAssembler();
649     static bool isInMiniMode()
650     {
651         return !canUseJIT() || Options::forceMiniVMMode();
652     }
653
654     static bool useUnlinkedCodeBlockJettisoning()
655     {
656         return Options::useUnlinkedCodeBlockJettisoning() || isInMiniMode();
657     }
658
659     static void computeCanUseJIT();
660     ALWAYS_INLINE static bool canUseJIT()
661     {
662 #if ENABLE(JIT)
663 #if !ASSERT_DISABLED
664         RELEASE_ASSERT(s_canUseJITIsSet);
665 #endif
666         return s_canUseJIT;
667 #else
668         return false;
669 #endif
670     }
671
672     SourceProviderCache* addSourceProviderCache(SourceProvider*);
673     void clearSourceProviderCaches();
674
675     StructureCache structureCache;
676
677     typedef HashMap<RefPtr<SourceProvider>, RefPtr<SourceProviderCache>> SourceProviderCacheMap;
678     SourceProviderCacheMap sourceProviderCacheMap;
679     Interpreter* interpreter;
680 #if ENABLE(JIT)
681     std::unique_ptr<JITThunks> jitStubs;
682     MacroAssemblerCodeRef<JITThunkPtrTag> getCTIStub(ThunkGenerator generator)
683     {
684         return jitStubs->ctiStub(*this, generator);
685     }
686
687 #endif // ENABLE(JIT)
688 #if ENABLE(FTL_JIT)
689     std::unique_ptr<FTL::Thunks> ftlThunks;
690 #endif
691     NativeExecutable* getHostFunction(NativeFunction, NativeFunction constructor, const String& name);
692     NativeExecutable* getHostFunction(NativeFunction, Intrinsic, NativeFunction constructor, const DOMJIT::Signature*, const String& name);
693
694     MacroAssemblerCodePtr<JSEntryPtrTag> getCTIInternalFunctionTrampolineFor(CodeSpecializationKind);
695
696     static ptrdiff_t exceptionOffset()
697     {
698         return OBJECT_OFFSETOF(VM, m_exception);
699     }
700
701     static ptrdiff_t callFrameForCatchOffset()
702     {
703         return OBJECT_OFFSETOF(VM, callFrameForCatch);
704     }
705
706     static ptrdiff_t topEntryFrameOffset()
707     {
708         return OBJECT_OFFSETOF(VM, topEntryFrame);
709     }
710
711     static ptrdiff_t offsetOfHeapBarrierThreshold()
712     {
713         return OBJECT_OFFSETOF(VM, heap) + OBJECT_OFFSETOF(Heap, m_barrierThreshold);
714     }
715
716     static ptrdiff_t offsetOfHeapMutatorShouldBeFenced()
717     {
718         return OBJECT_OFFSETOF(VM, heap) + OBJECT_OFFSETOF(Heap, m_mutatorShouldBeFenced);
719     }
720
721     void restorePreviousException(Exception* exception) { setException(exception); }
722
723     void clearLastException() { m_lastException = nullptr; }
724
725     ExecState** addressOfCallFrameForCatch() { return &callFrameForCatch; }
726
727     JSCell** addressOfException() { return reinterpret_cast<JSCell**>(&m_exception); }
728
729     Exception* lastException() const { return m_lastException; }
730     JSCell** addressOfLastException() { return reinterpret_cast<JSCell**>(&m_lastException); }
731
732     // This should only be used for test or assertion code that wants to inspect
733     // the pending exception without interfering with Throw/CatchScopes.
734     Exception* exceptionForInspection() const { return m_exception; }
735
736     void setFailNextNewCodeBlock() { m_failNextNewCodeBlock = true; }
737     bool getAndClearFailNextNewCodeBlock()
738     {
739         bool result = m_failNextNewCodeBlock;
740         m_failNextNewCodeBlock = false;
741         return result;
742     }
743     
744     ALWAYS_INLINE Structure* getStructure(StructureID id)
745     {
746         return heap.structureIDTable().get(decontaminate(id));
747     }
748     
749     void* stackPointerAtVMEntry() const { return m_stackPointerAtVMEntry; }
750     void setStackPointerAtVMEntry(void*);
751
752     size_t softReservedZoneSize() const { return m_currentSoftReservedZoneSize; }
753     size_t updateSoftReservedZoneSize(size_t softReservedZoneSize);
754     
755     static size_t committedStackByteCount();
756     inline bool ensureStackCapacityFor(Register* newTopOfStack);
757
758     void* stackLimit() { return m_stackLimit; }
759     void* softStackLimit() { return m_softStackLimit; }
760     void** addressOfSoftStackLimit() { return &m_softStackLimit; }
761 #if ENABLE(C_LOOP)
762     void* cloopStackLimit() { return m_cloopStackLimit; }
763     void setCLoopStackLimit(void* limit) { m_cloopStackLimit = limit; }
764     JS_EXPORT_PRIVATE void* currentCLoopStackPointer() const;
765 #endif
766
767     inline bool isSafeToRecurseSoft() const;
768     bool isSafeToRecurse() const
769     {
770         return isSafeToRecurse(m_stackLimit);
771     }
772
773     void** addressOfLastStackTop() { return &m_lastStackTop; }
774     void* lastStackTop() { return m_lastStackTop; }
775     void setLastStackTop(void*);
776     
777     void firePrimitiveGigacageEnabledIfNecessary()
778     {
779         if (m_needToFirePrimitiveGigacageEnabled) {
780             m_needToFirePrimitiveGigacageEnabled = false;
781             m_primitiveGigacageEnabled.fireAll(*this, "Primitive gigacage disabled asynchronously");
782         }
783     }
784
785     JSValue hostCallReturnValue;
786     unsigned varargsLength;
787     ExecState* newCallFrameReturnValue;
788     ExecState* callFrameForCatch;
789     void* targetMachinePCForThrow;
790     const Instruction* targetInterpreterPCForThrow;
791     uint32_t osrExitIndex;
792     void* osrExitJumpDestination;
793     bool isExecutingInRegExpJIT { false };
794
795     // The threading protocol here is as follows:
796     // - You can call scratchBufferForSize from any thread.
797     // - You can only set the ScratchBuffer's activeLength from the main thread.
798     // - You can only write to entries in the ScratchBuffer from the main thread.
799     ScratchBuffer* scratchBufferForSize(size_t size);
800     void clearScratchBuffers();
801
802     EncodedJSValue* exceptionFuzzingBuffer(size_t size)
803     {
804         ASSERT(Options::useExceptionFuzz());
805         if (!m_exceptionFuzzBuffer)
806             m_exceptionFuzzBuffer = MallocPtr<EncodedJSValue>::malloc(size);
807         return m_exceptionFuzzBuffer.get();
808     }
809
810     void gatherScratchBufferRoots(ConservativeRoots&);
811
812     VMEntryScope* entryScope;
813
814     JSObject* stringRecursionCheckFirstObject { nullptr };
815     HashSet<JSObject*> stringRecursionCheckVisitedObjects;
816     
817     LocalTimeOffsetCache utcTimeOffsetCache;
818     LocalTimeOffsetCache localTimeOffsetCache;
819
820     String cachedDateString;
821     double cachedDateStringValue;
822
823     std::unique_ptr<Profiler::Database> m_perBytecodeProfiler;
824     RefPtr<TypedArrayController> m_typedArrayController;
825     RegExpCache* m_regExpCache;
826     BumpPointerAllocator m_regExpAllocator;
827     ConcurrentJSLock m_regExpAllocatorLock;
828
829 #if ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS)
830     static constexpr size_t patternContextBufferSize = 8192; // Space allocated to save nested parenthesis context
831     UniqueArray<char> m_regExpPatternContexBuffer;
832     Lock m_regExpPatternContextLock;
833     char* acquireRegExpPatternContexBuffer();
834     void releaseRegExpPatternContexBuffer();
835 #else
836     static constexpr size_t patternContextBufferSize = 0; // Space allocated to save nested parenthesis context
837 #endif
838
839     Ref<CompactVariableMap> m_compactVariableMap;
840
841     std::unique_ptr<HasOwnPropertyCache> m_hasOwnPropertyCache;
842     ALWAYS_INLINE HasOwnPropertyCache* hasOwnPropertyCache() { return m_hasOwnPropertyCache.get(); }
843     HasOwnPropertyCache* ensureHasOwnPropertyCache();
844
845 #if ENABLE(REGEXP_TRACING)
846     typedef ListHashSet<RegExp*> RTTraceList;
847     RTTraceList* m_rtTraceList;
848 #endif
849
850     JS_EXPORT_PRIVATE void resetDateCache();
851
852     RegExpCache* regExpCache() { return m_regExpCache; }
853 #if ENABLE(REGEXP_TRACING)
854     void addRegExpToTrace(RegExp*);
855 #endif
856     JS_EXPORT_PRIVATE void dumpRegExpTrace();
857
858     bool isCollectorBusyOnCurrentThread() { return heap.isCurrentThreadBusy(); }
859
860 #if ENABLE(GC_VALIDATION)
861     bool isInitializingObject() const; 
862     void setInitializingObjectClass(const ClassInfo*);
863 #endif
864
865     bool currentThreadIsHoldingAPILock() const { return m_apiLock->currentThreadIsHoldingLock(); }
866
867     JSLock& apiLock() { return *m_apiLock; }
868     CodeCache* codeCache() { return m_codeCache.get(); }
869
870     JS_EXPORT_PRIVATE void whenIdle(Function<void()>&&);
871
872     JS_EXPORT_PRIVATE void deleteAllCode(DeleteAllCodeEffort);
873     JS_EXPORT_PRIVATE void deleteAllLinkedCode(DeleteAllCodeEffort);
874
875     void shrinkFootprintWhenIdle();
876
877     WatchpointSet* ensureWatchpointSetForImpureProperty(const Identifier&);
878     void registerWatchpointForImpureProperty(const Identifier&, Watchpoint*);
879     
880     // FIXME: Use AtomString once it got merged with Identifier.
881     JS_EXPORT_PRIVATE void addImpureProperty(const String&);
882     
883     InlineWatchpointSet& primitiveGigacageEnabled() { return m_primitiveGigacageEnabled; }
884
885     BuiltinExecutables* builtinExecutables() { return m_builtinExecutables.get(); }
886
887     bool enableTypeProfiler();
888     bool disableTypeProfiler();
889     TypeProfilerLog* typeProfilerLog() { return m_typeProfilerLog.get(); }
890     TypeProfiler* typeProfiler() { return m_typeProfiler.get(); }
891     JS_EXPORT_PRIVATE void dumpTypeProfilerData();
892
893     FunctionHasExecutedCache* functionHasExecutedCache() { return &m_functionHasExecutedCache; }
894
895     ControlFlowProfiler* controlFlowProfiler() { return m_controlFlowProfiler.get(); }
896     bool enableControlFlowProfiler();
897     bool disableControlFlowProfiler();
898
899     void queueMicrotask(JSGlobalObject&, Ref<Microtask>&&);
900     JS_EXPORT_PRIVATE void drainMicrotasks();
901     void setOnEachMicrotaskTick(WTF::Function<void(VM&)>&& func) { m_onEachMicrotaskTick = WTFMove(func); }
902     void finalizeSynchronousJSExecution() { ASSERT(currentThreadIsHoldingAPILock()); m_currentWeakRefVersion++; }
903     uintptr_t currentWeakRefVersion() const { return m_currentWeakRefVersion; }
904
905     void setGlobalConstRedeclarationShouldThrow(bool globalConstRedeclarationThrow) { m_globalConstRedeclarationShouldThrow = globalConstRedeclarationThrow; }
906     ALWAYS_INLINE bool globalConstRedeclarationShouldThrow() const { return m_globalConstRedeclarationShouldThrow; }
907
908     void setShouldBuildPCToCodeOriginMapping() { m_shouldBuildPCToCodeOriginMapping = true; }
909     bool shouldBuilderPCToCodeOriginMapping() const { return m_shouldBuildPCToCodeOriginMapping; }
910
911     BytecodeIntrinsicRegistry& bytecodeIntrinsicRegistry() { return *m_bytecodeIntrinsicRegistry; }
912     
913     ShadowChicken* shadowChicken() { return m_shadowChicken.get(); }
914     void ensureShadowChicken();
915     
916     template<typename Func>
917     void logEvent(CodeBlock*, const char* summary, const Func& func);
918
919     Optional<RefPtr<Thread>> ownerThread() const { return m_apiLock->ownerThread(); }
920
921     VMTraps& traps() { return m_traps; }
922
923     void handleTraps(ExecState* exec, VMTraps::Mask mask = VMTraps::Mask::allEventTypes()) { m_traps.handleTraps(exec, mask); }
924
925     bool needTrapHandling() { return m_traps.needTrapHandling(); }
926     bool needTrapHandling(VMTraps::Mask mask) { return m_traps.needTrapHandling(mask); }
927     void* needTrapHandlingAddress() { return m_traps.needTrapHandlingAddress(); }
928
929     void notifyNeedDebuggerBreak() { m_traps.fireTrap(VMTraps::NeedDebuggerBreak); }
930     void notifyNeedTermination() { m_traps.fireTrap(VMTraps::NeedTermination); }
931     void notifyNeedWatchdogCheck() { m_traps.fireTrap(VMTraps::NeedWatchdogCheck); }
932
933     void promiseRejected(JSPromise*);
934
935 #if ENABLE(EXCEPTION_SCOPE_VERIFICATION)
936     StackTrace* nativeStackTraceOfLastThrow() const { return m_nativeStackTraceOfLastThrow.get(); }
937     Thread* throwingThread() const { return m_throwingThread.get(); }
938     bool needExceptionCheck() const { return m_needExceptionCheck; }
939 #endif
940
941 #if USE(CF)
942     CFRunLoopRef runLoop() const { return m_runLoop.get(); }
943     JS_EXPORT_PRIVATE void setRunLoop(CFRunLoopRef);
944 #endif // USE(CF)
945
946     static void setCrashOnVMCreation(bool);
947
948     class DeferExceptionScope {
949     public:
950         DeferExceptionScope(VM& vm)
951             : m_savedException(vm.m_exception, nullptr)
952             , m_savedLastException(vm.m_lastException, nullptr)
953         {
954         }
955
956     private:
957         SetForScope<Exception*> m_savedException;
958         SetForScope<Exception*> m_savedLastException;
959     };
960
961 private:
962     friend class LLIntOffsetsExtractor;
963
964     VM(VMType, HeapType);
965     static VM*& sharedInstanceInternal();
966     void createNativeThunk();
967
968     JS_EXPORT_PRIVATE Structure* setIteratorStructureSlow();
969     JS_EXPORT_PRIVATE Structure* mapIteratorStructureSlow();
970     JSCell* sentinelSetBucketSlow();
971     JSCell* sentinelMapBucketSlow();
972     JSPropertyNameEnumerator* emptyPropertyNameEnumeratorSlow();
973
974     void updateStackLimits();
975
976     bool isSafeToRecurse(void* stackLimit) const
977     {
978         ASSERT(Thread::current().stack().isGrowingDownward());
979         void* curr = currentStackPointer();
980         return curr >= stackLimit;
981     }
982
983     void setException(Exception* exception)
984     {
985         m_exception = exception;
986         m_lastException = exception;
987     }
988     Exception* exception() const
989     {
990 #if ENABLE(EXCEPTION_SCOPE_VERIFICATION)
991         m_needExceptionCheck = false;
992 #endif
993         return m_exception;
994     }
995     void clearException()
996     {
997 #if ENABLE(EXCEPTION_SCOPE_VERIFICATION)
998         m_needExceptionCheck = false;
999         m_nativeStackTraceOfLastThrow = nullptr;
1000         m_throwingThread = nullptr;
1001 #endif
1002         m_exception = nullptr;
1003     }
1004
1005 #if ENABLE(C_LOOP)
1006     bool ensureStackCapacityForCLoop(Register* newTopOfStack);
1007     bool isSafeToRecurseSoftCLoop() const;
1008 #endif // ENABLE(C_LOOP)
1009
1010     JS_EXPORT_PRIVATE Exception* throwException(ExecState*, Exception*);
1011     JS_EXPORT_PRIVATE Exception* throwException(ExecState*, JSValue);
1012     JS_EXPORT_PRIVATE Exception* throwException(ExecState*, JSObject*);
1013
1014 #if ENABLE(EXCEPTION_SCOPE_VERIFICATION)
1015     void verifyExceptionCheckNeedIsSatisfied(unsigned depth, ExceptionEventLocation&);
1016 #endif
1017     
1018     static void primitiveGigacageDisabledCallback(void*);
1019     void primitiveGigacageDisabled();
1020
1021     void callPromiseRejectionCallback(Strong<JSPromise>&);
1022     void didExhaustMicrotaskQueue();
1023
1024 #if ENABLE(GC_VALIDATION)
1025     const ClassInfo* m_initializingObjectClass;
1026 #endif
1027
1028     void* m_stackPointerAtVMEntry;
1029     size_t m_currentSoftReservedZoneSize;
1030     void* m_stackLimit { nullptr };
1031     void* m_softStackLimit { nullptr };
1032 #if ENABLE(C_LOOP)
1033     void* m_cloopStackLimit { nullptr };
1034 #endif
1035     void* m_lastStackTop { nullptr };
1036
1037     Exception* m_exception { nullptr };
1038     Exception* m_lastException { nullptr };
1039 #if ENABLE(EXCEPTION_SCOPE_VERIFICATION)
1040     ExceptionScope* m_topExceptionScope { nullptr };
1041     ExceptionEventLocation m_simulatedThrowPointLocation;
1042     unsigned m_simulatedThrowPointRecursionDepth { 0 };
1043     mutable bool m_needExceptionCheck { false };
1044     std::unique_ptr<StackTrace> m_nativeStackTraceOfLastThrow;
1045     std::unique_ptr<StackTrace> m_nativeStackTraceOfLastSimulatedThrow;
1046     RefPtr<Thread> m_throwingThread;
1047 #endif
1048
1049     bool m_failNextNewCodeBlock { false };
1050     DeletePropertyMode m_deletePropertyMode { DeletePropertyMode::Default };
1051     bool m_globalConstRedeclarationShouldThrow { true };
1052     bool m_shouldBuildPCToCodeOriginMapping { false };
1053     std::unique_ptr<CodeCache> m_codeCache;
1054     std::unique_ptr<BuiltinExecutables> m_builtinExecutables;
1055     HashMap<String, RefPtr<WatchpointSet>> m_impurePropertyWatchpointSets;
1056     std::unique_ptr<TypeProfiler> m_typeProfiler;
1057     std::unique_ptr<TypeProfilerLog> m_typeProfilerLog;
1058     unsigned m_typeProfilerEnabledCount;
1059     bool m_needToFirePrimitiveGigacageEnabled { false };
1060     Lock m_scratchBufferLock;
1061     Vector<ScratchBuffer*> m_scratchBuffers;
1062     size_t m_sizeOfLastScratchBuffer { 0 };
1063     InlineWatchpointSet m_primitiveGigacageEnabled;
1064     FunctionHasExecutedCache m_functionHasExecutedCache;
1065     std::unique_ptr<ControlFlowProfiler> m_controlFlowProfiler;
1066     unsigned m_controlFlowProfilerEnabledCount;
1067     Deque<std::unique_ptr<QueuedTask>> m_microtaskQueue;
1068     MallocPtr<EncodedJSValue> m_exceptionFuzzBuffer;
1069     VMTraps m_traps;
1070     RefPtr<Watchdog> m_watchdog;
1071     std::unique_ptr<HeapProfiler> m_heapProfiler;
1072 #if ENABLE(SAMPLING_PROFILER)
1073     RefPtr<SamplingProfiler> m_samplingProfiler;
1074 #endif
1075     std::unique_ptr<FuzzerAgent> m_fuzzerAgent;
1076     std::unique_ptr<ShadowChicken> m_shadowChicken;
1077     std::unique_ptr<BytecodeIntrinsicRegistry> m_bytecodeIntrinsicRegistry;
1078
1079     // FIXME: We should remove handled promises from this list at GC flip. <https://webkit.org/b/201005>
1080     Vector<Strong<JSPromise>> m_aboutToBeNotifiedRejectedPromises;
1081
1082     WTF::Function<void(VM&)> m_onEachMicrotaskTick;
1083     uintptr_t m_currentWeakRefVersion { 0 };
1084
1085 #if ENABLE(JIT)
1086 #if !ASSERT_DISABLED
1087     JS_EXPORT_PRIVATE static bool s_canUseJITIsSet;
1088 #endif
1089     JS_EXPORT_PRIVATE static bool s_canUseJIT;
1090 #endif
1091
1092     VM* m_prev; // Required by DoublyLinkedListNode.
1093     VM* m_next; // Required by DoublyLinkedListNode.
1094
1095     // Friends for exception checking purpose only.
1096     friend class Heap;
1097     friend class CatchScope;
1098     friend class ExceptionScope;
1099     friend class ThrowScope;
1100     friend class VMTraps;
1101     friend class WTF::DoublyLinkedListNode<VM>;
1102 };
1103
1104 #if ENABLE(GC_VALIDATION)
1105 inline bool VM::isInitializingObject() const
1106 {
1107     return !!m_initializingObjectClass;
1108 }
1109
1110 inline void VM::setInitializingObjectClass(const ClassInfo* initializingObjectClass)
1111 {
1112     m_initializingObjectClass = initializingObjectClass;
1113 }
1114 #endif
1115
1116 inline Heap* WeakSet::heap() const
1117 {
1118     return &m_vm.heap;
1119 }
1120
1121 #if !ENABLE(C_LOOP)
1122 extern "C" void sanitizeStackForVMImpl(VM*);
1123 #endif
1124
1125 JS_EXPORT_PRIVATE void sanitizeStackForVM(VM&);
1126 void logSanitizeStack(VM&);
1127
1128 } // namespace JSC