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

Side by Side Diff: src/jsregexp.cc

Issue 9426032: Fix RegExp white-space character class to match BOMs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | « no previous file | test/mjsunit/regexp.js » ('j') | test/sputnik/sputnik.status » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3579 matching lines...) Expand 10 before | Expand all | Expand 10 after
3590 printer.PrintNode(label, node); 3590 printer.PrintNode(label, node);
3591 } 3591 }
3592 3592
3593 3593
3594 #endif // DEBUG 3594 #endif // DEBUG
3595 3595
3596 3596
3597 // ------------------------------------------------------------------- 3597 // -------------------------------------------------------------------
3598 // Tree to graph conversion 3598 // Tree to graph conversion
3599 3599
3600 static const int kSpaceRangeCount = 20; 3600 static const int kSpaceRangeCount = 22;
rossberg 2012/02/20 16:03:19 Not your code, but can't we compute this constant
Michael Starzinger 2012/02/20 16:34:00 Done.
3601 static const int kSpaceRangeAsciiCount = 4;
3602 static const uc16 kSpaceRanges[kSpaceRangeCount] = { 0x0009, 0x000D, 0x0020, 3601 static const uc16 kSpaceRanges[kSpaceRangeCount] = { 0x0009, 0x000D, 0x0020,
3603 0x0020, 0x00A0, 0x00A0, 0x1680, 0x1680, 0x180E, 0x180E, 0x2000, 0x200A, 3602 0x0020, 0x00A0, 0x00A0, 0x1680, 0x1680, 0x180E, 0x180E, 0x2000, 0x200A,
3604 0x2028, 0x2029, 0x202F, 0x202F, 0x205F, 0x205F, 0x3000, 0x3000 }; 3603 0x2028, 0x2029, 0x202F, 0x202F, 0x205F, 0x205F, 0x3000, 0x3000, 0xFEFF,
3604 0xFEFF };
3605 3605
3606 static const int kWordRangeCount = 8; 3606 static const int kWordRangeCount = 8;
3607 static const uc16 kWordRanges[kWordRangeCount] = { '0', '9', 'A', 'Z', '_', 3607 static const uc16 kWordRanges[kWordRangeCount] = { '0', '9', 'A', 'Z', '_',
3608 '_', 'a', 'z' }; 3608 '_', 'a', 'z' };
3609 3609
3610 static const int kDigitRangeCount = 2; 3610 static const int kDigitRangeCount = 2;
3611 static const uc16 kDigitRanges[kDigitRangeCount] = { '0', '9' }; 3611 static const uc16 kDigitRanges[kDigitRangeCount] = { '0', '9' };
3612 3612
3613 static const int kLineTerminatorRangeCount = 6; 3613 static const int kLineTerminatorRangeCount = 6;
3614 static const uc16 kLineTerminatorRanges[kLineTerminatorRangeCount] = { 0x000A, 3614 static const uc16 kLineTerminatorRanges[kLineTerminatorRangeCount] = { 0x000A,
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
5334 } 5334 }
5335 5335
5336 return compiler.Assemble(&macro_assembler, 5336 return compiler.Assemble(&macro_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
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regexp.js » ('j') | test/sputnik/sputnik.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698