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

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

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/include/dart_api.h ('k') | runtime/vm/dart_api_impl.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #ifndef VM_DART_API_IMPL_H_ 5 #ifndef VM_DART_API_IMPL_H_
6 #define VM_DART_API_IMPL_H_ 6 #define VM_DART_API_IMPL_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/native_arguments.h" 9 #include "vm/native_arguments.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 void** peer); 196 void** peer);
197 static bool ExternalStringGetPeerHelper(Dart_Handle object, void** peer); 197 static bool ExternalStringGetPeerHelper(Dart_Handle object, void** peer);
198 198
199 // Helper function to set the return value of native functions. 199 // Helper function to set the return value of native functions.
200 static void SetReturnValue(NativeArguments* args, Dart_Handle retval) { 200 static void SetReturnValue(NativeArguments* args, Dart_Handle retval) {
201 args->SetReturnUnsafe(UnwrapHandle(retval)); 201 args->SetReturnUnsafe(UnwrapHandle(retval));
202 } 202 }
203 static void SetSmiReturnValue(NativeArguments* args, intptr_t retval) { 203 static void SetSmiReturnValue(NativeArguments* args, intptr_t retval) {
204 args->SetReturnUnsafe(Smi::New(retval)); 204 args->SetReturnUnsafe(Smi::New(retval));
205 } 205 }
206 static void SetIntegerReturnValue(NativeArguments* args, intptr_t retval) { 206 static void SetIntegerReturnValue(NativeArguments* args, int64_t retval) {
207 args->SetReturnUnsafe(Integer::New(retval)); 207 args->SetReturnUnsafe(Integer::New(retval));
208 } 208 }
209 static void SetDoubleReturnValue(NativeArguments* args, double retval) { 209 static void SetDoubleReturnValue(NativeArguments* args, double retval) {
210 args->SetReturnUnsafe(Double::New(retval)); 210 args->SetReturnUnsafe(Double::New(retval));
211 } 211 }
212 static void SetWeakHandleReturnValue(NativeArguments* args, 212 static void SetWeakHandleReturnValue(NativeArguments* args,
213 Dart_WeakPersistentHandle retval); 213 Dart_WeakPersistentHandle retval);
214 214
215 private: 215 private:
216 // Thread local key used by the API. Currently holds the current 216 // Thread local key used by the API. Currently holds the current
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (isolate->no_callback_scope_depth() != 0) { \ 249 if (isolate->no_callback_scope_depth() != 0) { \
250 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ 250 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \
251 } \ 251 } \
252 252
253 #define ASSERT_CALLBACK_STATE(isolate) \ 253 #define ASSERT_CALLBACK_STATE(isolate) \
254 ASSERT(isolate->no_callback_scope_depth() == 0) 254 ASSERT(isolate->no_callback_scope_depth() == 0)
255 255
256 } // namespace dart. 256 } // namespace dart.
257 257
258 #endif // VM_DART_API_IMPL_H_ 258 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698