Changeset 149834 in webkit
- Timestamp:
- May 9, 2013, 12:38:23 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r149803 r149834 1 2013-05-08 Mark Hahnenberg <[email protected]> 2 3 DFGArrayMode::fromObserved is too liberal when it sees different Array and NonArray shapes 4 https://bugs.webkit.org/show_bug.cgi?id=115805 5 6 Added regression test for array access over polymorphic array vs. non-array indexing types. 7 With the fix, we get 3.666x faster on this microbenchmark. 8 9 Reviewed by Geoffrey Garen. 10 11 * fast/js/regress/array-nonarray-polymorphic-access-expected.txt: Added. 12 * fast/js/regress/array-nonarray-polymorphic-access.html: Added. 13 * fast/js/regress/script-tests/array-nonarray-polymorphic-access.js: Added. 14 (f): 15 (run): 16 17 <<<<<<< .mine 18 2013-05-08 Mark Hahnenberg <[email protected]> 19 20 DFGArrayMode::fromObserved is too liberal when it sees different Array and NonArray shapes 21 https://bugs.webkit.org/show_bug.cgi?id=115805 22 23 Reviewed by Geoffrey Garen. 24 25 Added regression test for array access over polymorphic array vs. non-array indexing types. 26 With the fix, we get 3.666x faster on this microbenchmark. 27 28 * fast/js/regress/array-nonarray-polymorphic-access-expected.txt: Added. 29 * fast/js/regress/array-nonarray-polymorphic-access.html: Added. 30 * fast/js/regress/script-tests/array-nonarray-polymorhpic-access.js: Added. 31 (f): 32 (run): 33 34 ======= 1 35 2013-05-09 Radu Stavila <[email protected]> 2 36 … … 97 131 * platform/qt/fast/js/global-constructors-attributes-expected.txt: Added after r149758. 98 132 133 >>>>>>> .r149833 99 134 2013-05-08 Seokju Kwon <[email protected]> 100 135 -
trunk/Source/JavaScriptCore/ChangeLog
r149825 r149834 1 2013-05-08 Mark Hahnenberg <[email protected]> 2 3 DFGArrayMode::fromObserved is too liberal when it sees different Array and NonArray shapes 4 https://bugs.webkit.org/show_bug.cgi?id=115805 5 6 Reviewed by Geoffrey Garen. 7 8 It checks the observed ArrayModes to see if we have seen any ArrayWith* first. If so, it assumes it's 9 an Array::Array, even if we've also observed any NonArrayWith* in the ArrayProfile. This leads to the 10 code generated by jumpSlowForUnwantedArrayMode to check the indexing type against (shape | IsArray) 11 instead of just shape, which can cause us to exit a lot in the case that we saw a NonArray. 12 13 To fix this we need to add a case that checks for both ArrayWith* and NonArrayWith* cases first, which 14 should then use Array::PossiblyArray, then do the checks we were already doing. 15 16 * bytecode/ArrayProfile.h: 17 (JSC::hasSeenArray): 18 (JSC::hasSeenNonArray): 19 * dfg/DFGArrayMode.cpp: 20 (JSC::DFG::ArrayMode::fromObserved): 21 1 22 2013-05-09 Joe Mason <[email protected]> 2 23 -
trunk/Source/JavaScriptCore/bytecode/ArrayProfile.h
r137937 r149834 116 116 } 117 117 118 inline bool hasSeenArray(ArrayModes arrayModes) 119 { 120 return arrayModes & ALL_ARRAY_ARRAY_MODES; 121 } 122 123 inline bool hasSeenNonArray(ArrayModes arrayModes) 124 { 125 return arrayModes & ALL_NON_ARRAY_ARRAY_MODES; 126 } 127 118 128 class ArrayProfile { 119 129 public: -
trunk/Source/JavaScriptCore/dfg/DFGArrayMode.cpp
r146887 r149834 113 113 type = Array::Undecided; 114 114 115 if (observed & (asArrayModes(ArrayWithUndecided) | asArrayModes(ArrayWithInt32) | asArrayModes(ArrayWithDouble) | asArrayModes(ArrayWithContiguous) | asArrayModes(ArrayWithArrayStorage) | asArrayModes(ArrayWithSlowPutArrayStorage))) 115 if (hasSeenArray(observed) && hasSeenNonArray(observed)) 116 arrayClass = Array::PossiblyArray; 117 else if (hasSeenArray(observed)) 116 118 arrayClass = Array::Array; 117 else if ( observed & (asArrayModes(NonArray) | asArrayModes(NonArrayWithInt32) | asArrayModes(NonArrayWithDouble) | asArrayModes(NonArrayWithContiguous) | asArrayModes(NonArrayWithArrayStorage) | asArrayModes(NonArrayWithSlowPutArrayStorage)))119 else if (hasSeenNonArray(observed)) 118 120 arrayClass = Array::NonArray; 119 121 else
Note:
See TracChangeset
for help on using the changeset viewer.