Skip to content

Commit 4302156

Browse files
committed
[MERGE chakra-core#851] Disable an invalid assert in the array check hoisting code (and correct and clarify the assert in case we decide to try and re-enable it at some point).
Merge pull request chakra-core#851 from pleath:7207153
2 parents 6c5da58 + 83a1b25 commit 4302156

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

lib/Backend/GlobOpt.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14859,19 +14859,19 @@ GlobOpt::VerifyArrayValueInfoForTracking(
1485914859
) &&
1486014860
!DoArraySegmentHoist(valueInfo->Type())
1486114861
));
14862+
#if 0
14863+
// We can't assert here that there is only a head segment length sym if hoisting is allowed in the current block,
14864+
// because we may have propagated the sym forward out of a loop, and hoisting may be allowed inside but not
14865+
// outside the loop.
1486214866
Assert(
14863-
!(
14864-
!isJsArray &&
14865-
valueInfo->IsArrayValueInfo() &&
14866-
valueInfo->AsArrayValueInfo()->HeadSegmentLengthSym() &&
14867-
!(
14868-
DoTypedArraySegmentLengthHoist(implicitCallsLoop) ||
14869-
(
14870-
ignoreKnownImplicitCalls &&
14871-
!(implicitCallsLoop ? ImplicitCallFlagsAllowOpts(implicitCallsLoop) : ImplicitCallFlagsAllowOpts(func))
14872-
)
14873-
)
14874-
));
14867+
isJsArray ||
14868+
!valueInfo->IsArrayValueInfo() ||
14869+
!valueInfo->AsArrayValueInfo()->HeadSegmentLengthSym() ||
14870+
DoTypedArraySegmentLengthHoist(implicitCallsLoop) ||
14871+
ignoreKnownImplicitCalls ||
14872+
(implicitCallsLoop ? ImplicitCallFlagsAllowOpts(implicitCallsLoop) : ImplicitCallFlagsAllowOpts(func))
14873+
);
14874+
#endif
1487514875
Assert(
1487614876
!(
1487714877
isJsArray &&

0 commit comments

Comments
 (0)