Index: src/regexp-macro-assembler-tracer.cc |
=================================================================== |
--- src/regexp-macro-assembler-tracer.cc (revision 5544) |
+++ src/regexp-macro-assembler-tracer.cc (working copy) |
@@ -47,15 +47,8 @@ |
} |
-// This is used for printing out debugging information. It makes an integer |
-// that is closely related to the address of an object. |
-static int IntForLabel(Label* label) { |
- return static_cast<int>(reinterpret_cast<intptr_t>(label)); |
-} |
- |
- |
void RegExpMacroAssemblerTracer::Bind(Label* label) { |
- PrintF("label[%08x]: (Bind)\n", IntForLabel(label)); |
+ PrintF("label[%08x]: (Bind)\n", label, label); |
assembler_->Bind(label); |
} |
@@ -67,7 +60,7 @@ |
void RegExpMacroAssemblerTracer::CheckGreedyLoop(Label* label) { |
- PrintF(" CheckGreedyLoop(label[%08x]);\n\n", IntForLabel(label)); |
+ PrintF(" CheckGreedyLoop(label[%08x]);\n\n", label); |
assembler_->CheckGreedyLoop(label); |
} |
@@ -91,13 +84,14 @@ |
void RegExpMacroAssemblerTracer::GoTo(Label* label) { |
- PrintF(" GoTo(label[%08x]);\n\n", IntForLabel(label)); |
+ PrintF(" GoTo(label[%08x]);\n\n", label); |
assembler_->GoTo(label); |
} |
void RegExpMacroAssemblerTracer::PushBacktrack(Label* label) { |
- PrintF(" PushBacktrack(label[%08x]);\n", IntForLabel(label)); |
+ PrintF(" PushBacktrack(label[%08x]);\n", |
+ label); |
assembler_->PushBacktrack(label); |
} |
@@ -182,7 +176,7 @@ |
const char* check_msg = check_bounds ? "" : " (unchecked)"; |
PrintF(" LoadCurrentCharacter(cp_offset=%d, label[%08x]%s (%d chars));\n", |
cp_offset, |
- IntForLabel(on_end_of_input), |
+ on_end_of_input, |
check_msg, |
characters); |
assembler_->LoadCurrentCharacter(cp_offset, |
@@ -193,43 +187,39 @@ |
void RegExpMacroAssemblerTracer::CheckCharacterLT(uc16 limit, Label* on_less) { |
- PrintF(" CheckCharacterLT(c='u%04x', label[%08x]);\n", |
- limit, IntForLabel(on_less)); |
+ PrintF(" CheckCharacterLT(c='u%04x', label[%08x]);\n", limit, on_less); |
assembler_->CheckCharacterLT(limit, on_less); |
} |
void RegExpMacroAssemblerTracer::CheckCharacterGT(uc16 limit, |
Label* on_greater) { |
- PrintF(" CheckCharacterGT(c='u%04x', label[%08x]);\n", |
- limit, IntForLabel(on_greater)); |
+ PrintF(" CheckCharacterGT(c='u%04x', label[%08x]);\n", limit, on_greater); |
assembler_->CheckCharacterGT(limit, on_greater); |
} |
void RegExpMacroAssemblerTracer::CheckCharacter(uint32_t c, Label* on_equal) { |
- PrintF(" CheckCharacter(c='u%04x', label[%08x]);\n", |
- c, IntForLabel(on_equal)); |
+ PrintF(" CheckCharacter(c='u%04x', label[%08x]);\n", c, on_equal); |
assembler_->CheckCharacter(c, on_equal); |
} |
void RegExpMacroAssemblerTracer::CheckAtStart(Label* on_at_start) { |
- PrintF(" CheckAtStart(label[%08x]);\n", IntForLabel(on_at_start)); |
+ PrintF(" CheckAtStart(label[%08x]);\n", on_at_start); |
assembler_->CheckAtStart(on_at_start); |
} |
void RegExpMacroAssemblerTracer::CheckNotAtStart(Label* on_not_at_start) { |
- PrintF(" CheckNotAtStart(label[%08x]);\n", IntForLabel(on_not_at_start)); |
+ PrintF(" CheckNotAtStart(label[%08x]);\n", on_not_at_start); |
assembler_->CheckNotAtStart(on_not_at_start); |
} |
void RegExpMacroAssemblerTracer::CheckNotCharacter(uint32_t c, |
Label* on_not_equal) { |
- PrintF(" CheckNotCharacter(c='u%04x', label[%08x]);\n", |
- c, IntForLabel(on_not_equal)); |
+ PrintF(" CheckNotCharacter(c='u%04x', label[%08x]);\n", c, on_not_equal); |
assembler_->CheckNotCharacter(c, on_not_equal); |
} |
@@ -241,7 +231,7 @@ |
PrintF(" CheckCharacterAfterAnd(c='u%04x', mask=0x%04x, label[%08x]);\n", |
c, |
mask, |
- IntForLabel(on_equal)); |
+ on_equal); |
assembler_->CheckCharacterAfterAnd(c, mask, on_equal); |
} |
@@ -253,7 +243,7 @@ |
PrintF(" CheckNotCharacterAfterAnd(c='u%04x', mask=0x%04x, label[%08x]);\n", |
c, |
mask, |
- IntForLabel(on_not_equal)); |
+ on_not_equal); |
assembler_->CheckNotCharacterAfterAnd(c, mask, on_not_equal); |
} |
@@ -268,7 +258,7 @@ |
c, |
minus, |
mask, |
- IntForLabel(on_not_equal)); |
+ on_not_equal); |
assembler_->CheckNotCharacterAfterMinusAnd(c, minus, mask, on_not_equal); |
} |
@@ -276,7 +266,7 @@ |
void RegExpMacroAssemblerTracer::CheckNotBackReference(int start_reg, |
Label* on_no_match) { |
PrintF(" CheckNotBackReference(register=%d, label[%08x]);\n", start_reg, |
- IntForLabel(on_no_match)); |
+ on_no_match); |
assembler_->CheckNotBackReference(start_reg, on_no_match); |
} |
@@ -285,7 +275,7 @@ |
int start_reg, |
Label* on_no_match) { |
PrintF(" CheckNotBackReferenceIgnoreCase(register=%d, label[%08x]);\n", |
- start_reg, IntForLabel(on_no_match)); |
+ start_reg, on_no_match); |
assembler_->CheckNotBackReferenceIgnoreCase(start_reg, on_no_match); |
} |
@@ -296,7 +286,7 @@ |
PrintF(" CheckNotRegistersEqual(reg1=%d, reg2=%d, label[%08x]);\n", |
reg1, |
reg2, |
- IntForLabel(on_not_equal)); |
+ on_not_equal); |
assembler_->CheckNotRegistersEqual(reg1, reg2, on_not_equal); |
} |
@@ -310,8 +300,7 @@ |
for (int i = 0; i < str.length(); i++) { |
PrintF("u%04x", str[i]); |
} |
- PrintF("\", cp_offset=%d, label[%08x])\n", |
- cp_offset, IntForLabel(on_failure)); |
+ PrintF("\", cp_offset=%d, label[%08x])\n", cp_offset, on_failure); |
assembler_->CheckCharacters(str, cp_offset, on_failure, check_end_of_string); |
} |
@@ -323,7 +312,7 @@ |
on_no_match); |
PrintF(" CheckSpecialCharacterClass(type='%c', label[%08x]): %s;\n", |
type, |
- IntForLabel(on_no_match), |
+ on_no_match, |
supported ? "true" : "false"); |
return supported; |
} |
@@ -332,7 +321,7 @@ |
void RegExpMacroAssemblerTracer::IfRegisterLT(int register_index, |
int comparand, Label* if_lt) { |
PrintF(" IfRegisterLT(register=%d, number=%d, label[%08x]);\n", |
- register_index, comparand, IntForLabel(if_lt)); |
+ register_index, comparand, if_lt); |
assembler_->IfRegisterLT(register_index, comparand, if_lt); |
} |
@@ -340,7 +329,7 @@ |
void RegExpMacroAssemblerTracer::IfRegisterEqPos(int register_index, |
Label* if_eq) { |
PrintF(" IfRegisterEqPos(register=%d, label[%08x]);\n", |
- register_index, IntForLabel(if_eq)); |
+ register_index, if_eq); |
assembler_->IfRegisterEqPos(register_index, if_eq); |
} |
@@ -348,7 +337,7 @@ |
void RegExpMacroAssemblerTracer::IfRegisterGE(int register_index, |
int comparand, Label* if_ge) { |
PrintF(" IfRegisterGE(register=%d, number=%d, label[%08x]);\n", |
- register_index, comparand, IntForLabel(if_ge)); |
+ register_index, comparand, if_ge); |
assembler_->IfRegisterGE(register_index, comparand, if_ge); |
} |