Index: src/jsregexp.cc |
=================================================================== |
--- src/jsregexp.cc (revision 11751) |
+++ src/jsregexp.cc (working copy) |
@@ -2754,6 +2754,15 @@ |
if (info()->visited) return this; |
VisitMarker marker(info()); |
int choice_count = alternatives_->length(); |
+ |
+ for (int i = 0; i < choice_count; i++) { |
+ GuardedAlternative alternative = alternatives_->at(i); |
+ if (alternative.guards() != NULL && alternative.guards()->length() != 0) { |
+ set_replacement(this); |
+ return this; |
+ } |
+ } |
+ |
int surviving = 0; |
RegExpNode* survivor = NULL; |
for (int i = 0; i < choice_count; i++) { |