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

Unified Diff: src/regexp-macro-assembler-tracer.cc

Issue 10386090: Implement loop for global regexps in regexp assembler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix bugs, add tests, port to x64 and arm. Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/regexp-macro-assembler-tracer.cc
diff --git a/src/regexp-macro-assembler-tracer.cc b/src/regexp-macro-assembler-tracer.cc
index b7aeac48db38a96ba5f2673a44fc7e09b41ee06e..1a3d1e5988a1cad98e997dccbadc365f4de4db82 100644
--- a/src/regexp-macro-assembler-tracer.cc
+++ b/src/regexp-macro-assembler-tracer.cc
@@ -1,4 +1,4 @@
-// Copyright 2008 the V8 project authors. All rights reserved.
+// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -103,13 +103,15 @@ void RegExpMacroAssemblerTracer::PushBacktrack(Label* label) {
void RegExpMacroAssemblerTracer::Succeed() {
- PrintF(" Succeed();\n");
+ PrintF(" Succeed();%s\n",
+ assembler_->global() ? " [restart for global match]" : "");
Erik Corry 2012/05/22 08:32:46 It's a bit ugly that this will print "restart..."
assembler_->Succeed();
}
void RegExpMacroAssemblerTracer::Fail() {
- PrintF(" Fail();\n");
+ PrintF(" Fail();%s\n",
+ assembler_->global() ? " [return success count]" : "");
assembler_->Fail();
}

Powered by Google App Engine
This is Rietveld 408576698