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

Unified Diff: runtime/lib/string.cc

Issue 11414249: Move various top-level Unicode definitions into classes and methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/string.cc
diff --git a/runtime/lib/string.cc b/runtime/lib/string.cc
index ed1528ed18d5a175e1088820d7c93b8f898675bd..b51bc60d314df9d77a5a2910015516acad6546ac 100644
--- a/runtime/lib/string.cc
+++ b/runtime/lib/string.cc
@@ -8,6 +8,7 @@
#include "vm/native_entry.h"
#include "vm/object.h"
#include "vm/symbols.h"
+#include "vm/unicode.h"
namespace dart {
@@ -34,10 +35,10 @@ DEFINE_NATIVE_ENTRY(StringBase_createFromCodePoints, 1) {
GrowableArray<const Object*> args;
Exceptions::ThrowByType(Exceptions::kArgument, args);
} else {
- if (value > 0xFF) {
+ if (!Utf::IsLatin1(value)) {
is_one_byte_string = false;
}
- if (value > 0xFFFF) {
+ if (!Utf::IsBmp(value)) {
siva 2012/11/30 02:42:53 if (Utf::IsSupplementary(value)) { ... } might
cshapiro 2012/11/30 03:21:24 A great idea. Done!
utf16_len += 1;
}
}
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698