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 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 bool RegExpNode::EmitQuickCheck(RegExpCompiler* compiler, | 1716 bool RegExpNode::EmitQuickCheck(RegExpCompiler* compiler, |
1717 Trace* trace, | 1717 Trace* trace, |
1718 bool preload_has_checked_bounds, | 1718 bool preload_has_checked_bounds, |
1719 Label* on_possible_success, | 1719 Label* on_possible_success, |
1720 QuickCheckDetails* details, | 1720 QuickCheckDetails* details, |
1721 bool fall_through_on_failure) { | 1721 bool fall_through_on_failure) { |
1722 if (details->characters() == 0) return false; | 1722 if (details->characters() == 0) return false; |
1723 GetQuickCheckDetails(details, compiler, 0, trace->at_start() == Trace::FALSE); | 1723 GetQuickCheckDetails(details, compiler, 0, trace->at_start() == Trace::FALSE); |
1724 if (details->cannot_match()) return false; | 1724 if (details->cannot_match()) return false; |
1725 if (!details->Rationalize(compiler->ascii())) return false; | 1725 if (!details->Rationalize(compiler->ascii())) return false; |
1726 if (details->characters() > 1 && | 1726 ASSERT(details->characters() == 1 || |
1727 !compiler->macro_assembler()->CanReadUnaligned()) return false; | 1727 compiler->macro_assembler()->CanReadUnaligned()); |
1728 uint32_t mask = details->mask(); | 1728 uint32_t mask = details->mask(); |
1729 uint32_t value = details->value(); | 1729 uint32_t value = details->value(); |
1730 | 1730 |
1731 RegExpMacroAssembler* assembler = compiler->macro_assembler(); | 1731 RegExpMacroAssembler* assembler = compiler->macro_assembler(); |
1732 | 1732 |
1733 if (trace->characters_preloaded() != details->characters()) { | 1733 if (trace->characters_preloaded() != details->characters()) { |
1734 assembler->LoadCurrentCharacter(trace->cp_offset(), | 1734 assembler->LoadCurrentCharacter(trace->cp_offset(), |
1735 trace->backtrack(), | 1735 trace->backtrack(), |
1736 !preload_has_checked_bounds, | 1736 !preload_has_checked_bounds, |
1737 details->characters()); | 1737 details->characters()); |
(...skipping 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4486 RegExpMacroAssemblerIrregexp macro_assembler(codes); | 4486 RegExpMacroAssemblerIrregexp macro_assembler(codes); |
4487 #endif | 4487 #endif |
4488 | 4488 |
4489 return compiler.Assemble(¯o_assembler, | 4489 return compiler.Assemble(¯o_assembler, |
4490 node, | 4490 node, |
4491 data->capture_count, | 4491 data->capture_count, |
4492 pattern); | 4492 pattern); |
4493 } | 4493 } |
4494 | 4494 |
4495 }} // namespace v8::internal | 4495 }} // namespace v8::internal |
OLD | NEW |