Changeset 226556 in webkit
- Timestamp:
- Jan 8, 2018, 2:59:10 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r226530 r226556 1 2018-01-08 Mark Lam <mark.lam@apple.com> 2 3 Rename CodeBlock::m_vm to CodeBlock::m_poisonedVM. 4 https://bugs.webkit.org/show_bug.cgi?id=181403 5 <rdar://problem/36359789> 6 7 Rubber-stamped by JF Bastien. 8 9 * bytecode/CodeBlock.cpp: 10 (JSC::CodeBlock::CodeBlock): 11 (JSC::CodeBlock::~CodeBlock): 12 (JSC::CodeBlock::setConstantRegisters): 13 (JSC::CodeBlock::propagateTransitions): 14 (JSC::CodeBlock::finalizeLLIntInlineCaches): 15 (JSC::CodeBlock::jettison): 16 (JSC::CodeBlock::predictedMachineCodeSize): 17 * bytecode/CodeBlock.h: 18 (JSC::CodeBlock::vm const): 19 (JSC::CodeBlock::addConstant): 20 (JSC::CodeBlock::heap const): 21 (JSC::CodeBlock::replaceConstant): 22 * llint/LowLevelInterpreter.asm: 23 * llint/LowLevelInterpreter32_64.asm: 24 * llint/LowLevelInterpreter64.asm: 25 1 26 2018-01-07 Mark Lam <mark.lam@apple.com> 2 27 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r226530 r226556 314 314 , m_numBreakpoints(0) 315 315 , m_ownerExecutable(*other.vm(), this, other.m_ownerExecutable.get()) 316 , m_ vm(other.m_vm)316 , m_poisonedVM(other.m_poisonedVM) 317 317 , m_instructions(other.m_instructions) 318 318 , m_thisRegister(other.m_thisRegister) … … 380 380 , m_numBreakpoints(0) 381 381 , m_ownerExecutable(*vm, this, ownerExecutable) 382 , m_ vm(vm)382 , m_poisonedVM(vm) 383 383 , m_thisRegister(unlinkedCodeBlock->thisRegister()) 384 384 , m_scopeRegister(unlinkedCodeBlock->scopeRegister()) … … 858 858 CodeBlock::~CodeBlock() 859 859 { 860 VM& vm = *m_ vm;860 VM& vm = *m_poisonedVM; 861 861 if (UNLIKELY(vm.m_perBytecodeProfiler)) 862 862 vm.m_perBytecodeProfiler->notifyDestruction(this); … … 915 915 void CodeBlock::setConstantRegisters(const Vector<WriteBarrier<Unknown>>& constants, const Vector<SourceCodeRepresentation>& constantsSourceCodeRepresentation) 916 916 { 917 VM& vm = *m_ vm;917 VM& vm = *m_poisonedVM; 918 918 auto scope = DECLARE_THROW_SCOPE(vm); 919 919 JSGlobalObject* globalObject = m_globalObject.get(); … … 1168 1168 return; 1169 1169 1170 VM& vm = *m_ vm;1170 VM& vm = *m_poisonedVM; 1171 1171 bool allAreMarkedSoFar = true; 1172 1172 … … 1301 1301 void CodeBlock::finalizeLLIntInlineCaches() 1302 1302 { 1303 VM& vm = *m_ vm;1303 VM& vm = *m_poisonedVM; 1304 1304 const Vector<unsigned>& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions(); 1305 1305 for (size_t size = propertyAccessInstructions.size(), i = 0; i < size; ++i) { … … 1961 1961 #endif // ENABLE(DFG_JIT) 1962 1962 1963 VM& vm = *m_ vm;1963 VM& vm = *m_poisonedVM; 1964 1964 DeferGCForAWhile deferGC(*heap()); 1965 1965 … … 2769 2769 size_t CodeBlock::predictedMachineCodeSize() 2770 2770 { 2771 VM* vm = m_ vm.unpoisoned();2772 // This will be called from CodeBlock::CodeBlock before either m_ vmor the2771 VM* vm = m_poisonedVM.unpoisoned(); 2772 // This will be called from CodeBlock::CodeBlock before either m_poisonedVM or the 2773 2773 // instructions have been initialized. It's OK to return 0 because what will really 2774 2774 // matter is the recomputation of this value when the slow path is triggered. -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r226530 r226556 371 371 ScriptExecutable* ownerScriptExecutable() const { return jsCast<ScriptExecutable*>(m_ownerExecutable.get()); } 372 372 373 VM* vm() const { return m_ vm.unpoisoned(); }373 VM* vm() const { return m_poisonedVM.unpoisoned(); } 374 374 375 375 void setThisRegister(VirtualRegister thisRegister) { m_thisRegister = thisRegister; } … … 549 549 unsigned result = m_constantRegisters.size(); 550 550 m_constantRegisters.append(WriteBarrier<Unknown>()); 551 m_constantRegisters.last().set(*m_ vm, this, v);551 m_constantRegisters.last().set(*m_poisonedVM, this, v); 552 552 m_constantsSourceCodeRepresentation.append(SourceCodeRepresentation::Other); 553 553 return result; … … 578 578 const BitVector& bitVector(size_t i) { return m_unlinkedCode->bitVector(i); } 579 579 580 Heap* heap() const { return &m_ vm->heap; }580 Heap* heap() const { return &m_poisonedVM->heap; } 581 581 JSGlobalObject* globalObject() { return m_globalObject.get(); } 582 582 … … 937 937 { 938 938 ASSERT(isConstantRegisterIndex(index) && static_cast<size_t>(index - FirstConstantRegisterIndex) < m_constantRegisters.size()); 939 m_constantRegisters[index - FirstConstantRegisterIndex].set(*m_ vm, this, value);939 m_constantRegisters[index - FirstConstantRegisterIndex].set(*m_poisonedVM, this, value); 940 940 } 941 941 … … 983 983 }; 984 984 WriteBarrier<ExecutableBase> m_ownerExecutable; 985 ConstExprPoisoned<CodeBlockPoison, VM*> m_ vm;985 ConstExprPoisoned<CodeBlockPoison, VM*> m_poisonedVM; 986 986 987 987 PoisonedRefCountedArray<CodeBlockPoison, Instruction> m_instructions; -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
r226530 r226556 205 205 end 206 206 207 if POISON 208 const CodeBlockPoison = constexpr CodeBlock::s_poison 209 end 207 const CodeBlockPoison = constexpr CodeBlock::s_poison 210 208 211 209 # PutByIdFlags data … … 1035 1033 subp cfr, t0, t0 1036 1034 bpa t0, cfr, .needStackCheck 1037 loadp CodeBlock::m_ vm[t1], t21035 loadp CodeBlock::m_poisonedVM[t1], t2 1038 1036 unpoison(CodeBlockPoison, t2) 1039 1037 if C_LOOP … … 1623 1621 traceExecution() 1624 1622 loadp CodeBlock[cfr], t1 1625 loadp CodeBlock::m_ vm[t1], t11623 loadp CodeBlock::m_poisonedVM[t1], t1 1626 1624 unpoison(CodeBlockPoison, t1) 1627 1625 loadb VM::m_traps+VMTraps::m_needTrapHandling[t1], t0 … … 1639 1637 macro acquireShadowChickenPacket(slow) 1640 1638 loadp CodeBlock[cfr], t1 1641 loadp CodeBlock::m_ vm[t1], t11639 loadp CodeBlock::m_poisonedVM[t1], t1 1642 1640 unpoison(CodeBlockPoison, t1) 1643 1641 loadp VM::m_shadowChicken[t1], t2 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r226440 r226556 1 # Copyright (C) 2011-201 7Apple Inc. All rights reserved.1 # Copyright (C) 2011-2018 Apple Inc. All rights reserved. 2 2 # 3 3 # Redistribution and use in source and binary forms, with or without … … 2530 2530 traceExecution() 2531 2531 loadp CodeBlock[cfr], t1 2532 loadp CodeBlock::m_vm[t1], t1 2532 loadp CodeBlock::m_poisonedVM[t1], t1 2533 unpoison(CodeBlockPoison, t1) 2533 2534 # t1 is holding the pointer to the typeProfilerLog. 2534 2535 loadp VM::m_typeProfilerLog[t1], t1 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r226530 r226556 483 483 macro structureIDToStructureWithScratch(structureIDThenStructure, scratch) 484 484 loadp CodeBlock[cfr], scratch 485 loadp CodeBlock::m_ vm[scratch], scratch485 loadp CodeBlock::m_poisonedVM[scratch], scratch 486 486 unpoison(CodeBlockPoison, scratch) 487 487 loadp VM::heap + Heap::m_structureIDTable + StructureIDTable::m_table[scratch], scratch … … 497 497 loadi JSCell::m_structureID[cell], structure 498 498 loadp CodeBlock[cfr], cell 499 loadp CodeBlock::m_ vm[cell], cell499 loadp CodeBlock::m_poisonedVM[cell], cell 500 500 unpoison(CodeBlockPoison, cell) 501 501 loadp VM::heap + Heap::m_structureIDTable + StructureIDTable::m_table[cell], cell … … 2500 2500 traceExecution() 2501 2501 loadp CodeBlock[cfr], t1 2502 loadp CodeBlock::m_ vm[t1], t12502 loadp CodeBlock::m_poisonedVM[t1], t1 2503 2503 unpoison(CodeBlockPoison, t1) 2504 2504 # t1 is holding the pointer to the typeProfilerLog.
Note:
See TracChangeset
for help on using the changeset viewer.