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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/unicode-cache.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/unicode-cache-inl.h
diff --git a/src/unicode-cache-inl.h b/src/unicode-cache-inl.h
new file mode 100644
index 0000000000000000000000000000000000000000..c5a8a69dab66ba50587a0f04d7a8d67481cc168b
--- /dev/null
+++ b/src/unicode-cache-inl.h
@@ -0,0 +1,49 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_UNICODE_CACHE_INL_H_
+#define V8_UNICODE_CACHE_INL_H_
+
+#include "src/unicode-inl.h"
+#include "src/unicode-cache.h"
+
+namespace v8 {
+namespace internal {
+
+bool UnicodeCache::IsIdentifierStart(unibrow::uchar c) {
+ return kIsIdentifierStart.get(c);
+}
+
+
+bool UnicodeCache::IsIdentifierPart(unibrow::uchar c) {
+ return kIsIdentifierPart.get(c);
+}
+
+
+bool UnicodeCache::IsLineTerminator(unibrow::uchar c) {
+ return kIsLineTerminator.get(c);
+}
+
+
+bool UnicodeCache::IsLineTerminatorSequence(unibrow::uchar c,
+ unibrow::uchar next) {
+ if (!IsLineTerminator(c)) return false;
+ if (c == 0x000d && next == 0x000a) return false; // CR with following LF.
+ return true;
+}
+
+
+bool UnicodeCache::IsWhiteSpace(unibrow::uchar c) {
+ return kIsWhiteSpace.get(c);
+}
+
+
+bool UnicodeCache::IsWhiteSpaceOrLineTerminator(unibrow::uchar c) {
+ return kIsWhiteSpaceOrLineTerminator.get(c);
+}
+
+} // namespace internal
+} // namespace v8
+
+#endif // V8_UNICODE_CACHE_INL_H_
« 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