Bug 38828 - REGRESSION(r57955): RegExp literals should not actually be cached, so r57955 should be rolled out.
: REGRESSION(r57955): RegExp literals should not actually be cached, so r57955 ...
Status: RESOLVED FIXED
: WebKit
New Bugs
: 528+ (Nightly build)
: Other Mac OS X 10.5
: P2 Normal
Assigned To:
:
: InRadar
:
:
  Show dependency treegraph
 
Reported: 2010-05-09 18:25 PST by
Modified: 2010-05-09 18:41 PST (History)


Attachments
Patch (21.06 KB, patch)
2010-05-09 18:27 PST, Oliver Hunt
barraclough: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-05-09 18:25:51 PST
REGRESSION(r57955): RegExp literals should not actually be cached, so r57955 should be rolled out.
------- Comment #1 From 2010-05-09 18:27:47 PST -------
Created an attachment (id=55513) [details]
Patch
------- Comment #2 From 2010-05-09 18:29:43 PST -------
(From update of attachment 55513 [details])
This patch does not give the reason they should not be cached. Is it because caching them makes things slower? Or perhaps it gives incorrect results?
------- Comment #3 From 2010-05-09 18:32:34 PST -------
<rdar://problem/7961634>


In order to match firefox I made JSC cache regexp literals, however it turns out that this behaviour is part of ES3, and ES5 mandates the we don't cache.  eg. Old JSC was correct per-ES5.  This needs to be reverted due to the following reasons:

1. We did this partially as a compat fix, but firefox is dropping regexp caching in 3.7 and moving to our (old) non-caching behaviour. eg. we will be the only browser that does this.
2. Even in firefox, where regexp literals have always been cached, the caching of regexp literals is their 2nd most frequently duped bug report.
3. Due to the way RegExp.lastIndex works this change in behaviour can result in significantly different regexp behaviour.
------- Comment #4 From 2010-05-09 18:33:48 PST -------
Attachment 55513 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
JavaScriptCore/bytecode/CodeBlock.h:461:  More than one command on the same line  [whitespace/newline] [4]
JavaScriptCore/bytecode/CodeBlock.h:462:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 2 in 17 files


If any of these errors are false positives, please file a bug against check-webkit-style.
------- Comment #5 From 2010-05-09 18:41:23 PST -------
Committed r59064: <http://trac.webkit.org/changeset/59064>