Title: [160468] branches/jsCStack/Source/_javascript_Core
Revision
160468
Author
[email protected]
Date
2013-12-11 17:57:43 -0800 (Wed, 11 Dec 2013)

Log Message

CStack Branch: enable use of DFG for simple _javascript_
https://bugs.webkit.org/show_bug.cgi?id=125599

Not yet reviewed.

Added code to set up the stack pointer on entry and for call for the DFG.  Changed the
SpeculativeJIT::calleeFrame*() helpers to use the stack pointer instead of the call frame
register to build the callee frame relative to the stack.

Disabled JSStack::sanitizeStack().  Removed some calls to checkStackPointerAlignment() used
for earlier debugging.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::frameRegisterCount):
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileEntry):
(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):
* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::calleeFrameOffset):
(JSC::DFG::SpeculativeJIT::calleeFrameSlot):
(JSC::DFG::SpeculativeJIT::calleeArgumentSlot):
(JSC::DFG::SpeculativeJIT::calleeFrameTagSlot):
(JSC::DFG::SpeculativeJIT::calleeFramePayloadSlot):
(JSC::DFG::SpeculativeJIT::calleeArgumentTagSlot):
(JSC::DFG::SpeculativeJIT::calleeArgumentPayloadSlot):
(JSC::DFG::SpeculativeJIT::calleeFrameCallerFrame):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):
* ftl/FTLThunks.cpp:
(JSC::FTL::osrExitGenerationThunkGenerator):
(JSC::FTL::slowPathCallThunkGenerator):
* interpreter/JSStack.cpp:
(JSC::JSStack::sanitizeStack):
* interpreter/JSStack.h:
* interpreter/ProtoCallFrame.cpp:
(JSC::ProtoCallFrame::init):
* jit/JIT.cpp:
(JSC::JIT::emitEnterOptimizationCheck):
(JSC::JIT::privateCompile):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_ret):
(JSC::JIT::emit_op_enter):
(JSC::JIT::emitSlow_op_loop_hint):
* jit/Repatch.cpp:
(JSC::linkClosureCall):
* jit/ThunkGenerators.cpp:
(JSC::slowPathFor):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:

Modified Paths

Diff

Modified: branches/jsCStack/Source/_javascript_Core/ChangeLog (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/ChangeLog	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/ChangeLog	2013-12-12 01:57:43 UTC (rev 160468)
@@ -1,3 +1,60 @@
+2013-12-11  Michael Saboff  <[email protected]>
+
+        CStack Branch: enable use of DFG for simple _javascript_
+        https://bugs.webkit.org/show_bug.cgi?id=125599
+
+        Not yet reviewed.
+
+        Added code to set up the stack pointer on entry and for call for the DFG.  Changed the 
+        SpeculativeJIT::calleeFrame*() helpers to use the stack pointer instead of the call frame
+        register to build the callee frame relative to the stack.
+
+        Disabled JSStack::sanitizeStack().  Removed some calls to checkStackPointerAlignment() used
+        for earlier debugging.
+
+        * dfg/DFGGraph.cpp:
+        (JSC::DFG::Graph::frameRegisterCount):
+        * dfg/DFGJITCompiler.cpp:
+        (JSC::DFG::JITCompiler::compileEntry):
+        (JSC::DFG::JITCompiler::compile):
+        (JSC::DFG::JITCompiler::compileFunction):
+        * dfg/DFGOSREntry.cpp:
+        (JSC::DFG::prepareOSREntry):
+        * dfg/DFGSpeculativeJIT.h:
+        (JSC::DFG::SpeculativeJIT::calleeFrameOffset):
+        (JSC::DFG::SpeculativeJIT::calleeFrameSlot):
+        (JSC::DFG::SpeculativeJIT::calleeArgumentSlot):
+        (JSC::DFG::SpeculativeJIT::calleeFrameTagSlot):
+        (JSC::DFG::SpeculativeJIT::calleeFramePayloadSlot):
+        (JSC::DFG::SpeculativeJIT::calleeArgumentTagSlot):
+        (JSC::DFG::SpeculativeJIT::calleeArgumentPayloadSlot):
+        (JSC::DFG::SpeculativeJIT::calleeFrameCallerFrame):
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::emitCall):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::emitCall):
+        * ftl/FTLThunks.cpp:
+        (JSC::FTL::osrExitGenerationThunkGenerator):
+        (JSC::FTL::slowPathCallThunkGenerator):
+        * interpreter/JSStack.cpp:
+        (JSC::JSStack::sanitizeStack):
+        * interpreter/JSStack.h:
+        * interpreter/ProtoCallFrame.cpp:
+        (JSC::ProtoCallFrame::init):
+        * jit/JIT.cpp:
+        (JSC::JIT::emitEnterOptimizationCheck):
+        (JSC::JIT::privateCompile):
+        * jit/JITOpcodes.cpp:
+        (JSC::JIT::emit_op_ret):
+        (JSC::JIT::emit_op_enter):
+        (JSC::JIT::emitSlow_op_loop_hint):
+        * jit/Repatch.cpp:
+        (JSC::linkClosureCall):
+        * jit/ThunkGenerators.cpp:
+        (JSC::slowPathFor):
+        * llint/LowLevelInterpreter.asm:
+        * llint/LowLevelInterpreter64.asm:
+
 2013-12-09  Michael Saboff  <[email protected]>
 
         CStack Branch: ctiNativeCallFallback and friends should renamed ...NativeTailCall

