Changeset 176972 in webkit


Ignore:
Timestamp:
Dec 8, 2014 2:12:25 PM (9 years ago)
Author:
mark.lam@apple.com
Message:

CFA wrongly assumes that a speculation for SlowPutArrayStorageShape disallows ArrayStorageShape arrays.
<https://webkit.org/b/139327>

Reviewed by Michael Saboff.

Source/JavaScriptCore:

The code generator and runtime slow paths expects otherwise. This patch fixes
CFA to match the code generator's expectation.

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::arrayModesThatPassFiltering):
(JSC::DFG::ArrayMode::arrayModesWithIndexingShapes):

LayoutTests:

  • js/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage-expected.txt: Added.
  • js/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage.html: Added.
  • js/script-tests/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage.js: Added.

(foo):
(test):

Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r176971 r176972  
     12014-12-08  Mark Lam  <mark.lam@apple.com>
     2
     3        CFA wrongly assumes that a speculation for SlowPutArrayStorageShape disallows ArrayStorageShape arrays.
     4        <https://webkit.org/b/139327>
     5
     6        Reviewed by Michael Saboff.
     7
     8        * js/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage-expected.txt: Added.
     9        * js/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage.html: Added.
     10        * js/script-tests/dfg-slow-put-array-storage-spec-should-allow-fast-array-storage.js: Added.
     11        (foo):
     12        (test):
     13
    1142014-12-08  Myles C. Maxfield  <mmaxfield@apple.com>
    215
  • trunk/Source/JavaScriptCore/ChangeLog

    r176964 r176972  
     12014-12-08  Mark Lam  <mark.lam@apple.com>
     2
     3        CFA wrongly assumes that a speculation for SlowPutArrayStorageShape disallows ArrayStorageShape arrays.
     4        <https://webkit.org/b/139327>
     5
     6        Reviewed by Michael Saboff.
     7
     8        The code generator and runtime slow paths expects otherwise.  This patch fixes
     9        CFA to match the code generator's expectation.
     10
     11        * dfg/DFGArrayMode.h:
     12        (JSC::DFG::ArrayMode::arrayModesThatPassFiltering):
     13        (JSC::DFG::ArrayMode::arrayModesWithIndexingShapes):
     14
    1152014-12-08  Chris Dumez  <cdumez@apple.com>
    216
  • trunk/Source/JavaScriptCore/dfg/DFGArrayMode.h

    r165099 r176972  
    407407            return arrayModesWithIndexingShape(ArrayStorageShape);
    408408        case Array::SlowPutArrayStorage:
    409             return arrayModesWithIndexingShape(SlowPutArrayStorageShape);
     409            return arrayModesWithIndexingShapes(SlowPutArrayStorageShape, ArrayStorageShape);
    410410        default:
    411411            return asArrayModes(NonArray);
     
    463463    }
    464464   
     465    ArrayModes arrayModesWithIndexingShapes(IndexingType shape1, IndexingType shape2) const
     466    {
     467        ArrayModes arrayMode1 = arrayModesWithIndexingShape(shape1);
     468        ArrayModes arrayMode2 = arrayModesWithIndexingShape(shape2);
     469        return arrayMode1 | arrayMode2;
     470    }
     471
    465472    bool alreadyChecked(Graph&, Node*, AbstractValue&, IndexingType shape) const;
    466473   
Note: See TracChangeset for help on using the changeset viewer.