Bug 38828

Summary: REGRESSION(r57955): RegExp literals should not actually be cached, so r57955 should be rolled out.
Product: WebKit Reporter: Oliver Hunt <oliver>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch barraclough: review+

Description Oliver Hunt 2010-05-09 18:25:51 PDT
REGRESSION(r57955): RegExp literals should not actually be cached, so r57955 should be rolled out.
Comment 1 Oliver Hunt 2010-05-09 18:27:47 PDT
Created attachment 55513 [details]
Patch
Comment 2 Darin Adler 2010-05-09 18:29:43 PDT
Comment on attachment 55513 [details]
Patch

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 Oliver Hunt 2010-05-09 18:32:34 PDT
<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 WebKit Review Bot 2010-05-09 18:33:48 PDT
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 Oliver Hunt 2010-05-09 18:41:23 PDT
Committed r59064: <http://trac.webkit.org/changeset/59064>