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

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

Issue 700963002: Replace C++ bitfields with our own BitFields (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fixed AST node field sizes; more scanner fixes; undid hydrogen.h/cc changes Created 6 years, 1 month 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/unicode.h ('k') | src/utils.h » ('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 2007-2010 the V8 project authors. All rights reserved. 1 // Copyright 2007-2010 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_UNICODE_INL_H_ 5 #ifndef V8_UNICODE_INL_H_
6 #define V8_UNICODE_INL_H_ 6 #define V8_UNICODE_INL_H_
7 7
8 #include "src/unicode.h" 8 #include "src/unicode.h"
9 #include "src/base/logging.h" 9 #include "src/base/logging.h"
10 #include "src/utils.h" 10 #include "src/utils.h"
11 11
12 namespace unibrow { 12 namespace unibrow {
13 13
14 template <class T, int s> bool Predicate<T, s>::get(uchar code_point) { 14 template <class T, int s> bool Predicate<T, s>::get(uchar code_point) {
15 CacheEntry entry = entries_[code_point & kMask]; 15 CacheEntry entry = entries_[code_point & kMask];
16 if (entry.code_point_ == code_point) return entry.value_; 16 if (entry.code_point() == code_point) return entry.value();
17 return CalculateValue(code_point); 17 return CalculateValue(code_point);
18 } 18 }
19 19
20 template <class T, int s> bool Predicate<T, s>::CalculateValue( 20 template <class T, int s> bool Predicate<T, s>::CalculateValue(
21 uchar code_point) { 21 uchar code_point) {
22 bool result = T::Is(code_point); 22 bool result = T::Is(code_point);
23 entries_[code_point & kMask] = CacheEntry(code_point, result); 23 entries_[code_point & kMask] = CacheEntry(code_point, result);
24 return result; 24 return result;
25 } 25 }
26 26
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 return 3; 134 return 3;
135 } else { 135 } else {
136 return 4; 136 return 4;
137 } 137 }
138 } 138 }
139 139
140 } // namespace unibrow 140 } // namespace unibrow
141 141
142 #endif // V8_UNICODE_INL_H_ 142 #endif // V8_UNICODE_INL_H_
OLDNEW
« no previous file with comments | « src/unicode.h ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698