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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 11365243: Revert OneByteString back to ISO Latin-1 instead of ASCII (Closed) Base URL: http://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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart.h" 10 #include "vm/dart.h"
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1510 1510
1511 1511
1512 // --- Strings --- 1512 // --- Strings ---
1513 1513
1514 1514
1515 DART_EXPORT bool Dart_IsString(Dart_Handle object) { 1515 DART_EXPORT bool Dart_IsString(Dart_Handle object) {
1516 return RawObject::IsStringClassId(Api::ClassId(object)); 1516 return RawObject::IsStringClassId(Api::ClassId(object));
1517 } 1517 }
1518 1518
1519 1519
1520 DART_EXPORT bool Dart_IsAsciiString(Dart_Handle object) { 1520 DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object) {
1521 return RawObject::IsOneByteStringClassId(Api::ClassId(object)); 1521 return RawObject::IsOneByteStringClassId(Api::ClassId(object));
1522 } 1522 }
1523 1523
1524 1524
1525 DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* len) { 1525 DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* len) {
1526 Isolate* isolate = Isolate::Current(); 1526 Isolate* isolate = Isolate::Current();
1527 DARTSCOPE(isolate); 1527 DARTSCOPE(isolate);
1528 const String& str_obj = Api::UnwrapStringHandle(isolate, str); 1528 const String& str_obj = Api::UnwrapStringHandle(isolate, str);
1529 if (str_obj.IsNull()) { 1529 if (str_obj.IsNull()) {
1530 RETURN_TYPE_ERROR(isolate, str, String); 1530 RETURN_TYPE_ERROR(isolate, str, String);
(...skipping 2935 matching lines...) Expand 10 before | Expand all | Expand 10 after
4466 } 4466 }
4467 { 4467 {
4468 NoGCScope no_gc; 4468 NoGCScope no_gc;
4469 RawObject* raw_obj = obj.raw(); 4469 RawObject* raw_obj = obj.raw();
4470 isolate->heap()->SetPeer(raw_obj, peer); 4470 isolate->heap()->SetPeer(raw_obj, peer);
4471 } 4471 }
4472 return Api::Success(isolate); 4472 return Api::Success(isolate);
4473 } 4473 }
4474 4474
4475 } // namespace dart 4475 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698