|
Lines 153-159
VM::VM(VMType vmType, HeapType heapType)
a/Source/JavaScriptCore/runtime/VM.cpp_sec1
|
| 153 |
, m_atomicStringTable(vmType == Default ? wtfThreadData().atomicStringTable() : new AtomicStringTable) |
153 |
, m_atomicStringTable(vmType == Default ? wtfThreadData().atomicStringTable() : new AtomicStringTable) |
| 154 |
, propertyNames(nullptr) |
154 |
, propertyNames(nullptr) |
| 155 |
, emptyList(new MarkedArgumentBuffer) |
155 |
, emptyList(new MarkedArgumentBuffer) |
| 156 |
, keywords(adoptPtr(new Keywords(*this))) |
156 |
, keywords(std::make_unique<Keywords>(*this)) |
| 157 |
, interpreter(0) |
157 |
, interpreter(0) |
| 158 |
, jsArrayClassInfo(JSArray::info()) |
158 |
, jsArrayClassInfo(JSArray::info()) |
| 159 |
, jsFinalObjectClassInfo(JSFinalObject::info()) |
159 |
, jsFinalObjectClassInfo(JSFinalObject::info()) |
|
Lines 241-247
VM::VM(VMType vmType, HeapType heapType)
a/Source/JavaScriptCore/runtime/VM.cpp_sec2
|
| 241 |
wtfThreadData().setCurrentAtomicStringTable(existingEntryAtomicStringTable); |
241 |
wtfThreadData().setCurrentAtomicStringTable(existingEntryAtomicStringTable); |
| 242 |
|
242 |
|
| 243 |
#if ENABLE(JIT) |
243 |
#if ENABLE(JIT) |
| 244 |
jitStubs = adoptPtr(new JITThunks()); |
244 |
jitStubs = std::make_unique<JITThunks>(); |
| 245 |
arityCheckFailReturnThunks = std::make_unique<ArityCheckFailReturnThunks>(); |
245 |
arityCheckFailReturnThunks = std::make_unique<ArityCheckFailReturnThunks>(); |
| 246 |
#endif |
246 |
#endif |
| 247 |
arityCheckData = std::make_unique<CommonSlowPaths::ArityCheckData>(); |
247 |
arityCheckData = std::make_unique<CommonSlowPaths::ArityCheckData>(); |
|
Lines 261-267
VM::VM(VMType vmType, HeapType heapType)
a/Source/JavaScriptCore/runtime/VM.cpp_sec3
|
| 261 |
LLInt::Data::performAssertions(*this); |
261 |
LLInt::Data::performAssertions(*this); |
| 262 |
|
262 |
|
| 263 |
if (Options::enableProfiler()) { |
263 |
if (Options::enableProfiler()) { |
| 264 |
m_perBytecodeProfiler = adoptPtr(new Profiler::Database(*this)); |
264 |
m_perBytecodeProfiler = std::make_unique<Profiler::Database>(*this); |
| 265 |
|
265 |
|
| 266 |
StringPrintStream pathOut; |
266 |
StringPrintStream pathOut; |
| 267 |
const char* profilerPath = getenv("JSC_PROFILER_PATH"); |
267 |
const char* profilerPath = getenv("JSC_PROFILER_PATH"); |
|
Lines 273-279
VM::VM(VMType vmType, HeapType heapType)
a/Source/JavaScriptCore/runtime/VM.cpp_sec4
|
| 273 |
|
273 |
|
| 274 |
#if ENABLE(DFG_JIT) |
274 |
#if ENABLE(DFG_JIT) |
| 275 |
if (canUseJIT()) |
275 |
if (canUseJIT()) |
| 276 |
dfgState = adoptPtr(new DFG::LongLivedState()); |
276 |
dfgState = std::make_unique<DFG::LongLivedState>(); |
| 277 |
#endif |
277 |
#endif |
| 278 |
|
278 |
|
| 279 |
// Initialize this last, as a free way of asserting that VM initialization itself |
279 |
// Initialize this last, as a free way of asserting that VM initialization itself |
|
Lines 303-310
VM::~VM()
a/Source/JavaScriptCore/runtime/VM.cpp_sec5
|
| 303 |
#endif // ENABLE(DFG_JIT) |
303 |
#endif // ENABLE(DFG_JIT) |
| 304 |
|
304 |
|
| 305 |
// Clear this first to ensure that nobody tries to remove themselves from it. |
305 |
// Clear this first to ensure that nobody tries to remove themselves from it. |
| 306 |
m_perBytecodeProfiler.clear(); |
306 |
m_perBytecodeProfiler = nullptr; |
| 307 |
|
307 |
|
| 308 |
ASSERT(m_apiLock->currentThreadIsHoldingLock()); |
308 |
ASSERT(m_apiLock->currentThreadIsHoldingLock()); |
| 309 |
m_apiLock->willDestroyVM(this); |
309 |
m_apiLock->willDestroyVM(this); |
| 310 |
heap.lastChanceToFinalize(); |
310 |
heap.lastChanceToFinalize(); |