Modified: branches/jsCStack/Source/_javascript_Core/dfg/DFGGraph.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/dfg/DFGGraph.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/dfg/DFGGraph.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -703,7 +703,9 @@
 
 unsigned Graph::frameRegisterCount()
 {
-    return m_nextMachineLocal + m_parameterSlots;
+    unsigned result = m_nextMachineLocal + m_parameterSlots;
+    result += result & 1; // Align the register count
+    return result;
 }
 
 unsigned Graph::requiredRegisterCountForExit()

Modified: branches/jsCStack/Source/_javascript_Core/dfg/DFGJITCompiler.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/dfg/DFGJITCompiler.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -92,8 +92,7 @@
 void JITCompiler::compileEntry()
 {
     // This code currently matches the old JIT. In the function header we need to
-    // pop the return address (since we do not allow any recursion on the machine
-    // stack), and perform a fast stack check.
+    // save return address and call frame via the prologue and perform a fast stack check.
     // FIXME: https://bugs.webkit.org/show_bug.cgi?id=56292
     // We'll need to convert the remaining cti_ style calls (specifically the stack
     // check) which will be dependent on stack layout. (We'd need to account for this in
@@ -277,6 +276,9 @@
     setStartOfCode();
     compileEntry();
     m_speculative = adoptPtr(new SpeculativeJIT(*this));
+    checkStackPointerAlignment();
+    addPtr(TrustedImm32(-(m_graph.frameRegisterCount() - JSStack::CallerFrameAndPCSize) * sizeof(Register)), GPRInfo::callFrameRegister, stackPointerRegister);
+    checkStackPointerAlignment();
     compileBody();
     setEndOfMainPath();
 
@@ -329,7 +331,12 @@
     // Return here after stack check.
     Label fromStackCheck = label();
 
+    checkStackPointerAlignment();
 
+    // Move the stack pointer down to accommodate locals
+    addPtr(TrustedImm32(-(m_graph.frameRegisterCount() - JSStack::CallerFrameAndPCSize) * sizeof(Register)), GPRInfo::callFrameRegister, stackPointerRegister);
+    checkStackPointerAlignment();
+
     // === Function body code generation ===
     m_speculative = adoptPtr(new SpeculativeJIT(*this));
     compileBody();

Modified: branches/jsCStack/Source/_javascript_Core/dfg/DFGOSREntry.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/dfg/DFGOSREntry.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/dfg/DFGOSREntry.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -213,12 +213,14 @@
     
     // 5) Clear those parts of the call frame that the DFG ain't using. This helps GC on some
     //    programs by eliminating some stale pointer pathologies.
-    
+
+#if 0 // FIXME: CStack - This needs to be verified before being enabled
     for (unsigned i = frameSize; i--;) {
         if (entry->m_machineStackUsed.get(i))
             continue;
         registers[virtualRegisterForLocal(i).offset()] = JSValue::encode(JSValue());
     }
+#endif
     
     // 6) Fix the call frame.
     

Modified: branches/jsCStack/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h	2013-12-12 01:57:43 UTC (rev 160468)
@@ -727,44 +727,45 @@
     
     ptrdiff_t calleeFrameOffset(int numArgs)
     {
-        return virtualRegisterForLocal(m_jit.graph().m_nextMachineLocal + JSStack::CallFrameHeaderSize + numArgs).offset() * sizeof(Register);
+        return virtualRegisterForLocal(m_jit.graph().m_nextMachineLocal - 1 + JSStack::CallFrameHeaderSize + numArgs).offset() * sizeof(Register);
     }
     
     // Access to our fixed callee CallFrame.
-    MacroAssembler::Address calleeFrameSlot(int numArgs, int slot)
+    MacroAssembler::Address calleeFrameSlot(int slot)
     {
-        return MacroAssembler::Address(GPRInfo::callFrameRegister, calleeFrameOffset(numArgs) + sizeof(Register) * slot);
+        ASSERT(slot >= JSStack::CallerFrameAndPCSize);
+        return MacroAssembler::Address(MacroAssembler::stackPointerRegister, sizeof(Register) * (slot - JSStack::CallerFrameAndPCSize));
     }
 
     // Access to our fixed callee CallFrame.
-    MacroAssembler::Address calleeArgumentSlot(int numArgs, int argument)
+    MacroAssembler::Address calleeArgumentSlot(int argument)
     {
-        return calleeFrameSlot(numArgs, virtualRegisterForArgument(argument).offset());
+        return calleeFrameSlot(virtualRegisterForArgument(argument).offset());
     }
 
-    MacroAssembler::Address calleeFrameTagSlot(int numArgs, int slot)
+    MacroAssembler::Address calleeFrameTagSlot(int slot)
     {
-        return calleeFrameSlot(numArgs, slot).withOffset(OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag));
+        return calleeFrameSlot(slot).withOffset(OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag));
     }
 
