| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2629 bound_checked_up_to_ = Max(0, bound_checked_up_to_ - by); | 2629 bound_checked_up_to_ = Max(0, bound_checked_up_to_ - by); |
| 2630 } | 2630 } |
| 2631 | 2631 |
| 2632 | 2632 |
| 2633 void TextNode::MakeCaseIndependent(bool is_ascii) { | 2633 void TextNode::MakeCaseIndependent(bool is_ascii) { |
| 2634 int element_count = elms_->length(); | 2634 int element_count = elms_->length(); |
| 2635 for (int i = 0; i < element_count; i++) { | 2635 for (int i = 0; i < element_count; i++) { |
| 2636 TextElement elm = elms_->at(i); | 2636 TextElement elm = elms_->at(i); |
| 2637 if (elm.type == TextElement::CHAR_CLASS) { | 2637 if (elm.type == TextElement::CHAR_CLASS) { |
| 2638 RegExpCharacterClass* cc = elm.data.u_char_class; | 2638 RegExpCharacterClass* cc = elm.data.u_char_class; |
| 2639 // None of the standard character classses is different in the case | 2639 // None of the standard character classes is different in the case |
| 2640 // independent case and it slows us down if we don't know that. | 2640 // independent case and it slows us down if we don't know that. |
| 2641 if (cc->is_standard()) continue; | 2641 if (cc->is_standard()) continue; |
| 2642 ZoneList<CharacterRange>* ranges = cc->ranges(); | 2642 ZoneList<CharacterRange>* ranges = cc->ranges(); |
| 2643 int range_count = ranges->length(); | 2643 int range_count = ranges->length(); |
| 2644 for (int j = 0; j < range_count; j++) { | 2644 for (int j = 0; j < range_count; j++) { |
| 2645 ranges->at(j).AddCaseEquivalents(ranges, is_ascii); | 2645 ranges->at(j).AddCaseEquivalents(ranges, is_ascii); |
| 2646 } | 2646 } |
| 2647 } | 2647 } |
| 2648 } | 2648 } |
| 2649 } | 2649 } |
| (...skipping 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5334 } | 5334 } |
| 5335 | 5335 |
| 5336 return compiler.Assemble(¯o_assembler, | 5336 return compiler.Assemble(¯o_assembler, |
| 5337 node, | 5337 node, |
| 5338 data->capture_count, | 5338 data->capture_count, |
| 5339 pattern); | 5339 pattern); |
| 5340 } | 5340 } |
| 5341 | 5341 |
| 5342 | 5342 |
| 5343 }} // namespace v8::internal | 5343 }} // namespace v8::internal |
| OLD | NEW |