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

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
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 1509
1510 1510
1511 // --- Strings --- 1511 // --- Strings ---
1512 1512
1513 1513
1514 DART_EXPORT bool Dart_IsString(Dart_Handle object) { 1514 DART_EXPORT bool Dart_IsString(Dart_Handle object) {
1515 return RawObject::IsStringClassId(Api::ClassId(object)); 1515 return RawObject::IsStringClassId(Api::ClassId(object));
1516 } 1516 }
1517 1517
1518 1518
1519 DART_EXPORT bool Dart_IsAsciiString(Dart_Handle object) { 1519 DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object) {
1520 return RawObject::IsOneByteStringClassId(Api::ClassId(object)); 1520 return RawObject::IsOneByteStringClassId(Api::ClassId(object));
1521 } 1521 }
1522 1522
1523 1523
1524 DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* len) { 1524 DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* len) {
1525 Isolate* isolate = Isolate::Current(); 1525 Isolate* isolate = Isolate::Current();
1526 DARTSCOPE(isolate); 1526 DARTSCOPE(isolate);
1527 const String& str_obj = Api::UnwrapStringHandle(isolate, str); 1527 const String& str_obj = Api::UnwrapStringHandle(isolate, str);
1528 if (str_obj.IsNull()) { 1528 if (str_obj.IsNull()) {
1529 RETURN_TYPE_ERROR(isolate, str, String); 1529 RETURN_TYPE_ERROR(isolate, str, String);
(...skipping 2960 matching lines...) Expand 10 before | Expand all | Expand 10 after
4490 } 4490 }
4491 { 4491 {
4492 NoGCScope no_gc; 4492 NoGCScope no_gc;
4493 RawObject* raw_obj = obj.raw(); 4493 RawObject* raw_obj = obj.raw();
4494 isolate->heap()->SetPeer(raw_obj, peer); 4494 isolate->heap()->SetPeer(raw_obj, peer);
4495 } 4495 }
4496 return Api::Success(isolate); 4496 return Api::Success(isolate);
4497 } 4497 }
4498 4498
4499 } // namespace dart 4499 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698