Title: [163322] trunk/Source/_javascript_Core
- Revision
- 163322
- Author
- mark....@apple.com
- Date
- 2014-02-03 12:59:40 -0800 (Mon, 03 Feb 2014)
Log Message
Debugger created JSActivations should account for CodeBlock::framePointerOffsetToGetActivationRegisters().
<https://webkit.org/b/128112>
Reviewed by Geoffrey Garen.
Currently, when the DebuggerCallFrame creates the JSActivation object
for a frame, it does not account for the framePointerOffsetToGetActivationRegisters()
offset that needs to be added for DFG frames.
Instead of special casing the fix in DebuggerCallFrame::scope(), we fix
this by adding CodeBlock::framePointerOffsetToGetActivationRegisters() to
callFrame->registers() in the JSActivation::create() method that does not
explicitly take a Register*. This ensures that JSActivation::create() will
always do the right thing instead of only being a special case for the
LLINT and baselineJIT.
Apart from the DebuggerCallFrame, this create() function is only called by
slow paths in the LLINT and baselineJIT. Hence, it is not performance
critical.
* runtime/JSActivation.h:
(JSC::JSActivation::create):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (163321 => 163322)
--- trunk/Source/_javascript_Core/ChangeLog 2014-02-03 20:39:38 UTC (rev 163321)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-02-03 20:59:40 UTC (rev 163322)
@@ -1,3 +1,28 @@
+2014-02-03 Mark Lam <mark....@apple.com>
+
+ Debugger created JSActivations should account for CodeBlock::framePointerOffsetToGetActivationRegisters().
+ <https://webkit.org/b/128112>
+
+ Reviewed by Geoffrey Garen.
+
+ Currently, when the DebuggerCallFrame creates the JSActivation object
+ for a frame, it does not account for the framePointerOffsetToGetActivationRegisters()
+ offset that needs to be added for DFG frames.
+
+ Instead of special casing the fix in DebuggerCallFrame::scope(), we fix
+ this by adding CodeBlock::framePointerOffsetToGetActivationRegisters() to
+ callFrame->registers() in the JSActivation::create() method that does not
+ explicitly take a Register*. This ensures that JSActivation::create() will
+ always do the right thing instead of only being a special case for the
+ LLINT and baselineJIT.
+
+ Apart from the DebuggerCallFrame, this create() function is only called by
+ slow paths in the LLINT and baselineJIT. Hence, it is not performance
+ critical.
+
+ * runtime/JSActivation.h:
+ (JSC::JSActivation::create):
+
2014-01-31 Geoffrey Garen <gga...@apple.com>
Simplified name scope creation for function expressions
Modified: trunk/Source/_javascript_Core/runtime/JSActivation.h (163321 => 163322)
--- trunk/Source/_javascript_Core/runtime/JSActivation.h 2014-02-03 20:39:38 UTC (rev 163321)
+++ trunk/Source/_javascript_Core/runtime/JSActivation.h 2014-02-03 20:59:40 UTC (rev 163322)
@@ -63,7 +63,7 @@
static JSActivation* create(VM& vm, CallFrame* callFrame, CodeBlock* codeBlock)
{
- return create(vm, callFrame, callFrame->registers(), codeBlock);
+ return create(vm, callFrame, callFrame->registers() + codeBlock->framePointerOffsetToGetActivationRegisters(), codeBlock);
}
static void visitChildren(JSCell*, SlotVisitor&);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes