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

Unified Diff: src/jsregexp.cc

Issue 11231: Flat string reader (Closed)
Patch Set: Created 12 years, 1 month 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 | « src/heap.cc ('k') | src/objects.h » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.cc
diff --git a/src/jsregexp.cc b/src/jsregexp.cc
index d592b0dcd307b8c2b60b0dfde3ea3b79b4d9615f..570370e3b67bec9e915500d750694c9477b411b5 100644
--- a/src/jsregexp.cc
+++ b/src/jsregexp.cc
@@ -208,9 +208,10 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
re->set_data(*cached);
result = re;
} else {
- SafeStringInputBuffer buffer(pattern.location());
+ pattern->Flatten(shape);
Erik Corry 2008/11/19 09:45:38 Since this shape is only used once I think you sho
RegExpParseResult parse_result;
- if (!ParseRegExp(&buffer, &parse_result)) {
+ FlatStringReader reader(pattern);
+ if (!ParseRegExp(&reader, &parse_result)) {
// Throw an exception if we fail to parse the pattern.
ThrowRegExpException(re,
pattern,
« no previous file with comments | « src/heap.cc ('k') | src/objects.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698