WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
81742
RegExpMatchesArray should not copy the ovector
https://bugs.webkit.org/show_bug.cgi?id=81742
Summary
RegExpMatchesArray should not copy the ovector
Gavin Barraclough
Reported
2012-03-20 22:19:40 PDT
Currently, all RegExpMatchesArray object contain Vector<int, 32>, used to hold any sub-pattern results. This makes allocation/construction/destruction of these objects more expensive. Instead, just store the main match, and recreate the sub-pattern ranges only if necessary (these are often only used for grouping, and the results never accessed). If the main match (index 0) of the RegExpMatchesArray is accessed, reify that value alone.
Attachments
Fix
(35.76 KB, patch)
2012-03-20 22:21 PDT
,
Gavin Barraclough
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Gavin Barraclough
Comment 1
2012-03-20 22:21:08 PDT
Created
attachment 132972
[details]
Fix
WebKit Review Bot
Comment 2
2012-03-20 22:23:40 PDT
Attachment 132972
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/ChangeLog', u'Source..." exit_code: 1 Source/JavaScriptCore/runtime/RegExpObject.h:29: Code inside a namespace should not be indented. [whitespace/indent] [4] Source/JavaScriptCore/runtime/RegExpObject.h:120: The parameter name "string" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
Michael Saboff
Comment 3
2012-03-21 11:00:04 PDT
Comment on
attachment 132972
[details]
Fix r+ Please fix the style issues. What is the performance implication of this change?
Gavin Barraclough
Comment 4
2012-03-21 14:04:28 PDT
Fixed in
r111603
.
Oliver Hunt
Comment 5
2012-03-24 12:09:58 PDT
Comment on
attachment 132972
[details]
Fix Clearing review flags as comments imply this has landed.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug