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

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

Issue 11419086: Use a signed 32-bit integer for representing code points. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add missing files 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/lib/string.cc ('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 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 Isolate* isolate = Isolate::Current(); 1564 Isolate* isolate = Isolate::Current();
1565 DARTSCOPE(isolate); 1565 DARTSCOPE(isolate);
1566 if (utf16_array == NULL && length != 0) { 1566 if (utf16_array == NULL && length != 0) {
1567 RETURN_NULL_ERROR(utf16_array); 1567 RETURN_NULL_ERROR(utf16_array);
1568 } 1568 }
1569 CHECK_LENGTH(length, String::kMaxElements); 1569 CHECK_LENGTH(length, String::kMaxElements);
1570 return Api::NewHandle(isolate, String::New(utf16_array, length)); 1570 return Api::NewHandle(isolate, String::New(utf16_array, length));
1571 } 1571 }
1572 1572
1573 1573
1574 DART_EXPORT Dart_Handle Dart_NewStringFromUTF32(const uint32_t* utf32_array, 1574 DART_EXPORT Dart_Handle Dart_NewStringFromUTF32(const int32_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(isolate, String::New(utf32_array, length)); 1582 return Api::NewHandle(isolate, String::New(utf32_array, length));
1583 } 1583 }
1584 1584
(...skipping 2907 matching lines...) Expand 10 before | Expand all | Expand 10 after
4492 } 4492 }
4493 { 4493 {
4494 NoGCScope no_gc; 4494 NoGCScope no_gc;
4495 RawObject* raw_obj = obj.raw(); 4495 RawObject* raw_obj = obj.raw();
4496 isolate->heap()->SetPeer(raw_obj, peer); 4496 isolate->heap()->SetPeer(raw_obj, peer);
4497 } 4497 }
4498 return Api::Success(isolate); 4498 return Api::Success(isolate);
4499 } 4499 }
4500 4500
4501 } // namespace dart 4501 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698