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

Unified Diff: runtime/vm/symbols.cc

Issue 11368138: Add some support for the code-point code-unit distinction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Implemented feedback from patch set 3 Created 8 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
Index: runtime/vm/symbols.cc
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index 33c0ac6dd9c083c24dd94f95c247dd3b5a39c53c..f3332976ca7ddbe706f28da5cdd77384938dce14 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -97,7 +97,7 @@ RawString* Symbols::New(const char* str) {
Utf8::Type type;
intptr_t str_len = strlen(str);
const uint8_t* utf8_array = reinterpret_cast<const uint8_t*>(str);
- intptr_t len = Utf8::CodePointCount(utf8_array, str_len, &type);
+ intptr_t len = Utf8::CodeUnitCount(utf8_array, str_len, &type);
Zone* zone = Isolate::Current()->current_zone();
if (len == 0) {
return Symbols::New(reinterpret_cast<uint8_t*>(NULL), 0);
@@ -148,7 +148,6 @@ RawString* Symbols::New(const T* characters, intptr_t len) {
template RawString* Symbols::New(const uint8_t* characters, intptr_t len);
template RawString* Symbols::New(const uint16_t* characters, intptr_t len);
-template RawString* Symbols::New(const uint32_t* characters, intptr_t len);
RawString* Symbols::New(const String& str) {
@@ -276,11 +275,6 @@ template intptr_t Symbols::FindIndex(const Array& symbol_table,
const uint16_t* characters,
intptr_t len,
intptr_t hash);
-template intptr_t Symbols::FindIndex(const Array& symbol_table,
- const uint32_t* characters,
- intptr_t len,
- intptr_t hash);
-
intptr_t Symbols::FindIndex(const Array& symbol_table,
const String& str,

Powered by Google App Engine
This is Rietveld 408576698