Changeset 38334 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Nov 12, 2008, 3:31:05 AM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-11-12 Gavin Barraclough <[email protected]>

Reviewed by Cameron Zwarich.

Fix for https://bugs.webkit.org/show_bug.cgi?id=22201
Integer conversion in array.length was safe signed values,
but the length is unsigned.

  • VM/CTI.cpp: (JSC::CTI::privateCompilePatchGetArrayLength):

LayoutTests:

2008-11-12 Gavin Barraclough <[email protected]>

Reviewed by Cameron Zwarich.

Test for https://bugs.webkit.org/show_bug.cgi?id=22201

  • fast/js/pic/cached-array-length-access-expected.txt: Added.
  • fast/js/pic/cached-array-length-access.html: Added.
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r38330 r38334  
     12008-11-12  Gavin Barraclough  <[email protected]>
     2
     3        Reviewed by Cameron Zwarich.
     4
     5        Fix for https://bugs.webkit.org/show_bug.cgi?id=22201
     6        Integer conversion in array.length was safe signed values,
     7        but the length is unsigned.
     8
     9        * VM/CTI.cpp:
     10        (JSC::CTI::privateCompilePatchGetArrayLength):
     11
    1122008-11-12  Cameron Zwarich  <[email protected]>
    213
  • trunk/JavaScriptCore/VM/CTI.cpp

    r38330 r38334  
    34283428    m_jit.movl_mr(OBJECT_OFFSET(ArrayStorage, m_length), X86::ecx, X86::ecx);
    34293429
     3430    m_jit.cmpl_i32r(JSImmediate::maxImmediateInt, X86::ecx);
     3431    X86Assembler::JmpSrc failureCases3 = m_jit.emitUnlinkedJa();
     3432
    34303433    m_jit.addl_rr(X86::ecx, X86::ecx);
    3431     X86Assembler::JmpSrc failureClobberedECX = m_jit.emitUnlinkedJo();
    34323434    m_jit.addl_i8r(1, X86::ecx);
    3433 
    34343435    X86Assembler::JmpSrc success = m_jit.emitUnlinkedJmp();
    3435 
    3436     m_jit.link(failureClobberedECX, m_jit.label());
    3437     m_jit.emitRestoreArgumentReference();
    3438     X86Assembler::JmpSrc failureCases3 = m_jit.emitUnlinkedJmp();
    34393436
    34403437    void* code = m_jit.copy();
Note: See TracChangeset for help on using the changeset viewer.