| OLD | NEW |
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 } | 88 } |
| 89 | 89 |
| 90 | 90 |
| 91 void RegExpMacroAssemblerTracer::GoTo(Label* label) { | 91 void RegExpMacroAssemblerTracer::GoTo(Label* label) { |
| 92 PrintF(" GoTo(label[%08x]);\n\n", label); | 92 PrintF(" GoTo(label[%08x]);\n\n", label); |
| 93 assembler_->GoTo(label); | 93 assembler_->GoTo(label); |
| 94 } | 94 } |
| 95 | 95 |
| 96 | 96 |
| 97 void RegExpMacroAssemblerTracer::PushBacktrack(Label* label) { | 97 void RegExpMacroAssemblerTracer::PushBacktrack(Label* label) { |
| 98 PrintF(" PushBacktrack(label[%08x]);\n", label); | 98 PrintF(" PushBacktrack(label[%08x]);\n", |
| 99 label); |
| 99 assembler_->PushBacktrack(label); | 100 assembler_->PushBacktrack(label); |
| 100 } | 101 } |
| 101 | 102 |
| 102 | 103 |
| 103 void RegExpMacroAssemblerTracer::Succeed() { | 104 void RegExpMacroAssemblerTracer::Succeed() { |
| 104 PrintF(" Succeed();\n"); | 105 PrintF(" Succeed();\n"); |
| 105 assembler_->Succeed(); | 106 assembler_->Succeed(); |
| 106 } | 107 } |
| 107 | 108 |
| 108 | 109 |
| 109 void RegExpMacroAssemblerTracer::Fail() { | 110 void RegExpMacroAssemblerTracer::Fail() { |
| 110 PrintF(" Fail();\n"); | 111 PrintF(" Fail();\n"); |
| 111 assembler_->Fail(); | 112 assembler_->Fail(); |
| 112 } | 113 } |
| 113 | 114 |
| 114 | 115 |
| 115 void RegExpMacroAssemblerTracer::PopRegister(int register_index) { | 116 void RegExpMacroAssemblerTracer::PopRegister(int register_index) { |
| 116 PrintF(" PopRegister(register=%d);\n", register_index); | 117 PrintF(" PopRegister(register=%d);\n", register_index); |
| 117 assembler_->PopRegister(register_index); | 118 assembler_->PopRegister(register_index); |
| 118 } | 119 } |
| 119 | 120 |
| 120 | 121 |
| 121 void RegExpMacroAssemblerTracer::PushRegister(int register_index) { | 122 void RegExpMacroAssemblerTracer::PushRegister( |
| 122 PrintF(" PushRegister(register=%d);\n", register_index); | 123 int register_index, |
| 123 assembler_->PushRegister(register_index); | 124 StackCheckFlag check_stack_limit) { |
| 125 PrintF(" PushRegister(register=%d, %s);\n", |
| 126 register_index, |
| 127 check_stack_limit ? "check stack limit" : ""); |
| 128 assembler_->PushRegister(register_index, check_stack_limit); |
| 124 } | 129 } |
| 125 | 130 |
| 126 | 131 |
| 127 void RegExpMacroAssemblerTracer::AdvanceRegister(int reg, int by) { | 132 void RegExpMacroAssemblerTracer::AdvanceRegister(int reg, int by) { |
| 128 PrintF(" AdvanceRegister(register=%d, by=%d);\n", reg, by); | 133 PrintF(" AdvanceRegister(register=%d, by=%d);\n", reg, by); |
| 129 assembler_->AdvanceRegister(reg, by); | 134 assembler_->AdvanceRegister(reg, by); |
| 130 } | 135 } |
| 131 | 136 |
| 132 | 137 |
| 133 void RegExpMacroAssemblerTracer::SetRegister(int register_index, int to) { | 138 void RegExpMacroAssemblerTracer::SetRegister(int register_index, int to) { |
| 134 PrintF(" SetRegister(register=%d, to=%d);\n", register_index, to); | 139 PrintF(" SetRegister(register=%d, to=%d);\n", register_index, to); |
| 135 assembler_->SetRegister(register_index, to); | 140 assembler_->SetRegister(register_index, to); |
| 136 } | 141 } |
| 137 | 142 |
| 138 | 143 |
| 139 void RegExpMacroAssemblerTracer::WriteCurrentPositionToRegister(int reg, | 144 void RegExpMacroAssemblerTracer::WriteCurrentPositionToRegister(int reg, |
| 140 int cp_offset) { | 145 int cp_offset) { |
| 141 PrintF(" WriteCurrentPositionToRegister(register=%d,cp_offset=%d);\n", | 146 PrintF(" WriteCurrentPositionToRegister(register=%d,cp_offset=%d);\n", |
| 142 reg, | 147 reg, |
| 143 cp_offset); | 148 cp_offset); |
| 144 assembler_->WriteCurrentPositionToRegister(reg, cp_offset); | 149 assembler_->WriteCurrentPositionToRegister(reg, cp_offset); |
| 145 } | 150 } |
| 146 | 151 |
| 147 | 152 |
| 153 void RegExpMacroAssemblerTracer::ClearRegister(int reg) { |
| 154 PrintF(" ClearRegister(register=%d);\n", reg); |
| 155 assembler_->ClearRegister(reg); |
| 156 } |
| 157 |
| 158 |
| 148 void RegExpMacroAssemblerTracer::ReadCurrentPositionFromRegister(int reg) { | 159 void RegExpMacroAssemblerTracer::ReadCurrentPositionFromRegister(int reg) { |
| 149 PrintF(" ReadCurrentPositionFromRegister(register=%d);\n", reg); | 160 PrintF(" ReadCurrentPositionFromRegister(register=%d);\n", reg); |
| 150 assembler_->ReadCurrentPositionFromRegister(reg); | 161 assembler_->ReadCurrentPositionFromRegister(reg); |
| 151 } | 162 } |
| 152 | 163 |
| 153 | 164 |
| 154 void RegExpMacroAssemblerTracer::WriteStackPointerToRegister(int reg) { | 165 void RegExpMacroAssemblerTracer::WriteStackPointerToRegister(int reg) { |
| 155 PrintF(" WriteStackPointerToRegister(register=%d);\n", reg); | 166 PrintF(" WriteStackPointerToRegister(register=%d);\n", reg); |
| 156 assembler_->WriteStackPointerToRegister(reg); | 167 assembler_->WriteStackPointerToRegister(reg); |
| 157 } | 168 } |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 377 |
| 367 | 378 |
| 368 void RegExpMacroAssemblerTracer::IfRegisterLT(int register_index, | 379 void RegExpMacroAssemblerTracer::IfRegisterLT(int register_index, |
| 369 int comparand, Label* if_lt) { | 380 int comparand, Label* if_lt) { |
| 370 PrintF(" IfRegisterLT(register=%d, number=%d, label[%08x]);\n", | 381 PrintF(" IfRegisterLT(register=%d, number=%d, label[%08x]);\n", |
| 371 register_index, comparand, if_lt); | 382 register_index, comparand, if_lt); |
| 372 assembler_->IfRegisterLT(register_index, comparand, if_lt); | 383 assembler_->IfRegisterLT(register_index, comparand, if_lt); |
| 373 } | 384 } |
| 374 | 385 |
| 375 | 386 |
| 387 void RegExpMacroAssemblerTracer::IfRegisterEqPos(int register_index, |
| 388 Label* if_eq) { |
| 389 PrintF(" IfRegisterEqPos(register=%d, label[%08x]);\n", |
| 390 register_index, if_eq); |
| 391 assembler_->IfRegisterEqPos(register_index, if_eq); |
| 392 } |
| 393 |
| 394 |
| 376 void RegExpMacroAssemblerTracer::IfRegisterGE(int register_index, | 395 void RegExpMacroAssemblerTracer::IfRegisterGE(int register_index, |
| 377 int comparand, Label* if_ge) { | 396 int comparand, Label* if_ge) { |
| 378 PrintF(" IfRegisterGE(register=%d, number=%d, label[%08x]);\n", | 397 PrintF(" IfRegisterGE(register=%d, number=%d, label[%08x]);\n", |
| 379 register_index, comparand, if_ge); | 398 register_index, comparand, if_ge); |
| 380 assembler_->IfRegisterGE(register_index, comparand, if_ge); | 399 assembler_->IfRegisterGE(register_index, comparand, if_ge); |
| 381 } | 400 } |
| 382 | 401 |
| 383 | 402 |
| 384 RegExpMacroAssembler::IrregexpImplementation | 403 RegExpMacroAssembler::IrregexpImplementation |
| 385 RegExpMacroAssemblerTracer::Implementation() { | 404 RegExpMacroAssemblerTracer::Implementation() { |
| 386 return assembler_->Implementation(); | 405 return assembler_->Implementation(); |
| 387 } | 406 } |
| 388 | 407 |
| 389 | 408 |
| 390 Handle<Object> RegExpMacroAssemblerTracer::GetCode(Handle<String> source) { | 409 Handle<Object> RegExpMacroAssemblerTracer::GetCode(Handle<String> source) { |
| 391 PrintF(" GetCode(%s);\n", *(source->ToCString())); | 410 PrintF(" GetCode(%s);\n", *(source->ToCString())); |
| 392 return assembler_->GetCode(source); | 411 return assembler_->GetCode(source); |
| 393 } | 412 } |
| 394 | 413 |
| 395 }} // namespace v8::internal | 414 }} // namespace v8::internal |
| OLD | NEW |