Changeset 226556 in webkit


Ignore:
Timestamp:
Jan 8, 2018, 2:59:10 PM (7 years ago)
Author:
mark.lam@apple.com
Message:

Rename CodeBlock::m_vm to CodeBlock::m_poisonedVM.
https://bugs.webkit.org/show_bug.cgi?id=181403
<rdar://problem/36359789>

Rubber-stamped by JF Bastien.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::~CodeBlock):
(JSC::CodeBlock::setConstantRegisters):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::predictedMachineCodeSize):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::vm const):
(JSC::CodeBlock::addConstant):
(JSC::CodeBlock::heap const):
(JSC::CodeBlock::replaceConstant):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
Location:
trunk/Source/JavaScriptCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r226530 r226556  
     12018-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
    1262018-01-07  Mark Lam  <mark.lam@apple.com>
    227
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r226530 r226556  
    314314    , m_numBreakpoints(0)
    315315    , m_ownerExecutable(*other.vm(), this, other.m_ownerExecutable.get())
    316     , m_vm(other.m_vm)
     316    , m_poisonedVM(other.m_poisonedVM)
    317317    , m_instructions(other.m_instructions)
    318318    , m_thisRegister(other.m_thisRegister)
     
    380380    , m_numBreakpoints(0)
    381381    , m_ownerExecutable(*vm, this, ownerExecutable)
    382     , m_vm(vm)
     382    , m_poisonedVM(vm)
    383383    , m_thisRegister(unlinkedCodeBlock->thisRegister())
    384384    , m_scopeRegister(unlinkedCodeBlock->scopeRegister())
     
    858858CodeBlock::~CodeBlock()
    859859{
    860     VM& vm = *m_vm;
     860    VM& vm = *m_poisonedVM;
    861861    if (UNLIKELY(vm.m_perBytecodeProfiler))
    862862        vm.m_perBytecodeProfiler->notifyDestruction(this);
     
    915915void CodeBlock::setConstantRegisters(const Vector<WriteBarrier<Unknown>>& constants, const Vector<SourceCodeRepresentation>& constantsSourceCodeRepresentation)
    916916{
    917     VM& vm = *m_vm;
     917    VM& vm = *m_poisonedVM;
    918918    auto scope = DECLARE_THROW_SCOPE(vm);
    919919    JSGlobalObject* globalObject = m_globalObject.get();
     
    11681168        return;
    11691169
    1170     VM& vm = *m_vm;
     1170    VM& vm = *m_poisonedVM;
    11711171    bool allAreMarkedSoFar = true;
    11721172       
     
    13011301void CodeBlock::finalizeLLIntInlineCaches()
    13021302{
    1303     VM& vm = *m_vm;
     1303    VM& vm = *m_poisonedVM;
    13041304    const Vector<unsigned>& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions();
    13051305    for (size_t size = propertyAccessInstructions.size(), i = 0; i < size; ++i) {
     
    19611961#endif // ENABLE(DFG_JIT)
    19621962
    1963     VM& vm = *m_vm;
     1963    VM& vm = *m_poisonedVM;
    19641964    DeferGCForAWhile deferGC(*heap());
    19651965   
     
    27692769size_t CodeBlock::predictedMachineCodeSize()
    27702770{
    2771     VM* vm = m_vm.unpoisoned();
    2772     // This will be called from CodeBlock::CodeBlock before either m_vm or the
     2771    VM* vm = m_poisonedVM.unpoisoned();
     2772    // This will be called from CodeBlock::CodeBlock before either m_poisonedVM or the
    27732773    // instructions have been initialized. It's OK to return 0 because what will really
    27742774    // matter is the recomputation of this value when the slow path is triggered.
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r226530 r226556  
    371371    ScriptExecutable* ownerScriptExecutable() const { return jsCast<ScriptExecutable*>(m_ownerExecutable.get()); }
    372372
    373     VM* vm() const { return m_vm.unpoisoned(); }
     373    VM* vm() const { return m_poisonedVM.unpoisoned(); }
    374374
    375375    void setThisRegister(VirtualRegister thisRegister) { m_thisRegister = thisRegister; }
     
    549549        unsigned result = m_constantRegisters.size();
    550550        m_constantRegisters.append(WriteBarrier<Unknown>());
    551         m_constantRegisters.last().set(*m_vm, this, v);
     551        m_constantRegisters.last().set(*m_poisonedVM, this, v);
    552552        m_constantsSourceCodeRepresentation.append(SourceCodeRepresentation::Other);
    553553        return result;
     
    578578    const BitVector& bitVector(size_t i) { return m_unlinkedCode->bitVector(i); }
    579579
    580     Heap* heap() const { return &m_vm->heap; }
     580    Heap* heap() const { return &m_poisonedVM->heap; }
    581581    JSGlobalObject* globalObject() { return m_globalObject.get(); }
    582582
     
    937937    {
    938938        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);
    940940    }
    941941
     
    983983    };
    984984    WriteBarrier<ExecutableBase> m_ownerExecutable;
    985     ConstExprPoisoned<CodeBlockPoison, VM*> m_vm;
     985    ConstExprPoisoned<CodeBlockPoison, VM*> m_poisonedVM;
    986986
    987987    PoisonedRefCountedArray<CodeBlockPoison, Instruction> m_instructions;
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm

    r226530 r226556  
    205205end
    206206
    207 if POISON
    208     const CodeBlockPoison = constexpr CodeBlock::s_poison
    209 end
     207const CodeBlockPoison = constexpr CodeBlock::s_poison
    210208
    211209# PutByIdFlags data
     
    10351033    subp cfr, t0, t0
    10361034    bpa t0, cfr, .needStackCheck
    1037     loadp CodeBlock::m_vm[t1], t2
     1035    loadp CodeBlock::m_poisonedVM[t1], t2
    10381036    unpoison(CodeBlockPoison, t2)
    10391037    if C_LOOP
     
    16231621    traceExecution()
    16241622    loadp CodeBlock[cfr], t1
    1625     loadp CodeBlock::m_vm[t1], t1
     1623    loadp CodeBlock::m_poisonedVM[t1], t1
    16261624    unpoison(CodeBlockPoison, t1)
    16271625    loadb VM::m_traps+VMTraps::m_needTrapHandling[t1], t0
     
    16391637macro acquireShadowChickenPacket(slow)
    16401638    loadp CodeBlock[cfr], t1
    1641     loadp CodeBlock::m_vm[t1], t1
     1639    loadp CodeBlock::m_poisonedVM[t1], t1
    16421640    unpoison(CodeBlockPoison, t1)
    16431641    loadp VM::m_shadowChicken[t1], t2
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

    r226440 r226556  
    1 # Copyright (C) 2011-2017 Apple Inc. All rights reserved.
     1# Copyright (C) 2011-2018 Apple Inc. All rights reserved.
    22#
    33# Redistribution and use in source and binary forms, with or without
     
    25302530    traceExecution()
    25312531    loadp CodeBlock[cfr], t1
    2532     loadp CodeBlock::m_vm[t1], t1
     2532    loadp CodeBlock::m_poisonedVM[t1], t1
     2533    unpoison(CodeBlockPoison, t1)
    25332534    # t1 is holding the pointer to the typeProfilerLog.
    25342535    loadp VM::m_typeProfilerLog[t1], t1
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm

    r226530 r226556  
    483483macro structureIDToStructureWithScratch(structureIDThenStructure, scratch)
    484484    loadp CodeBlock[cfr], scratch
    485     loadp CodeBlock::m_vm[scratch], scratch
     485    loadp CodeBlock::m_poisonedVM[scratch], scratch
    486486    unpoison(CodeBlockPoison, scratch)
    487487    loadp VM::heap + Heap::m_structureIDTable + StructureIDTable::m_table[scratch], scratch
     
    497497    loadi JSCell::m_structureID[cell], structure
    498498    loadp CodeBlock[cfr], cell
    499     loadp CodeBlock::m_vm[cell], cell
     499    loadp CodeBlock::m_poisonedVM[cell], cell
    500500    unpoison(CodeBlockPoison, cell)
    501501    loadp VM::heap + Heap::m_structureIDTable + StructureIDTable::m_table[cell], cell
     
    25002500    traceExecution()
    25012501    loadp CodeBlock[cfr], t1
    2502     loadp CodeBlock::m_vm[t1], t1
     2502    loadp CodeBlock::m_poisonedVM[t1], t1
    25032503    unpoison(CodeBlockPoison, t1)
    25042504    # t1 is holding the pointer to the typeProfilerLog.
Note: See TracChangeset for help on using the changeset viewer.