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

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

Issue 14194: * Generate quick checks based on mask and compare for... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years 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/regexp-macro-assembler-tracer.h ('k') | test/mjsunit/regexp.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp-macro-assembler-tracer.cc
===================================================================
--- src/regexp-macro-assembler-tracer.cc (revision 1004)
+++ src/regexp-macro-assembler-tracer.cc (working copy)
@@ -164,21 +164,22 @@
void RegExpMacroAssemblerTracer::LoadCurrentCharacter(int cp_offset,
- Label* on_end_of_input) {
- PrintF(" LoadCurrentCharacter(cp_offset=%d, label[%08x]);\n",
+ Label* on_end_of_input,
+ bool check_bounds,
+ int characters) {
+ const char* check_msg = check_bounds ? "" : " (unchecked)";
+ PrintF(" LoadCurrentCharacter(cp_offset=%d, label[%08x]%s (%d chars));\n",
cp_offset,
- on_end_of_input);
- assembler_->LoadCurrentCharacter(cp_offset, on_end_of_input);
+ on_end_of_input,
+ check_msg,
+ characters);
+ assembler_->LoadCurrentCharacter(cp_offset,
+ on_end_of_input,
+ check_bounds,
+ characters);
}
-void RegExpMacroAssemblerTracer::LoadCurrentCharacterUnchecked(int cp_offset) {
- PrintF(" LoadCurrentCharacterUnchecked(cp_offset=%d);\n",
- cp_offset);
- assembler_->LoadCurrentCharacterUnchecked(cp_offset);
-}
-
-
void RegExpMacroAssemblerTracer::CheckCharacterLT(uc16 limit, Label* on_less) {
PrintF(" CheckCharacterLT(c='u%04x', label[%08x]);\n", limit, on_less);
assembler_->CheckCharacterLT(limit, on_less);
@@ -192,7 +193,7 @@
}
-void RegExpMacroAssemblerTracer::CheckCharacter(uc16 c, Label* on_equal) {
+void RegExpMacroAssemblerTracer::CheckCharacter(uint32_t c, Label* on_equal) {
PrintF(" CheckCharacter(c='u%04x', label[%08x]);\n", c, on_equal);
assembler_->CheckCharacter(c, on_equal);
}
@@ -204,28 +205,49 @@
}
-void RegExpMacroAssemblerTracer::CheckNotCharacter(uc16 c,
+void RegExpMacroAssemblerTracer::CheckNotCharacter(uint32_t c,
Label* on_not_equal) {
PrintF(" CheckNotCharacter(c='u%04x', label[%08x]);\n", c, on_not_equal);
assembler_->CheckNotCharacter(c, on_not_equal);
}
-void RegExpMacroAssemblerTracer::CheckNotCharacterAfterOr(uc16 c, uc16 mask,
- Label* on_not_equal) {
- PrintF(" CheckNotCharacterAfterOr(c='u%04x', mask=0x%04x, label[%08x]);\n", c,
- mask, on_not_equal);
- assembler_->CheckNotCharacterAfterOr(c, mask, on_not_equal);
+void RegExpMacroAssemblerTracer::CheckCharacterAfterAnd(
+ uint32_t c,
+ uint32_t mask,
+ Label* on_equal) {
+ PrintF(" CheckCharacterAfterAnd(c='u%04x', mask=0x%04x, label[%08x]);\n",
+ c,
+ mask,
+ on_equal);
+ assembler_->CheckCharacterAfterAnd(c, mask, on_equal);
}
-void RegExpMacroAssemblerTracer::CheckNotCharacterAfterMinusOr(
+void RegExpMacroAssemblerTracer::CheckNotCharacterAfterAnd(
+ uint32_t c,
+ uint32_t mask,
+ Label* on_not_equal) {
+ PrintF(" CheckNotCharacterAfterAnd(c='u%04x', mask=0x%04x, label[%08x]);\n",
+ c,
+ mask,
+ on_not_equal);
+ assembler_->CheckNotCharacterAfterAnd(c, mask, on_not_equal);
+}
+
+
+void RegExpMacroAssemblerTracer::CheckNotCharacterAfterMinusAnd(
uc16 c,
+ uc16 minus,
uc16 mask,
Label* on_not_equal) {
- PrintF(" CheckNotCharacterAfterMinusOr(c='u%04x', mask=0x%04x, "
- "label[%08x]);\n", c, mask, on_not_equal);
- assembler_->CheckNotCharacterAfterMinusOr(c, mask, on_not_equal);
+ PrintF(" CheckNotCharacterAfterMinusAnd(c='u%04x', minus=%04x, mask=0x%04x, "
+ "label[%08x]);\n",
+ c,
+ minus,
+ mask,
+ on_not_equal);
+ assembler_->CheckNotCharacterAfterMinusAnd(c, minus, mask, on_not_equal);
}
« no previous file with comments | « src/regexp-macro-assembler-tracer.h ('k') | test/mjsunit/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698