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

Side by Side Diff: src/jsregexp.cc

Issue 141323007: Fix inconsistencies wrt whitespaces. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: new license header Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/dateparser.h ('k') | src/runtime.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 // 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 3579 matching lines...) Expand 10 before | Expand all | Expand 10 after
3590 } 3590 }
3591 3591
3592 private: 3592 private:
3593 static const int kAFew = 10; 3593 static const int kAFew = 10;
3594 ZoneList<AlternativeGeneration*> alt_gens_; 3594 ZoneList<AlternativeGeneration*> alt_gens_;
3595 AlternativeGeneration a_few_alt_gens_[kAFew]; 3595 AlternativeGeneration a_few_alt_gens_[kAFew];
3596 }; 3596 };
3597 3597
3598 3598
3599 // The '2' variant is has inclusive from and exclusive to. 3599 // The '2' variant is has inclusive from and exclusive to.
3600 static const int kSpaceRanges[] = { '\t', '\r' + 1, ' ', ' ' + 1, 0x00A0, 3600 // This covers \s as defined in ECMA-262 5.1, 15.10.2.12,
3601 0x00A1, 0x1680, 0x1681, 0x180E, 0x180F, 0x2000, 0x200B, 0x2028, 0x202A, 3601 // which include WhiteSpace (7.2) or LineTerminator (7.3) values.
3602 0x202F, 0x2030, 0x205F, 0x2060, 0x3000, 0x3001, 0xFEFF, 0xFF00, 0x10000 }; 3602 static const int kSpaceRanges[] = { '\t', '\r' + 1, ' ', ' ' + 1,
3603 0x00A0, 0x00A1, 0x1680, 0x1681, 0x180E, 0x180F, 0x2000, 0x200B,
3604 0x2028, 0x202A, 0x202F, 0x2030, 0x205F, 0x2060, 0x3000, 0x3001,
3605 0xFEFF, 0xFF00, 0x10000 };
3603 static const int kSpaceRangeCount = ARRAY_SIZE(kSpaceRanges); 3606 static const int kSpaceRangeCount = ARRAY_SIZE(kSpaceRanges);
3604 3607
3605 static const int kWordRanges[] = { 3608 static const int kWordRanges[] = {
3606 '0', '9' + 1, 'A', 'Z' + 1, '_', '_' + 1, 'a', 'z' + 1, 0x10000 }; 3609 '0', '9' + 1, 'A', 'Z' + 1, '_', '_' + 1, 'a', 'z' + 1, 0x10000 };
3607 static const int kWordRangeCount = ARRAY_SIZE(kWordRanges); 3610 static const int kWordRangeCount = ARRAY_SIZE(kWordRanges);
3608 static const int kDigitRanges[] = { '0', '9' + 1, 0x10000 }; 3611 static const int kDigitRanges[] = { '0', '9' + 1, 0x10000 };
3609 static const int kDigitRangeCount = ARRAY_SIZE(kDigitRanges); 3612 static const int kDigitRangeCount = ARRAY_SIZE(kDigitRanges);
3610 static const int kSurrogateRanges[] = { 0xd800, 0xe000, 0x10000 }; 3613 static const int kSurrogateRanges[] = { 0xd800, 0xe000, 0x10000 };
3611 static const int kSurrogateRangeCount = ARRAY_SIZE(kSurrogateRanges); 3614 static const int kSurrogateRangeCount = ARRAY_SIZE(kSurrogateRanges);
3612 static const int kLineTerminatorRanges[] = { 0x000A, 0x000B, 0x000D, 0x000E, 3615 static const int kLineTerminatorRanges[] = { 0x000A, 0x000B, 0x000D, 0x000E,
(...skipping 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
6113 } 6116 }
6114 6117
6115 return compiler.Assemble(&macro_assembler, 6118 return compiler.Assemble(&macro_assembler,
6116 node, 6119 node,
6117 data->capture_count, 6120 data->capture_count,
6118 pattern); 6121 pattern);
6119 } 6122 }
6120 6123
6121 6124
6122 }} // namespace v8::internal 6125 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/dateparser.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698