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

Unified Diff: runtime/lib/double_patch.dart

Issue 351673002: Add class id constants fields to dart:_internal class 'ClassID'. Use the fields in the library (mor… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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
Index: runtime/lib/double_patch.dart
===================================================================
--- runtime/lib/double_patch.dart (revision 37613)
+++ runtime/lib/double_patch.dart (working copy)
@@ -16,9 +16,10 @@
final ccid = ClassID.getID(str);
_OneByteString oneByteString;
- // TODO(floitsch): Allow _ExternalOneByteStrings. As of May 2013 they don't
- // have any _classId.
- if (ccid != _OneByteString._classId) {
+ // TODO(Srdjan): Allow _ExternalOneByteStrings.
+ if (ccid == ClassID.cidOneByteString) {
+ oneByteString = str;
+ } else {
int length = str.length;
var s = _OneByteString._allocate(length);
for (int i = 0; i < length; i++) {
@@ -31,8 +32,6 @@
}
}
oneByteString = s;
- } else {
- oneByteString = str;
}
return _native_parse(oneByteString);
« no previous file with comments | « runtime/lib/array.dart ('k') | runtime/lib/growable_array.dart » ('j') | runtime/vm/symbols.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698