| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 assembler_->CheckGreedyLoop(label); | 69 assembler_->CheckGreedyLoop(label); |
| 70 } | 70 } |
| 71 | 71 |
| 72 | 72 |
| 73 void RegExpMacroAssemblerTracer::PopCurrentPosition() { | 73 void RegExpMacroAssemblerTracer::PopCurrentPosition() { |
| 74 PrintF(" PopCurrentPosition();\n"); | 74 PrintF(" PopCurrentPosition();\n"); |
| 75 assembler_->PopCurrentPosition(); | 75 assembler_->PopCurrentPosition(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 | 78 |
| 79 void RegExpMacroAssemblerTracer::PushCurrentPosition() { | 79 void RegExpMacroAssemblerTracer::PushCurrentPosition( |
| 80 PrintF(" PushCurrentPosition();\n"); | 80 StackCheckFlag check_stack_limit) { |
| 81 assembler_->PushCurrentPosition(); | 81 PrintF(" PushCurrentPosition(%s);\n", |
| 82 check_stack_limit ? "check stack limit" : ""); |
| 83 assembler_->PushCurrentPosition(check_stack_limit); |
| 82 } | 84 } |
| 83 | 85 |
| 84 | 86 |
| 85 void RegExpMacroAssemblerTracer::Backtrack() { | 87 void RegExpMacroAssemblerTracer::Backtrack() { |
| 86 PrintF(" Backtrack();\n"); | 88 PrintF(" Backtrack();\n"); |
| 87 assembler_->Backtrack(); | 89 assembler_->Backtrack(); |
| 88 } | 90 } |
| 89 | 91 |
| 90 | 92 |
| 91 void RegExpMacroAssemblerTracer::GoTo(Label* label) { | 93 void RegExpMacroAssemblerTracer::GoTo(Label* label) { |
| 92 PrintF(" GoTo(label[%08x]);\n\n", label); | 94 PrintF(" GoTo(label[%08x]);\n\n", label); |
| 93 assembler_->GoTo(label); | 95 assembler_->GoTo(label); |
| 94 } | 96 } |
| 95 | 97 |
| 96 | 98 |
| 97 void RegExpMacroAssemblerTracer::PushBacktrack(Label* label) { | 99 void RegExpMacroAssemblerTracer::PushBacktrack( |
| 98 PrintF(" PushBacktrack(label[%08x]);\n", label); | 100 Label* label, |
| 99 assembler_->PushBacktrack(label); | 101 StackCheckFlag check_stack_limit) { |
| 102 PrintF(" PushBacktrack(label[%08x], %s);\n", |
| 103 label, |
| 104 check_stack_limit ? "check stack limit" : ""); |
| 105 assembler_->PushBacktrack(label, check_stack_limit); |
| 100 } | 106 } |
| 101 | 107 |
| 102 | 108 |
| 103 void RegExpMacroAssemblerTracer::Succeed() { | 109 void RegExpMacroAssemblerTracer::Succeed() { |
| 104 PrintF(" Succeed();\n"); | 110 PrintF(" Succeed();\n"); |
| 105 assembler_->Succeed(); | 111 assembler_->Succeed(); |
| 106 } | 112 } |
| 107 | 113 |
| 108 | 114 |
| 109 void RegExpMacroAssemblerTracer::Fail() { | 115 void RegExpMacroAssemblerTracer::Fail() { |
| 110 PrintF(" Fail();\n"); | 116 PrintF(" Fail();\n"); |
| 111 assembler_->Fail(); | 117 assembler_->Fail(); |
| 112 } | 118 } |
| 113 | 119 |
| 114 | 120 |
| 115 void RegExpMacroAssemblerTracer::PopRegister(int register_index) { | 121 void RegExpMacroAssemblerTracer::PopRegister(int register_index) { |
| 116 PrintF(" PopRegister(register=%d);\n", register_index); | 122 PrintF(" PopRegister(register=%d);\n", register_index); |
| 117 assembler_->PopRegister(register_index); | 123 assembler_->PopRegister(register_index); |
| 118 } | 124 } |
| 119 | 125 |
| 120 | 126 |
| 121 void RegExpMacroAssemblerTracer::PushRegister(int register_index) { | 127 void RegExpMacroAssemblerTracer::PushRegister( |
| 122 PrintF(" PushRegister(register=%d);\n", register_index); | 128 int register_index, |
| 123 assembler_->PushRegister(register_index); | 129 StackCheckFlag check_stack_limit) { |
| 130 PrintF(" PushRegister(register=%d, %s);\n", |
| 131 register_index, |
| 132 check_stack_limit ? "check stack limit" : ""); |
| 133 assembler_->PushRegister(register_index, check_stack_limit); |
| 124 } | 134 } |
| 125 | 135 |
| 126 | 136 |
| 127 void RegExpMacroAssemblerTracer::AdvanceRegister(int reg, int by) { | 137 void RegExpMacroAssemblerTracer::AdvanceRegister(int reg, int by) { |
| 128 PrintF(" AdvanceRegister(register=%d, by=%d);\n", reg, by); | 138 PrintF(" AdvanceRegister(register=%d, by=%d);\n", reg, by); |
| 129 assembler_->AdvanceRegister(reg, by); | 139 assembler_->AdvanceRegister(reg, by); |
| 130 } | 140 } |
| 131 | 141 |
| 132 | 142 |
| 133 void RegExpMacroAssemblerTracer::SetRegister(int register_index, int to) { | 143 void RegExpMacroAssemblerTracer::SetRegister(int register_index, int to) { |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 return assembler_->Implementation(); | 404 return assembler_->Implementation(); |
| 395 } | 405 } |
| 396 | 406 |
| 397 | 407 |
| 398 Handle<Object> RegExpMacroAssemblerTracer::GetCode(Handle<String> source) { | 408 Handle<Object> RegExpMacroAssemblerTracer::GetCode(Handle<String> source) { |
| 399 PrintF(" GetCode(%s);\n", *(source->ToCString())); | 409 PrintF(" GetCode(%s);\n", *(source->ToCString())); |
| 400 return assembler_->GetCode(source); | 410 return assembler_->GetCode(source); |
| 401 } | 411 } |
| 402 | 412 |
| 403 }} // namespace v8::internal | 413 }} // namespace v8::internal |
| OLD | NEW |