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

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

Issue 22897020: Fix signature of Dart_SetIntegerReturnValue. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 months 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/dart_api_impl.h ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 3838 matching lines...) Expand 10 before | Expand all | Expand 10 after
3849 3849
3850 3850
3851 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, 3851 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args,
3852 bool retval) { 3852 bool retval) {
3853 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3853 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3854 arguments->SetReturn(retval ? Bool::True() : Bool::False()); 3854 arguments->SetReturn(retval ? Bool::True() : Bool::False());
3855 } 3855 }
3856 3856
3857 3857
3858 DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args, 3858 DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args,
3859 intptr_t retval) { 3859 int64_t retval) {
3860 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3860 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3861 Isolate* isolate = arguments->isolate(); 3861 Isolate* isolate = arguments->isolate();
3862 CHECK_ISOLATE(isolate); 3862 CHECK_ISOLATE(isolate);
3863 if (Smi::IsValid64(retval)) { 3863 if (Smi::IsValid64(retval)) {
3864 Api::SetSmiReturnValue(arguments, retval); 3864 Api::SetSmiReturnValue(arguments, retval);
3865 } else { 3865 } else {
3866 // Slow path for Mints and Bigints. 3866 // Slow path for Mints and Bigints.
3867 ASSERT_CALLBACK_STATE(isolate); 3867 ASSERT_CALLBACK_STATE(isolate);
3868 Api::SetIntegerReturnValue(arguments, retval); 3868 Api::SetIntegerReturnValue(arguments, retval);
3869 } 3869 }
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
4351 } 4351 }
4352 { 4352 {
4353 NoGCScope no_gc; 4353 NoGCScope no_gc;
4354 RawObject* raw_obj = obj.raw(); 4354 RawObject* raw_obj = obj.raw();
4355 isolate->heap()->SetPeer(raw_obj, peer); 4355 isolate->heap()->SetPeer(raw_obj, peer);
4356 } 4356 }
4357 return Api::Success(); 4357 return Api::Success();
4358 } 4358 }
4359 4359
4360 } // namespace dart 4360 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698