Revision: 4412
Author: [email protected]
Date: Wed Apr 14 02:54:30 2010
Log: Postpone interrupts while compiling regexp code. This avoids
getting artificial stack overflows due to interrupts while
compiling and visiting the AST nodes. Pending interrupts will
be processed once we're done compiling.

http://code.google.com/p/v8/source/detail?r=4412

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

=======================================
--- /branches/bleeding_edge/src/jsregexp.cc     Thu Mar 25 05:41:26 2010
+++ /branches/bleeding_edge/src/jsregexp.cc     Wed Apr 14 02:54:30 2010
@@ -122,6 +122,7 @@
   }
   FlattenString(pattern);
   CompilationZoneScope zone_scope(DELETE_ON_EXIT);
+  PostponeInterruptScope postpone;
   RegExpCompileData parse_result;
   FlatStringReader reader(pattern);
   if (!ParseRegExp(&reader, flags.is_multiline(), &parse_result)) {
@@ -247,6 +248,7 @@
 bool RegExpImpl::CompileIrregexp(Handle<JSRegExp> re, bool is_ascii) {
   // Compile the RegExp.
   CompilationZoneScope zone_scope(DELETE_ON_EXIT);
+  PostponeInterruptScope postpone;
   Object* entry = re->DataAt(JSRegExp::code_index(is_ascii));
   if (entry->IsJSObject()) {
// If it's a JSObject, a previous compilation failed and threw this object.

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to