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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 Trace new_trace; | 853 Trace new_trace; |
854 start->Emit(this, &new_trace); | 854 start->Emit(this, &new_trace); |
855 macro_assembler_->Bind(&fail); | 855 macro_assembler_->Bind(&fail); |
856 macro_assembler_->Fail(); | 856 macro_assembler_->Fail(); |
857 while (!work_list.is_empty()) { | 857 while (!work_list.is_empty()) { |
858 work_list.RemoveLast()->Emit(this, &new_trace); | 858 work_list.RemoveLast()->Emit(this, &new_trace); |
859 } | 859 } |
860 if (reg_exp_too_big_) return IrregexpRegExpTooBig(); | 860 if (reg_exp_too_big_) return IrregexpRegExpTooBig(); |
861 | 861 |
862 Handle<Object> code = macro_assembler_->GetCode(pattern); | 862 Handle<Object> code = macro_assembler_->GetCode(pattern); |
863 | 863 if (FLAG_print_code) { |
| 864 Handle<Code>::cast(code)->Disassemble(*pattern->ToCString()); |
| 865 } |
864 work_list_ = NULL; | 866 work_list_ = NULL; |
865 #ifdef DEBUG | 867 #ifdef DEBUG |
866 if (FLAG_trace_regexp_assembler) { | 868 if (FLAG_trace_regexp_assembler) { |
867 delete macro_assembler_; | 869 delete macro_assembler_; |
868 } | 870 } |
869 #endif | 871 #endif |
870 return RegExpEngine::CompilationResult(*code, next_register_); | 872 return RegExpEngine::CompilationResult(*code, next_register_); |
871 } | 873 } |
872 | 874 |
873 | 875 |
(...skipping 4459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5333 node, | 5335 node, |
5334 data->capture_count, | 5336 data->capture_count, |
5335 pattern); | 5337 pattern); |
5336 } | 5338 } |
5337 | 5339 |
5338 | 5340 |
5339 int OffsetsVector::static_offsets_vector_[ | 5341 int OffsetsVector::static_offsets_vector_[ |
5340 OffsetsVector::kStaticOffsetsVectorSize]; | 5342 OffsetsVector::kStaticOffsetsVectorSize]; |
5341 | 5343 |
5342 }} // namespace v8::internal | 5344 }} // namespace v8::internal |
OLD | NEW |