Description[regexp] Avoid runtime call on OOB lastIndex values
At this point, last_index is definitely a canonicalized non-negative
number, which implies that any non-Smi last_index is greater than
the maximal string length. That in turn means that the matcher will
definitely fail, and we can avoid the expensive runtime call.
BUG=v8:6365, v8:6344
Review-Url: https://codereview.chromium.org/2863643004
Cr-Commit-Position: refs/heads/master@{#45143}
Committed: https://chromium.googlesource.com/v8/v8/+/2fd1afc0c8128148b74b3d9ff7b39c084c7dd90b
Patch Set 1 #
Total comments: 2
Patch Set 2 : Add IsNumberPositive assert #
Messages
Total messages: 19 (13 generated)
|