| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 while (!work_list.is_empty()) { | 1145 while (!work_list.is_empty()) { |
| 1146 work_list.RemoveLast()->Emit(this, &new_trace); | 1146 work_list.RemoveLast()->Emit(this, &new_trace); |
| 1147 } | 1147 } |
| 1148 if (reg_exp_too_big_) return IrregexpRegExpTooBig(zone_->isolate()); | 1148 if (reg_exp_too_big_) return IrregexpRegExpTooBig(zone_->isolate()); |
| 1149 | 1149 |
| 1150 Handle<HeapObject> code = macro_assembler_->GetCode(pattern); | 1150 Handle<HeapObject> code = macro_assembler_->GetCode(pattern); |
| 1151 heap->IncreaseTotalRegexpCodeGenerated(code->Size()); | 1151 heap->IncreaseTotalRegexpCodeGenerated(code->Size()); |
| 1152 work_list_ = NULL; | 1152 work_list_ = NULL; |
| 1153 #ifdef DEBUG | 1153 #ifdef DEBUG |
| 1154 if (FLAG_print_code) { | 1154 if (FLAG_print_code) { |
| 1155 Handle<Code>::cast(code)->Disassemble(*pattern->ToCString()); | 1155 CodeTracer::Scope trace_scope(heap->isolate()->GetCodeTracer()); |
| 1156 Handle<Code>::cast(code)->Disassemble(*pattern->ToCString(), |
| 1157 trace_scope.file()); |
| 1156 } | 1158 } |
| 1157 if (FLAG_trace_regexp_assembler) { | 1159 if (FLAG_trace_regexp_assembler) { |
| 1158 delete macro_assembler_; | 1160 delete macro_assembler_; |
| 1159 } | 1161 } |
| 1160 #endif | 1162 #endif |
| 1161 return RegExpEngine::CompilationResult(*code, next_register_); | 1163 return RegExpEngine::CompilationResult(*code, next_register_); |
| 1162 } | 1164 } |
| 1163 | 1165 |
| 1164 | 1166 |
| 1165 bool Trace::DeferredAction::Mentions(int that) { | 1167 bool Trace::DeferredAction::Mentions(int that) { |
| (...skipping 4952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6118 } | 6120 } |
| 6119 | 6121 |
| 6120 return compiler.Assemble(¯o_assembler, | 6122 return compiler.Assemble(¯o_assembler, |
| 6121 node, | 6123 node, |
| 6122 data->capture_count, | 6124 data->capture_count, |
| 6123 pattern); | 6125 pattern); |
| 6124 } | 6126 } |
| 6125 | 6127 |
| 6126 | 6128 |
| 6127 }} // namespace v8::internal | 6129 }} // namespace v8::internal |
| OLD | NEW |