OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 5816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5827 RegExpAtom* atom = text.atom(); | 5827 RegExpAtom* atom = text.atom(); |
5828 for (int j = 0; j < atom->length(); j++, offset++) { | 5828 for (int j = 0; j < atom->length(); j++, offset++) { |
5829 if (offset >= bm->length()) { | 5829 if (offset >= bm->length()) { |
5830 if (initial_offset == 0) set_bm_info(not_at_start, bm); | 5830 if (initial_offset == 0) set_bm_info(not_at_start, bm); |
5831 return; | 5831 return; |
5832 } | 5832 } |
5833 uc16 character = atom->data()[j]; | 5833 uc16 character = atom->data()[j]; |
5834 if (bm->compiler()->ignore_case()) { | 5834 if (bm->compiler()->ignore_case()) { |
5835 unibrow::uchar chars[unibrow::Ecma262UnCanonicalize::kMaxWidth]; | 5835 unibrow::uchar chars[unibrow::Ecma262UnCanonicalize::kMaxWidth]; |
5836 int length = GetCaseIndependentLetters( | 5836 int length = GetCaseIndependentLetters( |
5837 ISOLATE, | 5837 Isolate::Current(), |
5838 character, | 5838 character, |
5839 bm->max_char() == String::kMaxOneByteCharCode, | 5839 bm->max_char() == String::kMaxOneByteCharCode, |
5840 chars); | 5840 chars); |
5841 for (int j = 0; j < length; j++) { | 5841 for (int j = 0; j < length; j++) { |
5842 bm->Set(offset, chars[j]); | 5842 bm->Set(offset, chars[j]); |
5843 } | 5843 } |
5844 } else { | 5844 } else { |
5845 if (character <= max_char) bm->Set(offset, character); | 5845 if (character <= max_char) bm->Set(offset, character); |
5846 } | 5846 } |
5847 } | 5847 } |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6111 } | 6111 } |
6112 | 6112 |
6113 return compiler.Assemble(¯o_assembler, | 6113 return compiler.Assemble(¯o_assembler, |
6114 node, | 6114 node, |
6115 data->capture_count, | 6115 data->capture_count, |
6116 pattern); | 6116 pattern); |
6117 } | 6117 } |
6118 | 6118 |
6119 | 6119 |
6120 }} // namespace v8::internal | 6120 }} // namespace v8::internal |
OLD | NEW |