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

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

Issue 113763004: Change Dart_GetNativeBooleanArgument to use class Ids and direct (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 static void InitOnce(); 202 static void InitOnce();
203 203
204 // Allocates handles for objects in the VM isolate. 204 // Allocates handles for objects in the VM isolate.
205 static void InitHandles(); 205 static void InitHandles();
206 206
207 // Helper function to get the peer value of an external string object. 207 // Helper function to get the peer value of an external string object.
208 static bool StringGetPeerHelper(Dart_NativeArguments args, 208 static bool StringGetPeerHelper(Dart_NativeArguments args,
209 int arg_index, 209 int arg_index,
210 void** peer); 210 void** peer);
211 211
212 // Helper function to get the boolean value of a Bool native argument.
213 static bool GetNativeBooleanArgument(Dart_NativeArguments args,
214 int arg_index,
215 bool* value);
216
212 // Helper function to set the return value of native functions. 217 // Helper function to set the return value of native functions.
213 static void SetReturnValue(NativeArguments* args, Dart_Handle retval) { 218 static void SetReturnValue(NativeArguments* args, Dart_Handle retval) {
214 args->SetReturnUnsafe(UnwrapHandle(retval)); 219 args->SetReturnUnsafe(UnwrapHandle(retval));
215 } 220 }
216 static void SetSmiReturnValue(NativeArguments* args, intptr_t retval) { 221 static void SetSmiReturnValue(NativeArguments* args, intptr_t retval) {
217 args->SetReturnUnsafe(Smi::New(retval)); 222 args->SetReturnUnsafe(Smi::New(retval));
218 } 223 }
219 static void SetIntegerReturnValue(NativeArguments* args, int64_t retval) { 224 static void SetIntegerReturnValue(NativeArguments* args, int64_t retval) {
220 args->SetReturnUnsafe(Integer::New(retval)); 225 args->SetReturnUnsafe(Integer::New(retval));
221 } 226 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 if (isolate->no_callback_scope_depth() != 0) { \ 269 if (isolate->no_callback_scope_depth() != 0) { \
265 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ 270 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \
266 } \ 271 } \
267 272
268 #define ASSERT_CALLBACK_STATE(isolate) \ 273 #define ASSERT_CALLBACK_STATE(isolate) \
269 ASSERT(isolate->no_callback_scope_depth() == 0) 274 ASSERT(isolate->no_callback_scope_depth() == 0)
270 275
271 } // namespace dart. 276 } // namespace dart.
272 277
273 #endif // VM_DART_API_IMPL_H_ 278 #endif // VM_DART_API_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698