-    MacroAssembler::Address calleeFramePayloadSlot(int numArgs, int slot)
+    MacroAssembler::Address calleeFramePayloadSlot(int slot)
     {
-        return calleeFrameSlot(numArgs, slot).withOffset(OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload));
+        return calleeFrameSlot(slot).withOffset(OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload));
     }
 
-    MacroAssembler::Address calleeArgumentTagSlot(int numArgs, int argument)
+    MacroAssembler::Address calleeArgumentTagSlot(int argument)
     {
-        return calleeArgumentSlot(numArgs, argument).withOffset(OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag));
+        return calleeArgumentSlot(argument).withOffset(OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag));
     }
 
-    MacroAssembler::Address calleeArgumentPayloadSlot(int numArgs, int argument)
+    MacroAssembler::Address calleeArgumentPayloadSlot(int argument)
     {
-        return calleeArgumentSlot(numArgs, argument).withOffset(OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload));
+        return calleeArgumentSlot(argument).withOffset(OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload));
     }
 
-    MacroAssembler::Address calleeFrameCallerFrame(int numArgs)
+    MacroAssembler::Address calleeFrameCallerFrame()
     {
-        return calleeFrameSlot(numArgs, 0).withOffset(CallFrame::callerFrameOffset());
+        return calleeFrameSlot(0).withOffset(CallFrame::callerFrameOffset());
     }
 
     void emitCall(Node*);

Modified: branches/jsCStack/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -659,10 +659,10 @@
     
     int numArgs = numPassedArgs + dummyThisArgument;
 
