File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1016,6 +1016,20 @@ SECOND_PASS:
10161016 template <typename T>
10171017 bool JavascriptArray::DirectSetItemAtRange (uint32 startIndex, uint32 length, T newValue)
10181018 {
1019+ bool isBtree = false ;
1020+
1021+ #ifdef ENABLE_DEBUG_CONFIG_OPTIONS
1022+ isBtree = Js::Configuration::Global.flags .ForceArrayBTree ;
1023+ #endif
1024+ if (GetSegmentMap () || isBtree)
1025+ {
1026+ for (uint i = startIndex; i < startIndex + length; i++)
1027+ {
1028+ DirectSetItem_Full<T>(i, newValue);
1029+ }
1030+ return true ;
1031+ }
1032+
10191033 if (startIndex == 0 && head != EmptySegment && length < head->size )
10201034 {
10211035 if (newValue == (T)0 || newValue == (T)(-1 ))
@@ -1094,20 +1108,7 @@ SECOND_PASS:
10941108 {
10951109 return true ;
10961110 }
1097-
1098- bool isBtree = false ;
1099-
1100- #ifdef ENABLE_DEBUG_CONFIG_OPTIONS
1101- isBtree = Js::Configuration::Global.flags .ForceArrayBTree ;
1102- #endif
1103- if (GetSegmentMap () || isBtree)
1104- {
1105- for (uint i = startIndex; i < startIndex + length; i++)
1106- {
1107- DirectSetItem_Full<T>(i, newValue);
1108- }
1109- return true ;
1110- }
1111+ Assert (!GetSegmentMap ());
11111112
11121113 SparseArraySegment<T> *current = PrepareSegmentForMemOp<T>(startIndex, length);
11131114 if (current == nullptr )
You can’t perform that action at this time.
0 commit comments