| 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 ASSERT(Top::has_pending_exception()); | 610 ASSERT(Top::has_pending_exception()); |
| 611 return Handle<Object>::null(); | 611 return Handle<Object>::null(); |
| 612 } | 612 } |
| 613 ASSERT(res == RegExpMacroAssemblerIA32::SUCCESS | 613 ASSERT(res == RegExpMacroAssemblerIA32::SUCCESS |
| 614 || res == RegExpMacroAssemblerIA32::FAILURE); | 614 || res == RegExpMacroAssemblerIA32::FAILURE); |
| 615 | 615 |
| 616 rc = (res == RegExpMacroAssemblerIA32::SUCCESS); | 616 rc = (res == RegExpMacroAssemblerIA32::SUCCESS); |
| 617 #endif | 617 #endif |
| 618 } else { | 618 } else { |
| 619 bool is_ascii = StringShape(*subject).IsAsciiRepresentation(); | 619 bool is_ascii = StringShape(*subject).IsAsciiRepresentation(); |
| 620 if (!EnsureCompiledIrregexp(jsregexp, is_ascii)) { |
| 621 return Handle<Object>::null(); |
| 622 } |
| 620 for (int i = number_of_capture_registers - 1; i >= 0; i--) { | 623 for (int i = number_of_capture_registers - 1; i >= 0; i--) { |
| 621 offsets_vector[i] = -1; | 624 offsets_vector[i] = -1; |
| 622 } | 625 } |
| 623 Handle<ByteArray> byte_codes(IrregexpByteCode(*regexp, is_ascii)); | 626 Handle<ByteArray> byte_codes(IrregexpByteCode(*regexp, is_ascii)); |
| 624 | 627 |
| 625 rc = IrregexpInterpreter::Match(byte_codes, | 628 rc = IrregexpInterpreter::Match(byte_codes, |
| 626 subject, | 629 subject, |
| 627 offsets_vector, | 630 offsets_vector, |
| 628 previous_index); | 631 previous_index); |
| 629 } | 632 } |
| (...skipping 3983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4613 EmbeddedVector<byte, 1024> codes; | 4616 EmbeddedVector<byte, 1024> codes; |
| 4614 RegExpMacroAssemblerIrregexp macro_assembler(codes); | 4617 RegExpMacroAssemblerIrregexp macro_assembler(codes); |
| 4615 return compiler.Assemble(¯o_assembler, | 4618 return compiler.Assemble(¯o_assembler, |
| 4616 node, | 4619 node, |
| 4617 data->capture_count, | 4620 data->capture_count, |
| 4618 pattern); | 4621 pattern); |
| 4619 } | 4622 } |
| 4620 | 4623 |
| 4621 | 4624 |
| 4622 }} // namespace v8::internal | 4625 }} // namespace v8::internal |
| OLD | NEW |