Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: src/regexp/jsregexp.h

Issue 1601653006: [regexp] back refs must not start/end in the middle of a surrogate pair (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@unicodeclass
Patch Set: rebase and addressed comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/regexp/jsregexp.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef V8_REGEXP_JSREGEXP_H_ 5 #ifndef V8_REGEXP_JSREGEXP_H_
6 #define V8_REGEXP_JSREGEXP_H_ 6 #define V8_REGEXP_JSREGEXP_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/regexp/regexp-ast.h" 10 #include "src/regexp/regexp-ast.h"
11 #include "src/regexp/regexp-macro-assembler.h"
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 15
15 class NodeVisitor; 16 class NodeVisitor;
16 class RegExpCompiler; 17 class RegExpCompiler;
17 class RegExpMacroAssembler; 18 class RegExpMacroAssembler;
18 class RegExpNode; 19 class RegExpNode;
19 class RegExpTree; 20 class RegExpTree;
20 class BoyerMooreLookahead; 21 class BoyerMooreLookahead;
21 22
22
23 static const uc32 kLeadSurrogateStart = 0xd800;
24 static const uc32 kLeadSurrogateEnd = 0xdbff;
25 static const uc32 kTrailSurrogateStart = 0xdc00;
26 static const uc32 kTrailSurrogateEnd = 0xdfff;
27 static const uc32 kNonBmpStart = 0x10000;
28 static const uc32 kNonBmpEnd = 0x10ffff;
29
30
31 class RegExpImpl { 23 class RegExpImpl {
32 public: 24 public:
33 // Whether V8 is compiled with native regexp support or not. 25 // Whether V8 is compiled with native regexp support or not.
34 static bool UsesNativeRegExp() { 26 static bool UsesNativeRegExp() {
35 #ifdef V8_INTERPRETED_REGEXP 27 #ifdef V8_INTERPRETED_REGEXP
36 return false; 28 return false;
37 #else 29 #else
38 return true; 30 return true;
39 #endif 31 #endif
40 } 32 }
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 static const int kStringOffset = 0; 1580 static const int kStringOffset = 0;
1589 static const int kPatternOffset = 1; 1581 static const int kPatternOffset = 1;
1590 static const int kArrayOffset = 2; 1582 static const int kArrayOffset = 2;
1591 static const int kLastMatchOffset = 3; 1583 static const int kLastMatchOffset = 3;
1592 }; 1584 };
1593 1585
1594 } // namespace internal 1586 } // namespace internal
1595 } // namespace v8 1587 } // namespace v8
1596 1588
1597 #endif // V8_REGEXP_JSREGEXP_H_ 1589 #endif // V8_REGEXP_JSREGEXP_H_
OLDNEW
« no previous file with comments | « no previous file | src/regexp/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698