Title: [226686] branches/safari-605-branch/Source/_javascript_Core

Diff

Modified: branches/safari-605-branch/Source/_javascript_Core/ChangeLog (226685 => 226686)


--- branches/safari-605-branch/Source/_javascript_Core/ChangeLog	2018-01-10 04:31:30 UTC (rev 226685)
+++ branches/safari-605-branch/Source/_javascript_Core/ChangeLog	2018-01-10 04:31:33 UTC (rev 226686)
@@ -1,5 +1,34 @@
 2018-01-09  Jason Marcell  <[email protected]>
 
+        Cherry-pick r226556. rdar://problem/36392331
+
+    2018-01-08  Mark Lam  <[email protected]>
+
+            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:
+
+2018-01-09  Jason Marcell  <[email protected]>
+
         Cherry-pick r226530. rdar://problem/36392325
 
     2018-01-07  Mark Lam  <[email protected]>

Modified: branches/safari-605-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp (226685 => 226686)


--- branches/safari-605-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp	2018-01-10 04:31:30 UTC (rev 226685)
+++ branches/safari-605-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp	2018-01-10 04:31:33 UTC (rev 226686)
@@ -313,7 +313,7 @@
     , m_steppingMode(SteppingModeDisabled)
     , m_numBreakpoints(0)
     , m_ownerExecutable(*other.vm(), this, other.m_ownerExecutable.get())
-    , m_vm(other.m_vm)
+    , m_poisonedVM(other.m_poisonedVM)
     , m_instructions(other.m_instructions)
     , m_thisRegister(other.m_thisRegister)
     , m_scopeRegister(other.m_scopeRegister)
@@ -379,7 +379,7 @@
     , m_steppingMode(SteppingModeDisabled)
     , m_numBreakpoints(0)
     , m_ownerExecutable(*vm, this, ownerExecutable)
-    , m_vm(vm)
+    , m_poisonedVM(vm)
     , m_thisRegister(unlinkedCodeBlock->thisRegister())
     , m_scopeRegister(unlinkedCodeBlock->scopeRegister())
     , m_source(WTFMove(sourceProvider))