-    m_jit.store32(MacroAssembler::TrustedImm32(numArgs), calleeFramePayloadSlot(numArgs, JSStack::ArgumentCount));
-    m_jit.storePtr(GPRInfo::callFrameRegister, calleeFrameCallerFrame(numArgs));
-    m_jit.store32(calleePayloadGPR, calleeFramePayloadSlot(numArgs, JSStack::Callee));
-    m_jit.store32(calleeTagGPR, calleeFrameTagSlot(numArgs, JSStack::Callee));
+    m_jit.store32(MacroAssembler::TrustedImm32(numArgs), calleeFramePayloadSlot(JSStack::ArgumentCount));
+    m_jit.storePtr(GPRInfo::callFrameRegister, calleeFrameCallerFrame());
+    m_jit.store32(calleePayloadGPR, calleeFramePayloadSlot(JSStack::Callee));
+    m_jit.store32(calleeTagGPR, calleeFrameTagSlot(JSStack::Callee));
 
     for (int i = 0; i < numPassedArgs; i++) {
         Edge argEdge = m_jit.graph().m_varArgChildren[node->firstChild() + 1 + i];
@@ -671,8 +671,8 @@
         GPRReg argPayloadGPR = arg.payloadGPR();
         use(argEdge);
 
-        m_jit.store32(argTagGPR, calleeArgumentTagSlot(numArgs, i + dummyThisArgument));
-        m_jit.store32(argPayloadGPR, calleeArgumentPayloadSlot(numArgs, i + dummyThisArgument));
+        m_jit.store32(argTagGPR, calleeArgumentTagSlot(i + dummyThisArgument));
+        m_jit.store32(argPayloadGPR, calleeArgumentPayloadSlot(i + dummyThisArgument));
     }
 
     flushRegisters();

Modified: branches/jsCStack/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -687,9 +687,8 @@
     
     int numArgs = numPassedArgs + dummyThisArgument;
     
-    m_jit.store32(MacroAssembler::TrustedImm32(numArgs), calleeFramePayloadSlot(numArgs, JSStack::ArgumentCount));
-    m_jit.store64(GPRInfo::callFrameRegister, calleeFrameCallerFrame(numArgs));
-    m_jit.store64(calleeGPR, calleeFrameSlot(numArgs, JSStack::Callee));
+    m_jit.store32(MacroAssembler::TrustedImm32(numArgs), calleeFramePayloadSlot(JSStack::ArgumentCount));
+    m_jit.store64(calleeGPR, calleeFrameSlot(JSStack::Callee));
     
     for (int i = 0; i < numPassedArgs; i++) {
         Edge argEdge = m_jit.graph().m_varArgChildren[node->firstChild() + 1 + i];
@@ -697,7 +696,7 @@
         GPRReg argGPR = arg.gpr();
         use(argEdge);
         
-        m_jit.store64(argGPR, calleeArgumentSlot(numArgs, i + dummyThisArgument));
+        m_jit.store64(argGPR, calleeArgumentSlot(i + dummyThisArgument));
     }
 
     flushRegisters();
@@ -710,24 +709,29 @@
 
     m_jit.emitStoreCodeOrigin(node->codeOrigin);
     
-    m_jit.addPtr(TrustedImm32(calleeFrameOffset(numArgs)), GPRInfo::callFrameRegister);
-    
     slowPath.append(m_jit.branchPtrWithPatch(MacroAssembler::NotEqual, calleeGPR, targetToCheck, MacroAssembler::TrustedImmPtr(0)));
 
     m_jit.loadPtr(MacroAssembler::Address(calleeGPR, OBJECT_OFFSETOF(JSFunction, m_scope)), resultGPR);
-    m_jit.store64(resultGPR, MacroAssembler::Address(GPRInfo::callFrameRegister, static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ScopeChain));
+    m_jit.store64(resultGPR, calleeFrameSlot(JSStack::ScopeChain));
 
+    // FIXME: CStack - remove the add/sub 16 before and after call.
+    m_jit.addPtr(TrustedImm32(16), MacroAssembler::stackPointerRegister);
+    
     JITCompiler::Call fastCall = m_jit.nearCall();
-    
+
     JITCompiler::Jump done = m_jit.jump();
     
     slowPath.link(&m_jit);
     
+    m_jit.addPtr(TrustedImm32(16), MacroAssembler::stackPointerRegister);
+    
     m_jit.move(calleeGPR, GPRInfo::regT0); // Callee needs to be in regT0
     JITCompiler::Call slowCall = m_jit.nearCall();
     
     done.link(&m_jit);
     
+    m_jit.addPtr(TrustedImm32(-16), MacroAssembler::stackPointerRegister);
+    
     m_jit.move(GPRInfo::returnValueGPR, resultGPR);
     
     jsValueResult(resultGPR, m_currentNode, DataFormatJS, UseChildrenCalledExplicitly);

