Changeset 167031 in webkit


Ignore:
Timestamp:
Apr 9, 2014 1:23:20 PM (10 years ago)
Author:
mark.lam@apple.com
Message:

Ensure that LLINT accessing of the ProtoCallFrame is big endian friendly.
<https://webkit.org/b/131449>

Reviewed by Mark Hahnenberg.

Change ProtoCallFrame::paddedArgCount to be of type uint32_t. The argCount
that it pads is of type int anyway. It doesn't need to be 64 bit. This
also makes it work with the LLINT which is loading it with a loadi
instruction.

We should add the PayLoadOffset to ProtoCallFrame::argCountAndCodeOriginValue
when loading the argCount.

  • interpreter/ProtoCallFrame.h:

(JSC::ProtoCallFrame::setPaddedArgCount):

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r167020 r167031  
     12014-04-09  Mark Lam  <mark.lam@apple.com>
     2
     3        Ensure that LLINT accessing of the ProtoCallFrame is big endian friendly.
     4        <https://webkit.org/b/131449>
     5
     6        Reviewed by Mark Hahnenberg.
     7
     8        Change ProtoCallFrame::paddedArgCount to be of type uint32_t.  The argCount
     9        that it pads is of type int anyway.  It doesn't need to be 64 bit.  This
     10        also makes it work with the LLINT which is loading it with a loadi
     11        instruction.
     12
     13        We should add the PayLoadOffset to ProtoCallFrame::argCountAndCodeOriginValue
     14        when loading the argCount.
     15
     16        * interpreter/ProtoCallFrame.h:
     17        (JSC::ProtoCallFrame::setPaddedArgCount):
     18        * llint/LowLevelInterpreter32_64.asm:
     19        * llint/LowLevelInterpreter64.asm:
     20
    1212014-04-08  Oliver Hunt  <oliver@apple.com>
    222
  • trunk/Source/JavaScriptCore/interpreter/ProtoCallFrame.h

    r163027 r167031  
    3737    Register argCountAndCodeOriginValue;
    3838    Register thisArg;
    39     size_t paddedArgCount;
     39    uint32_t paddedArgCount;
    4040    JSValue *args;
    4141
     
    5454    int argumentCount() const { return argumentCountIncludingThis() - 1; }
    5555    void setArgumentCountIncludingThis(int count) { argCountAndCodeOriginValue.payload() = count; }
    56     void setPaddedArgCount(size_t argCount) { paddedArgCount = argCount; }
     56    void setPaddedArgCount(uint32_t argCount) { paddedArgCount = argCount; }
    5757
    5858    void clearCurrentVPC() { argCountAndCodeOriginValue.tag() = 0; }
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

    r165334 r167031  
    292292    btinz temp1, .copyHeaderLoop
    293293
    294     loadi ProtoCallFrame::argCountAndCodeOriginValue[protoCallFrame], temp2
     294    loadi PayloadOffset + ProtoCallFrame::argCountAndCodeOriginValue[protoCallFrame], temp2
    295295    subi 1, temp2
    296296    loadi ProtoCallFrame::paddedArgCount[protoCallFrame], temp3
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm

    r165205 r167031  
    190190    btinz temp1, .copyHeaderLoop
    191191
    192     loadi ProtoCallFrame::argCountAndCodeOriginValue[protoCallFrame], temp2
     192    loadi PayloadOffset + ProtoCallFrame::argCountAndCodeOriginValue[protoCallFrame], temp2
    193193    subi 1, temp2
    194194    loadi ProtoCallFrame::paddedArgCount[protoCallFrame], temp3
Note: See TracChangeset for help on using the changeset viewer.