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

Side by Side Diff: src/parser.cc

Issue 15712006: Regexp parser: reset flag after scanning ahead for capture groups. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2690.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5112 matching lines...) Expand 10 before | Expand all | Expand 10 after
5123 } 5123 }
5124 } else { 5124 } else {
5125 current_ = kEndMarker; 5125 current_ = kEndMarker;
5126 has_more_ = false; 5126 has_more_ = false;
5127 } 5127 }
5128 } 5128 }
5129 5129
5130 5130
5131 void RegExpParser::Reset(int pos) { 5131 void RegExpParser::Reset(int pos) {
5132 next_pos_ = pos; 5132 next_pos_ = pos;
5133 has_more_ = (pos < in()->length());
5133 Advance(); 5134 Advance();
5134 } 5135 }
5135 5136
5136 5137
5137 void RegExpParser::Advance(int dist) { 5138 void RegExpParser::Advance(int dist) {
5138 next_pos_ += dist - 1; 5139 next_pos_ += dist - 1;
5139 Advance(); 5140 Advance();
5140 } 5141 }
5141 5142
5142 5143
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
6025 ASSERT(info()->isolate()->has_pending_exception()); 6026 ASSERT(info()->isolate()->has_pending_exception());
6026 } else { 6027 } else {
6027 result = ParseProgram(); 6028 result = ParseProgram();
6028 } 6029 }
6029 } 6030 }
6030 info()->SetFunction(result); 6031 info()->SetFunction(result);
6031 return (result != NULL); 6032 return (result != NULL);
6032 } 6033 }
6033 6034
6034 } } // namespace v8::internal 6035 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-2690.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698