Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1585)

Unified Diff: test/mjsunit/ascii-regexp-subject.js

Issue 18842: Experimental: periodic merge of the bleeding_edge branch to the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/array_length.js ('k') | test/mjsunit/bugs/bug-187.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/ascii-regexp-subject.js
===================================================================
--- test/mjsunit/ascii-regexp-subject.js (revision 1168)
+++ test/mjsunit/ascii-regexp-subject.js (working copy)
@@ -37,9 +37,13 @@
s = s + s;
}
-var re = /^bar/;
+function repeatRegexp(re) {
+ for (i = 0; i < 1000; i++) {
+ re.test(s);
+ }
+}
-for (i = 0; i < 1000; i++) {
- re.test(s);
- re = new RegExp("^bar");
-}
+repeatRegexp(/^bar/);
+repeatRegexp(/^foo|^bar|^baz/);
+repeatRegexp(/(^bar)/);
+repeatRegexp(/(?=^bar)\w+/);
« no previous file with comments | « test/mjsunit/array_length.js ('k') | test/mjsunit/bugs/bug-187.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698