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

Side by Side Diff: src/unicode-cache-inl.h

Issue 1287893006: Separate UnicodeCache out into an own file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « src/unicode-cache.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_UNICODE_CACHE_INL_H_
6 #define V8_UNICODE_CACHE_INL_H_
7
8 #include "src/unicode-inl.h"
9 #include "src/unicode-cache.h"
10
11 namespace v8 {
12 namespace internal {
13
14 bool UnicodeCache::IsIdentifierStart(unibrow::uchar c) {
15 return kIsIdentifierStart.get(c);
16 }
17
18
19 bool UnicodeCache::IsIdentifierPart(unibrow::uchar c) {
20 return kIsIdentifierPart.get(c);
21 }
22
23
24 bool UnicodeCache::IsLineTerminator(unibrow::uchar c) {
25 return kIsLineTerminator.get(c);
26 }
27
28
29 bool UnicodeCache::IsLineTerminatorSequence(unibrow::uchar c,
30 unibrow::uchar next) {
31 if (!IsLineTerminator(c)) return false;
32 if (c == 0x000d && next == 0x000a) return false; // CR with following LF.
33 return true;
34 }
35
36
37 bool UnicodeCache::IsWhiteSpace(unibrow::uchar c) {
38 return kIsWhiteSpace.get(c);
39 }
40
41
42 bool UnicodeCache::IsWhiteSpaceOrLineTerminator(unibrow::uchar c) {
43 return kIsWhiteSpaceOrLineTerminator.get(c);
44 }
45
46 } // namespace internal
47 } // namespace v8
48
49 #endif // V8_UNICODE_CACHE_INL_H_
OLDNEW
« no previous file with comments | « src/unicode-cache.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698