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

Side by Side Diff: vm/dart_api_impl.cc

Issue 10919039: The forward declaration of Dart_SetReturnValue in native_arguments.h (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 3 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 | « no previous file | vm/native_arguments.h » ('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 3698 matching lines...) Expand 10 before | Expand all | Expand 10 after
3709 return Api::NewHandle(isolate, arguments->At(index)); 3709 return Api::NewHandle(isolate, arguments->At(index));
3710 } 3710 }
3711 3711
3712 3712
3713 DART_EXPORT int Dart_GetNativeArgumentCount(Dart_NativeArguments args) { 3713 DART_EXPORT int Dart_GetNativeArgumentCount(Dart_NativeArguments args) {
3714 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3714 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3715 return arguments->Count(); 3715 return arguments->Count();
3716 } 3716 }
3717 3717
3718 3718
3719 DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, 3719 // This function has friend access to SetReturnUnsafe.
3720 Dart_Handle retval) { 3720 void SetReturnValueHelper(Dart_NativeArguments args, Dart_Handle retval) {
3721 NoGCScope no_gc_scope; 3721 NoGCScope no_gc_scope;
3722 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args); 3722 NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
3723 arguments->SetReturnUnsafe(Api::UnwrapHandle(retval)); 3723 arguments->SetReturnUnsafe(Api::UnwrapHandle(retval));
3724 } 3724 }
3725 3725
3726 3726
3727 DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args,
3728 Dart_Handle retval) {
3729 SetReturnValueHelper(args, retval);
3730 }
3731
3732
3727 // --- Scripts and Libraries --- 3733 // --- Scripts and Libraries ---
3728 3734
3729 3735
3730 DART_EXPORT Dart_Handle Dart_SetLibraryTagHandler( 3736 DART_EXPORT Dart_Handle Dart_SetLibraryTagHandler(
3731 Dart_LibraryTagHandler handler) { 3737 Dart_LibraryTagHandler handler) {
3732 Isolate* isolate = Isolate::Current(); 3738 Isolate* isolate = Isolate::Current();
3733 CHECK_ISOLATE(isolate); 3739 CHECK_ISOLATE(isolate);
3734 isolate->set_library_tag_handler(handler); 3740 isolate->set_library_tag_handler(handler);
3735 return Api::Success(isolate); 3741 return Api::Success(isolate);
3736 } 3742 }
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
4173 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) { 4179 DART_EXPORT void Dart_InitPerfEventsSupport(Dart_FileWriterFunction function) {
4174 Dart::set_perf_events_writer(function); 4180 Dart::set_perf_events_writer(function);
4175 } 4181 }
4176 4182
4177 4183
4178 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) { 4184 DART_EXPORT void Dart_InitFlowGraphPrinting(Dart_FileWriterFunction function) {
4179 Dart::set_flow_graph_writer(function); 4185 Dart::set_flow_graph_writer(function);
4180 } 4186 }
4181 4187
4182 } // namespace dart 4188 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | vm/native_arguments.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698