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

Unified Diff: runtime/vm/unibrow-inl.h

Issue 683433003: Integrate the Irregexp Regular Expression Engine. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: more comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/unibrow.cc ('k') | runtime/vm/unicode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unibrow-inl.h
diff --git a/runtime/vm/unibrow-inl.h b/runtime/vm/unibrow-inl.h
index a7e3b22d00811961b981ac0f405cf5bca2966e6c..340d1be65d01052f6c778940eb55cdec12c2c06e 100644
--- a/runtime/vm/unibrow-inl.h
+++ b/runtime/vm/unibrow-inl.h
@@ -7,14 +7,12 @@
#include "vm/unibrow.h"
-// SNIP
+#include "platform/assert.h"
namespace unibrow {
-// SNIP
-
-template <class T, int s> int Mapping<T, s>::get(uchar c, uchar n,
- uchar* result) {
+template <class T, intptr_t s> intptr_t Mapping<T, s>::get(
+ int32_t c, int32_t n, int32_t* result) {
CacheEntry entry = entries_[c & kMask];
if (entry.code_point_ == c) {
if (entry.offset_ == 0) {
@@ -28,10 +26,10 @@ template <class T, int s> int Mapping<T, s>::get(uchar c, uchar n,
}
}
-template <class T, int s> int Mapping<T, s>::CalculateValue(uchar c, uchar n,
- uchar* result) {
+template <class T, intptr_t s> intptr_t Mapping<T, s>::CalculateValue(
+ int32_t c, int32_t n, int32_t* result) {
bool allow_caching = true;
- int length = T::Convert(c, n, result, &allow_caching);
+ intptr_t length = T::Convert(c, n, result, &allow_caching);
if (allow_caching) {
if (length == 1) {
entries_[c & kMask] = CacheEntry(c, result[0] - c);
@@ -45,8 +43,6 @@ template <class T, int s> int Mapping<T, s>::CalculateValue(uchar c, uchar n,
}
}
-// SNIP
-
} // namespace unibrow
#endif // VM_UNIBROW_INL_H_
« no previous file with comments | « runtime/vm/unibrow.cc ('k') | runtime/vm/unicode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698