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

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

Issue 11411092: Revert "Add some support for the code-point code-unit distinction." (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/dart_api_message.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 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 1572
1573 1573
1574 DART_EXPORT Dart_Handle Dart_NewStringFromUTF32(const uint32_t* utf32_array, 1574 DART_EXPORT Dart_Handle Dart_NewStringFromUTF32(const uint32_t* utf32_array,
1575 intptr_t length) { 1575 intptr_t length) {
1576 Isolate* isolate = Isolate::Current(); 1576 Isolate* isolate = Isolate::Current();
1577 DARTSCOPE(isolate); 1577 DARTSCOPE(isolate);
1578 if (utf32_array == NULL && length != 0) { 1578 if (utf32_array == NULL && length != 0) {
1579 RETURN_NULL_ERROR(utf32_array); 1579 RETURN_NULL_ERROR(utf32_array);
1580 } 1580 }
1581 CHECK_LENGTH(length, String::kMaxElements); 1581 CHECK_LENGTH(length, String::kMaxElements);
1582 return Api::NewHandle( 1582 return Api::NewHandle(isolate, String::New(utf32_array, length));
1583 isolate,
1584 String::New(reinterpret_cast<const int32_t*>(utf32_array), length));
1585 } 1583 }
1586 1584
1587 1585
1588 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object) { 1586 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object) {
1589 return RawObject::IsExternalStringClassId(Api::ClassId(object)); 1587 return RawObject::IsExternalStringClassId(Api::ClassId(object));
1590 } 1588 }
1591 1589
1592 1590
1593 DART_EXPORT Dart_Handle Dart_ExternalStringGetPeer(Dart_Handle object, 1591 DART_EXPORT Dart_Handle Dart_ExternalStringGetPeer(Dart_Handle object,
1594 void** peer) { 1592 void** peer) {
(...skipping 2899 matching lines...) Expand 10 before | Expand all | Expand 10 after
4494 } 4492 }
4495 { 4493 {
4496 NoGCScope no_gc; 4494 NoGCScope no_gc;
4497 RawObject* raw_obj = obj.raw(); 4495 RawObject* raw_obj = obj.raw();
4498 isolate->heap()->SetPeer(raw_obj, peer); 4496 isolate->heap()->SetPeer(raw_obj, peer);
4499 } 4497 }
4500 return Api::Success(isolate); 4498 return Api::Success(isolate);
4501 } 4499 }
4502 4500
4503 } // namespace dart 4501 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/dart_api_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698