Modified: branches/jsCStack/Source/_javascript_Core/ftl/FTLThunks.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/ftl/FTLThunks.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/ftl/FTLThunks.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -74,7 +74,7 @@
     // Prepare for tail call.
     jit.pop(GPRInfo::regT1);
     jit.pop(GPRInfo::regT1);
-    // &&&&& FIXME: Need to address the right way to adjust CFR and SP
+    // FIXME: CStack - Need to address the right way to adjust CFR and SP
     jit.pop(MacroAssembler::framePointerRegister);
     
     // At this point we're sitting on the return address - so if we did a jump right now, the
@@ -82,7 +82,7 @@
     // restore all registers.
     
     jit.restoreReturnAddressBeforeReturn(GPRInfo::regT0);
-    // &&&& Through here
+    // FIXME: CStack - Through here
 
     restoreAllRegisters(jit, buffer);
 
@@ -121,13 +121,13 @@
         currentOffset += sizeof(double);
     }
     
-    // &&&& FIXME: Need to do soemething like jit.emitFunctionPrologue();
+    // FIXME: CStack - Need to do soemething like jit.emitFunctionPrologue();
     jit.preserveReturnAddressAfterCall(GPRInfo::nonArgGPR0);
     jit.storePtr(GPRInfo::nonArgGPR0, AssemblyHelpers::Address(MacroAssembler::stackPointerRegister, key.offset()));
     
     JITCompiler::Call call = jit.call();
 
-    // &&&& FIXME: Need to do something like jit.emitFunctionEpilogue();
+    // FIXME: CStack - Need to do something like jit.emitFunctionEpilogue();
     jit.loadPtr(AssemblyHelpers::Address(MacroAssembler::stackPointerRegister, key.offset()), GPRInfo::nonPreservedNonReturnGPR);
     jit.restoreReturnAddressBeforeReturn(GPRInfo::nonPreservedNonReturnGPR);
     

Modified: branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -105,6 +105,7 @@
 
 void JSStack::sanitizeStack()
 {
+#if 0 // FIXME: CStack - To be addressed later
     ASSERT(getTopOfStack() <= getBaseOfStack());
     
     if (m_lastStackTop < getTopOfStack()) {
@@ -114,6 +115,7 @@
     }
     
     m_lastStackTop = getTopOfStack();
+#endif
 }
 
 void JSStack::releaseExcessCapacity()

Modified: branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/JSStack.h	2013-12-12 01:57:43 UTC (rev 160468)
@@ -61,6 +61,7 @@
         WTF_MAKE_NONCOPYABLE(JSStack);
     public:
         enum CallFrameHeaderEntry {
+            CallerFrameAndPCSize = 0,
             CodeBlock = sizeof(CallerFrameAndPC) / sizeof(Register),
             ScopeChain,
             Callee,

Modified: branches/jsCStack/Source/_javascript_Core/interpreter/ProtoCallFrame.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/interpreter/ProtoCallFrame.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/interpreter/ProtoCallFrame.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -43,7 +43,7 @@
         if (paddedArgsCount < numParameters)
             paddedArgsCount = numParameters;
     }
-    // &&&& FIXME: Align the combination of sentinel frame + callee frame
+    // FIXME: CStack - Align the combination of sentinel frame + callee frame
     // Maybe this should be in callToJavaScript.
     if (!(paddedArgsCount & 1))
         paddedArgsCount++;

Modified: branches/jsCStack/Source/_javascript_Core/jit/JIT.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/jit/JIT.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/jit/JIT.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -99,9 +99,11 @@
     skipOptimize.append(branchAdd32(Signed, TrustedImm32(Options::executionCounterIncrementForEntry()), AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter())));
     ASSERT(!m_bytecodeOffset);
     callOperation(operationOptimize, m_bytecodeOffset);
+#if 0 // FIXME: CStack - need to fix OSR entry
     skipOptimize.append(branchTestPtr(Zero, returnValueGPR));
     jump(returnValueGPR);
     skipOptimize.link(this);
+#endif
 }
 #endif
 
