Changeset 163322 in webkit


Ignore:
Timestamp:
Feb 3, 2014 12:59:40 PM (10 years ago)
Author:
mark.lam@apple.com
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):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r163321 r163322  
     12014-02-03  Mark Lam  <mark.lam@apple.com>
     2
     3        Debugger created JSActivations should account for CodeBlock::framePointerOffsetToGetActivationRegisters().
     4        <https://webkit.org/b/128112>
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Currently, when the DebuggerCallFrame creates the JSActivation object
     9        for a frame, it does not account for the framePointerOffsetToGetActivationRegisters()
     10        offset that needs to be added for DFG frames.
     11
     12        Instead of special casing the fix in DebuggerCallFrame::scope(), we fix
     13        this by adding CodeBlock::framePointerOffsetToGetActivationRegisters() to
     14        callFrame->registers() in the JSActivation::create() method that does not
     15        explicitly take a Register*. This ensures that JSActivation::create() will
     16        always do the right thing instead of only being a special case for the
     17        LLINT and baselineJIT.
     18
     19        Apart from the DebuggerCallFrame, this create() function is only called by
     20        slow paths in the LLINT and baselineJIT. Hence, it is not performance
     21        critical.
     22
     23        * runtime/JSActivation.h:
     24        (JSC::JSActivation::create):
     25
    1262014-01-31  Geoffrey Garen  <ggaren@apple.com>
    227
  • trunk/Source/JavaScriptCore/runtime/JSActivation.h

    r160208 r163322  
    6464    static JSActivation* create(VM& vm, CallFrame* callFrame, CodeBlock* codeBlock)
    6565    {
    66         return create(vm, callFrame, callFrame->registers(), codeBlock);
     66        return create(vm, callFrame, callFrame->registers() + codeBlock->framePointerOffsetToGetActivationRegisters(), codeBlock);
    6767    }
    6868
Note: See TracChangeset for help on using the changeset viewer.