| OLD | NEW |
| 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 1496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1507 | 1507 |
| 1508 | 1508 |
| 1509 // --- Strings --- | 1509 // --- Strings --- |
| 1510 | 1510 |
| 1511 | 1511 |
| 1512 DART_EXPORT bool Dart_IsString(Dart_Handle object) { | 1512 DART_EXPORT bool Dart_IsString(Dart_Handle object) { |
| 1513 return RawObject::IsStringClassId(Api::ClassId(object)); | 1513 return RawObject::IsStringClassId(Api::ClassId(object)); |
| 1514 } | 1514 } |
| 1515 | 1515 |
| 1516 | 1516 |
| 1517 DART_EXPORT bool Dart_IsAsciiString(Dart_Handle object) { | 1517 DART_EXPORT bool Dart_IsISOLatin1String(Dart_Handle object) { |
| 1518 return RawObject::IsOneByteStringClassId(Api::ClassId(object)); | 1518 return RawObject::IsOneByteStringClassId(Api::ClassId(object)); |
| 1519 } | 1519 } |
| 1520 | 1520 |
| 1521 | 1521 |
| 1522 DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* len) { | 1522 DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* len) { |
| 1523 Isolate* isolate = Isolate::Current(); | 1523 Isolate* isolate = Isolate::Current(); |
| 1524 DARTSCOPE(isolate); | 1524 DARTSCOPE(isolate); |
| 1525 const String& str_obj = Api::UnwrapStringHandle(isolate, str); | 1525 const String& str_obj = Api::UnwrapStringHandle(isolate, str); |
| 1526 if (str_obj.IsNull()) { | 1526 if (str_obj.IsNull()) { |
| 1527 RETURN_TYPE_ERROR(isolate, str, String); | 1527 RETURN_TYPE_ERROR(isolate, str, String); |
| (...skipping 2935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4463 } | 4463 } |
| 4464 { | 4464 { |
| 4465 NoGCScope no_gc; | 4465 NoGCScope no_gc; |
| 4466 RawObject* raw_obj = obj.raw(); | 4466 RawObject* raw_obj = obj.raw(); |
| 4467 isolate->heap()->SetPeer(raw_obj, peer); | 4467 isolate->heap()->SetPeer(raw_obj, peer); |
| 4468 } | 4468 } |
| 4469 return Api::Success(isolate); | 4469 return Api::Success(isolate); |
| 4470 } | 4470 } |
| 4471 | 4471 |
| 4472 } // namespace dart | 4472 } // namespace dart |
| OLD | NEW |