| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 Trace new_trace; | 868 Trace new_trace; |
| 869 start->Emit(this, &new_trace); | 869 start->Emit(this, &new_trace); |
| 870 macro_assembler_->Bind(&fail); | 870 macro_assembler_->Bind(&fail); |
| 871 macro_assembler_->Fail(); | 871 macro_assembler_->Fail(); |
| 872 while (!work_list.is_empty()) { | 872 while (!work_list.is_empty()) { |
| 873 work_list.RemoveLast()->Emit(this, &new_trace); | 873 work_list.RemoveLast()->Emit(this, &new_trace); |
| 874 } | 874 } |
| 875 if (reg_exp_too_big_) return IrregexpRegExpTooBig(); | 875 if (reg_exp_too_big_) return IrregexpRegExpTooBig(); |
| 876 | 876 |
| 877 Handle<Object> code = macro_assembler_->GetCode(pattern); | 877 Handle<Object> code = macro_assembler_->GetCode(pattern); |
| 878 | |
| 879 work_list_ = NULL; | 878 work_list_ = NULL; |
| 880 #ifdef DEBUG | 879 #ifdef DEBUG |
| 880 if (FLAG_print_code) { |
| 881 Handle<Code>::cast(code)->Disassemble(*pattern->ToCString()); |
| 882 } |
| 881 if (FLAG_trace_regexp_assembler) { | 883 if (FLAG_trace_regexp_assembler) { |
| 882 delete macro_assembler_; | 884 delete macro_assembler_; |
| 883 } | 885 } |
| 884 #endif | 886 #endif |
| 885 return RegExpEngine::CompilationResult(*code, next_register_); | 887 return RegExpEngine::CompilationResult(*code, next_register_); |
| 886 } | 888 } |
| 887 | 889 |
| 888 | 890 |
| 889 bool Trace::DeferredAction::Mentions(int that) { | 891 bool Trace::DeferredAction::Mentions(int that) { |
| 890 if (type() == ActionNode::CLEAR_CAPTURES) { | 892 if (type() == ActionNode::CLEAR_CAPTURES) { |
| (...skipping 4464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5355 } | 5357 } |
| 5356 | 5358 |
| 5357 return compiler.Assemble(¯o_assembler, | 5359 return compiler.Assemble(¯o_assembler, |
| 5358 node, | 5360 node, |
| 5359 data->capture_count, | 5361 data->capture_count, |
| 5360 pattern); | 5362 pattern); |
| 5361 } | 5363 } |
| 5362 | 5364 |
| 5363 | 5365 |
| 5364 }} // namespace v8::internal | 5366 }} // namespace v8::internal |
| OLD | NEW |