« Bugzilla Issues Index
#3489 — 21.2.5.2.2 Combine Get + ToLength in RegExpBuiltinExec
- bug_id:
3489
- creation_ts:
2014-12-25 05:32:00 -0800
- short_desc:
21.2.5.2.2 Combine Get + ToLength in RegExpBuiltinExec
- delta_ts:
2015-01-15 16:19:03 -0800
- product:
Draft for 6th Edition
- component:
technical issue
- version:
Rev 30: December 24, 2014 Draft
- rep_platform:
All
- op_sys:
All
- bug_status:
RESOLVED
- resolution:
FIXED
- priority:
Normal
- bug_severity:
enhancement
- everconfirmed:
true
- reporter:
Chris Toshok
- assigned_to:
Allen Wirfs-Brock
- commentid:
11236
- comment_count:
0
- who:
Chris Toshok
- bug_when:
2014-12-25 05:32:36 -0800
In the algorithm:
4. Let lastIndex be Get(R,"lastIndex").
5. Let i be ToLength(lastIndex).
6. ReturnIfAbrupt(i).
can be shortened to:
4. Let lastIndex be ToLength(Get(R,"lastIndex")).
5. ReturnIfAbrupt(lastIndex).
with s/i/lastIndex/ for the rest of the algorithm.
The shortened form also effectively covers the Get(R, "lastIndex") in the ReturnIfAbrupt (whereas the initial form is missing a "ReturnIfAbrupt(lastIndex)" at 4.5ish)
elsewhere (even in the same algorithm) these two steps are combined, e.g.:
7. Let global be ToBoolean(Get(R, "global")).
8. ReturnIfAbrupt(global).
- commentid:
11257
- comment_count:
1
- who:
Allen Wirfs-Brock
- bug_when:
2014-12-29 14:55:13 -0800
fixed in rev31 editor's draft
- commentid:
11432
- comment_count:
2
- who:
Allen Wirfs-Brock
- bug_when:
2015-01-15 16:19:03 -0800
In Rev31