OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/regexp/jsregexp.h" | 5 #include "src/regexp/jsregexp.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
(...skipping 3594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3605 AlternativeGeneration a_few_alt_gens_[kAFew]; | 3605 AlternativeGeneration a_few_alt_gens_[kAFew]; |
3606 }; | 3606 }; |
3607 | 3607 |
3608 | 3608 |
3609 static const uc32 kRangeEndMarker = 0x110000; | 3609 static const uc32 kRangeEndMarker = 0x110000; |
3610 | 3610 |
3611 // The '2' variant is has inclusive from and exclusive to. | 3611 // The '2' variant is has inclusive from and exclusive to. |
3612 // This covers \s as defined in ECMA-262 5.1, 15.10.2.12, | 3612 // This covers \s as defined in ECMA-262 5.1, 15.10.2.12, |
3613 // which include WhiteSpace (7.2) or LineTerminator (7.3) values. | 3613 // which include WhiteSpace (7.2) or LineTerminator (7.3) values. |
3614 static const int kSpaceRanges[] = { | 3614 static const int kSpaceRanges[] = { |
3615 '\t', '\r' + 1, ' ', ' ' + 1, 0x00A0, 0x00A1, 0x1680, 0x1681, | 3615 '\t', '\r' + 1, ' ', ' ' + 1, 0x00A0, 0x00A1, 0x1680, |
3616 0x180E, 0x180F, 0x2000, 0x200B, 0x2028, 0x202A, 0x202F, 0x2030, | 3616 0x1681, 0x2000, 0x200B, 0x2028, 0x202A, 0x202F, 0x2030, |
3617 0x205F, 0x2060, 0x3000, 0x3001, 0xFEFF, 0xFF00, kRangeEndMarker}; | 3617 0x205F, 0x2060, 0x3000, 0x3001, 0xFEFF, 0xFF00, kRangeEndMarker}; |
3618 static const int kSpaceRangeCount = arraysize(kSpaceRanges); | 3618 static const int kSpaceRangeCount = arraysize(kSpaceRanges); |
3619 | 3619 |
3620 static const int kWordRanges[] = { | 3620 static const int kWordRanges[] = { |
3621 '0', '9' + 1, 'A', 'Z' + 1, '_', '_' + 1, 'a', 'z' + 1, kRangeEndMarker}; | 3621 '0', '9' + 1, 'A', 'Z' + 1, '_', '_' + 1, 'a', 'z' + 1, kRangeEndMarker}; |
3622 static const int kWordRangeCount = arraysize(kWordRanges); | 3622 static const int kWordRangeCount = arraysize(kWordRanges); |
3623 static const int kDigitRanges[] = {'0', '9' + 1, kRangeEndMarker}; | 3623 static const int kDigitRanges[] = {'0', '9' + 1, kRangeEndMarker}; |
3624 static const int kDigitRangeCount = arraysize(kDigitRanges); | 3624 static const int kDigitRangeCount = arraysize(kDigitRanges); |
3625 static const int kSurrogateRanges[] = { | 3625 static const int kSurrogateRanges[] = { |
3626 kLeadSurrogateStart, kLeadSurrogateStart + 1, kRangeEndMarker}; | 3626 kLeadSurrogateStart, kLeadSurrogateStart + 1, kRangeEndMarker}; |
(...skipping 3237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6864 | 6864 |
6865 | 6865 |
6866 void RegExpResultsCache::Clear(FixedArray* cache) { | 6866 void RegExpResultsCache::Clear(FixedArray* cache) { |
6867 for (int i = 0; i < kRegExpResultsCacheSize; i++) { | 6867 for (int i = 0; i < kRegExpResultsCacheSize; i++) { |
6868 cache->set(i, Smi::kZero); | 6868 cache->set(i, Smi::kZero); |
6869 } | 6869 } |
6870 } | 6870 } |
6871 | 6871 |
6872 } // namespace internal | 6872 } // namespace internal |
6873 } // namespace v8 | 6873 } // namespace v8 |
OLD | NEW |