Revision: 6081
Author: [email protected]
Date: Mon Dec 20 02:44:41 2010
Log: Minor optimization in regexp parse.
Review URL: http://codereview.chromium.org/6014002
http://code.google.com/p/v8/source/detail?r=6081

Modified:
 /branches/bleeding_edge/src/parser.cc

=======================================
--- /branches/bleeding_edge/src/parser.cc       Mon Dec 13 00:33:32 2010
+++ /branches/bleeding_edge/src/parser.cc       Mon Dec 20 02:44:41 2010
@@ -3730,7 +3730,7 @@
     contains_anchor_(false),
     is_scanned_for_captures_(false),
     failed_(false) {
-  Advance(1);
+  Advance();
 }


@@ -3768,8 +3768,8 @@


 void RegExpParser::Advance(int dist) {
-  for (int i = 0; i < dist; i++)
-    Advance();
+  next_pos_ += dist - 1;
+  Advance();
 }


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to