@@ -559,7 +561,7 @@
     if (m_codeBlock->codeType() == FunctionCode) {
         stackCheck.link(this);
         m_bytecodeOffset = 0;
-        // &&&& This may need to have some stack space allocated to make the call
+        // FIXME: CStack - This may need to have some stack space allocated to make the call
         callOperationWithCallFrameRollbackOnException(operationStackCheck, m_codeBlock);
 #ifndef NDEBUG
         m_bytecodeOffset = (unsigned)-1; // Reset this, in order to guard its use with ASSERTs.

Modified: branches/jsCStack/Source/_javascript_Core/jit/JITOpcodes.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/jit/JITOpcodes.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/jit/JITOpcodes.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -262,7 +262,7 @@
     // Return the result in %eax.
     emitGetVirtualRegister(currentInstruction[1].u.operand, returnValueGPR);
 
-    checkStackPointerAlignment(); // &&&&
+    checkStackPointerAlignment();
     emitFunctionEpilogue();
     ret();
 }
@@ -778,7 +778,6 @@
 
 void JIT::emit_op_enter(Instruction*)
 {
-    checkStackPointerAlignment(); // &&&&
     emitEnterOptimizationCheck();
     
     // Even though CTI doesn't use them, we initialize our constant
@@ -1123,9 +1122,11 @@
         linkSlowCase(iter);
         
         callOperation(operationOptimize, m_bytecodeOffset);
+#if 0 // FIXME: CStack - need to fix OSR entry
         Jump noOptimizedEntry = branchTestPtr(Zero, returnValueGPR);
         jump(returnValueGPR);
         noOptimizedEntry.link(this);
+#endif
 
         emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint));
     }

Modified: branches/jsCStack/Source/_javascript_Core/jit/Repatch.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/jit/Repatch.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/jit/Repatch.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -1385,7 +1385,7 @@
 #endif
     stubJit.move(CCallHelpers::TrustedImmPtr(callLinkInfo.callReturnLocation.executableAddress()), GPRInfo::nonArgGPR2);
     
-    // &&&& FIXME: Think the following instruction should be a poke
+    // FIXME: CStack - Think the restoreReturnAddressBeforeReturn() instruction should be a poke
     stubJit.breakpoint();
     stubJit.restoreReturnAddressBeforeReturn(GPRInfo::nonArgGPR2);
     AssemblyHelpers::Jump slow = stubJit.jump();

Modified: branches/jsCStack/Source/_javascript_Core/jit/ThunkGenerators.cpp (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/jit/ThunkGenerators.cpp	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/jit/ThunkGenerators.cpp	2013-12-12 01:57:43 UTC (rev 160468)
@@ -94,7 +94,7 @@
     // 2) Host call return value returner thingy.
     // 3) The function to call.
     emitPointerValidation(jit, GPRInfo::returnValueGPR);
-    jit.emitFunctionEpilogue();
+    jit.pop(GPRInfo::callFrameRegister);
     jit.jump(GPRInfo::returnValueGPR);
 }
 

Modified: branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter.asm (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2013-12-12 01:57:43 UTC (rev 160468)
@@ -354,8 +354,9 @@
         baddis 5, CodeBlock::m_llintExecuteCounter + ExecutionCounter::m_counter[t1], .continue
         cCall2(osrSlowPath, cfr, PC)
         btpz t0, .recover
-        pop cfr # pop the callerFrame since we will jump to a function that wants to save it
-        jmp t0
+        # FIXME: Turn off OSR entry
+        # pop cfr # pop the callerFrame since we will jump to a function that wants to save it
+        # jmp t0
     .recover:
         codeBlockGetter(t1)
     .continue:

Modified: branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (160467 => 160468)


--- branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2013-12-12 01:56:25 UTC (rev 160467)
+++ branches/jsCStack/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2013-12-12 01:57:43 UTC (rev 160468)
@@ -365,7 +365,8 @@
             cCall2(_llint_loop_osr, cfr, PC)
             move t1, cfr
             btpz t0, .recover
-            jmp t0
+            # FIXME: CStack - Turn OSR entry back on
+            # jmp t0
         .recover:
             move t3, PB
             loadi ArgumentCount + TagOffset[cfr], PC
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to