Bug 82519 - Yarr: if we're not using the output array, don't populate it!
Summary: Yarr: if we're not using the output array, don't populate it!
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-28 13:47 PDT by Gavin Barraclough
Modified: 2012-03-28 15:18 PDT (History)
1 user (show)

See Also:


Attachments
Fix (55.63 KB, patch)
2012-03-28 14:10 PDT, Gavin Barraclough
buildbot: commit-queue-
Details | Formatted Diff | Diff
Fix (56.29 KB, patch)
2012-03-28 14:30 PDT, Gavin Barraclough
sam: review+
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2012-03-28 13:47:09 PDT
Add a new variant of the match method to RegExp that returns a MatchResult, and modify YarrJIT to be able to compile code that doesn't use an output vector.
Comment 1 Gavin Barraclough 2012-03-28 14:10:52 PDT
Created attachment 134393 [details]
Fix
Comment 2 WebKit Review Bot 2012-03-28 14:15:56 PDT
Attachment 134393 [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/RegExp.h:62:  The parameter name "globalData" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/runtime/RegExp.h:62:  The parameter name "s" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/JavaScriptCore/runtime/RegExp.cpp:456:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
Source/JavaScriptCore/runtime/RegExp.cpp:477:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
Source/JavaScriptCore/yarr/YarrJIT.cpp:350:  Should have only a single space after a punctuation in a comment.  [whitespace/comments] [5]
Total errors found: 5 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Build Bot 2012-03-28 14:22:01 PDT
Comment on attachment 134393 [details]
Fix

Attachment 134393 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/12154394
Comment 4 Gavin Barraclough 2012-03-28 14:30:50 PDT
Created attachment 134403 [details]
Fix
Comment 5 Sam Weinig 2012-03-28 14:37:19 PDT
Comment on attachment 134403 [details]
Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=134403&action=review

> Source/JavaScriptCore/runtime/RegExp.cpp:221
>  struct RegExpRepresentation {
> -#if ENABLE(YARR_JIT)
> -    Yarr::YarrCodeBlock m_regExpJITCode;
> -#endif
> -    OwnPtr<Yarr::BytecodePattern> m_regExpBytecode;
>  };

This is now an empty struct.  Is that intentional?
Comment 6 Build Bot 2012-03-28 14:54:14 PDT
Comment on attachment 134403 [details]
Fix

Attachment 134403 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/12099073
Comment 7 Build Bot 2012-03-28 14:58:09 PDT
Comment on attachment 134403 [details]
Fix

Attachment 134403 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/12153466
Comment 8 Gavin Barraclough 2012-03-28 15:18:45 PDT
Fixed in r112454