@@ -857,7 +857,7 @@
 
 CodeBlock::~CodeBlock()
 {
-    VM& vm = *m_vm;
+    VM& vm = *m_poisonedVM;
     if (UNLIKELY(vm.m_perBytecodeProfiler))
         vm.m_perBytecodeProfiler->notifyDestruction(this);
 
@@ -914,7 +914,7 @@
 
 void CodeBlock::setConstantRegisters(const Vector<WriteBarrier<Unknown>>& constants, const Vector<SourceCodeRepresentation>& constantsSourceCodeRepresentation)
 {
-    VM& vm = *m_vm;
+    VM& vm = *m_poisonedVM;
     auto scope = DECLARE_THROW_SCOPE(vm);
     JSGlobalObject* globalObject = m_globalObject.get();
     ExecState* exec = globalObject->globalExec();
@@ -1167,7 +1167,7 @@
     if (m_allTransitionsHaveBeenMarked)
         return;
 
-    VM& vm = *m_vm;
+    VM& vm = *m_poisonedVM;
     bool allAreMarkedSoFar = true;
         
     if (jitType() == JITCode::InterpreterThunk) {
@@ -1300,7 +1300,7 @@
 
 void CodeBlock::finalizeLLIntInlineCaches()
 {
-    VM& vm = *m_vm;
+    VM& vm = *m_poisonedVM;
     const Vector<unsigned>& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions();
     for (size_t size = propertyAccessInstructions.size(), i = 0; i < size; ++i) {
         Instruction* curInstruction = &instructions()[propertyAccessInstructions[i]];
@@ -1960,7 +1960,7 @@
     }
 #endif // ENABLE(DFG_JIT)
 
-    VM& vm = *m_vm;
+    VM& vm = *m_poisonedVM;
     DeferGCForAWhile deferGC(*heap());
     
     // We want to accomplish two things here:
@@ -2768,8 +2768,8 @@
 
 size_t CodeBlock::predictedMachineCodeSize()
 {
-    VM* vm = m_vm.unpoisoned();
-    // This will be called from CodeBlock::CodeBlock before either m_vm or the
+    VM* vm = m_poisonedVM.unpoisoned();
+    // This will be called from CodeBlock::CodeBlock before either m_poisonedVM or the
     // instructions have been initialized. It's OK to return 0 because what will really
     // matter is the recomputation of this value when the slow path is triggered.
     if (!vm)

Modified: branches/safari-605-branch/Source/_javascript_Core/bytecode/CodeBlock.h (226685 => 226686)


--- branches/safari-605-branch/Source/_javascript_Core/bytecode/CodeBlock.h	2018-01-10 04:31:30 UTC (rev 226685)
+++ branches/safari-605-branch/Source/_javascript_Core/bytecode/CodeBlock.h	2018-01-10 04:31:33 UTC (rev 226686)
@@ -370,7 +370,7 @@
     ExecutableBase* ownerExecutable() const { return m_ownerExecutable.get(); }
     ScriptExecutable* ownerScriptExecutable() const { return jsCast<ScriptExecutable*>(m_ownerExecutable.get()); }
 
-    VM* vm() const { return m_vm.unpoisoned(); }
+    VM* vm() const { return m_poisonedVM.unpoisoned(); }
 
     void setThisRegister(VirtualRegister thisRegister) { m_thisRegister = thisRegister; }
     VirtualRegister thisRegister() const { return m_thisRegister; }
@@ -548,7 +548,7 @@
     {
         unsigned result = m_constantRegisters.size();
         m_constantRegisters.append(WriteBarrier<Unknown>());
-        m_constantRegisters.last().set(*m_vm, this, v);
+        m_constantRegisters.last().set(*m_poisonedVM, this, v);
         m_constantsSourceCodeRepresentation.append(SourceCodeRepresentation::Other);
         return result;
     }
@@ -577,7 +577,7 @@
     const Vector<BitVector>& bitVectors() const { return m_unlinkedCode->bitVectors(); }
     const BitVector& bitVector(size_t i) { return m_unlinkedCode->bitVector(i); }
 
-    Heap* heap() const { return &m_vm->heap; }
+    Heap* heap() const { return &m_poisonedVM->heap; }
     JSGlobalObject* globalObject() { return m_globalObject.get(); }
 
     JSGlobalObject* globalObjectFor(CodeOrigin);
@@ -936,7 +936,7 @@
     void replaceConstant(int index, JSValue value)
     {
         ASSERT(isConstantRegisterIndex(index) && static_cast<size_t>(index - FirstConstantRegisterIndex) < m_constantRegisters.size());
-        m_constantRegisters[index - FirstConstantRegisterIndex].set(*m_vm, this, value);
+        m_constantRegisters[index - FirstConstantRegisterIndex].set(*m_poisonedVM, this, value);
     }
 
     bool shouldVisitStrongly(const ConcurrentJSLocker&);
@@ -982,7 +982,7 @@
         };
     };
     WriteBarrier<ExecutableBase> m_ownerExecutable;
-    ConstExprPoisoned<CodeBlockPoison, VM*> m_vm;
+    ConstExprPoisoned<CodeBlockPoison, VM*> m_poisonedVM;
 
     PoisonedRefCountedArray<CodeBlockPoison, Instruction> m_instructions;
     VirtualRegister m_thisRegister;

Modified: branches/safari-605-branch/Source/_javascript_Core/llint/LowLevelInterpreter.asm (226685 => 226686)


--- branches/safari-605-branch/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2018-01-10 04:31:30 UTC (rev 226685)
+++ branches/safari-605-branch/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2018-01-10 04:31:33 UTC (rev 226686)
@@ -204,9 +204,7 @@
     const LowestTag = DeletedValueTag
 end
 
-if POISON
-    const CodeBlockPoison = constexpr CodeBlock::s_poison
-end
+const CodeBlockPoison = constexpr CodeBlock::s_poison
 
 # PutByIdFlags data
 const PutByIdPrimaryTypeMask = constexpr PutByIdPrimaryTypeMask
@@ -1034,7 +1032,7 @@
     getFrameRegisterSizeForCodeBlock(t1, t0)
     subp cfr, t0, t0
     bpa t0, cfr, .needStackCheck
-    loadp CodeBlock::m_vm[t1], t2
+    loadp CodeBlock::m_poisonedVM[t1], t2
     unpoison(CodeBlockPoison, t2)
     if C_LOOP
         bpbeq VM::m_cloopStackLimit[t2], t0, .stackHeightOK
@@ -1622,7 +1620,7 @@
 _llint_op_check_traps:
     traceExecution()
     loadp CodeBlock[cfr], t1
-    loadp CodeBlock::m_vm[t1], t1
+    loadp CodeBlock::m_poisonedVM[t1], t1
     unpoison(CodeBlockPoison, t1)
     loadb VM::m_traps+VMTraps::m_needTrapHandling[t1], t0
     btpnz t0, .handleTraps
@@ -1638,7 +1636,7 @@
 # Returns the packet pointer in t0.
 macro acquireShadowChickenPacket(slow)
     loadp CodeBlock[cfr], t1
-    loadp CodeBlock::m_vm[t1], t1
+    loadp CodeBlock::m_poisonedVM[t1], t1
     unpoison(CodeBlockPoison, t1)
     loadp VM::m_shadowChicken[t1], t2
     loadp ShadowChicken::m_logCursor[t2], t0

Modified: branches/safari-605-branch/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (226685 => 226686)


--- branches/safari-605-branch/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm	2018-01-10 04:31:30 UTC (rev 226685)
+++ branches/safari-605-branch/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm	2018-01-10 04:31:33 UTC (rev 226686)
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2017 Apple Inc. All rights reserved.
+# Copyright (C) 2011-2018 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -2529,7 +2529,8 @@
 _llint_op_profile_type:
     traceExecution()
     loadp CodeBlock[cfr], t1
-    loadp CodeBlock::m_vm[t1], t1
+    loadp CodeBlock::m_poisonedVM[t1], t1
+    unpoison(CodeBlockPoison, t1)
     # t1 is holding the pointer to the typeProfilerLog.
     loadp VM::m_typeProfilerLog[t1], t1
 

Modified: branches/safari-605-branch/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (226685 => 226686)


--- branches/safari-605-branch/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2018-01-10 04:31:30 UTC (rev 226685)
+++ branches/safari-605-branch/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2018-01-10 04:31:33 UTC (rev 226686)
@@ -482,7 +482,7 @@
 
 macro structureIDToStructureWithScratch(structureIDThenStructure, scratch)
     loadp CodeBlock[cfr], scratch
-    loadp CodeBlock::m_vm[scratch], scratch
+    loadp CodeBlock::m_poisonedVM[scratch], scratch
     unpoison(CodeBlockPoison, scratch)
     loadp VM::heap + Heap::m_structureIDTable + StructureIDTable::m_table[scratch], scratch
     loadp [scratch, structureIDThenStructure, 8], structureIDThenStructure
@@ -496,7 +496,7 @@
 macro loadStructureAndClobberFirstArg(cell, structure)
     loadi JSCell::m_structureID[cell], structure
     loadp CodeBlock[cfr], cell
-    loadp CodeBlock::m_vm[cell], cell
+    loadp CodeBlock::m_poisonedVM[cell], cell
     unpoison(CodeBlockPoison, cell)
     loadp VM::heap + Heap::m_structureIDTable + StructureIDTable::m_table[cell], cell
     loadp [cell, structure, 8], structure
@@ -2499,7 +2499,7 @@
 _llint_op_profile_type:
     traceExecution()
     loadp CodeBlock[cfr], t1
-    loadp CodeBlock::m_vm[t1], t1
+    loadp CodeBlock::m_poisonedVM[t1], t1
     unpoison(CodeBlockPoison, t1)
     # t1 is holding the pointer to the typeProfilerLog.
     loadp VM::m_typeProfilerLog[t1], t1
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to