Bug 16369 - REGRESSION (r28525): regular expression tests failing due to bad firstByte optimization
Summary: REGRESSION (r28525): regular expression tests failing due to bad firstByte op...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P1 Major
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-09 13:23 PST by Darin Adler
Modified: 2007-12-09 22:22 PST (History)
0 users

See Also:


Attachments
patch (19.42 KB, patch)
2007-12-09 13:30 PST, Darin Adler
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2007-12-09 13:23:12 PST
Some of the PCRE regular expression tests started failing due to my breaking the firstByte optimization. I have a fix.
Comment 1 Darin Adler 2007-12-09 13:30:58 PST
Created attachment 17807 [details]
patch
Comment 2 Sam Weinig 2007-12-09 22:17:57 PST
Comment on attachment 17807 [details]
patch

This looks good. 

I am not sure if this and similar code near it needs to be quite as obfuscated as it is?
+    if ((cd.needOuterBracket ? bracketIsAnchored : branchIsAnchored)(codestart))

I think it would read clearer if it was just
+    if ((cd.needOuterBracket ? bracketIsAnchored(codestart) : branchIsAnchored(codestart))

Also, I know it is partially copied, but the ... in this comment doesn't seem necessary to me.
+.... except when the .* appears inside capturing parentheses, and there is a

r=me.
Comment 3 Darin Adler 2007-12-09 22:22:22 PST
Committed revision 28578.