Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 native field of a receiver native argument. | |
| 213 static bool GetNativeReceiver(Dart_NativeArguments args, | |
| 214 intptr_t* value); | |
|
srdjan
2013/12/30 18:35:19
one line?
siva
2013/12/30 19:39:49
Done.
| |
| 215 | |
| 212 // Helper function to get the boolean value of a Bool native argument. | 216 // Helper function to get the boolean value of a Bool native argument. |
| 213 static bool GetNativeBooleanArgument(Dart_NativeArguments args, | 217 static bool GetNativeBooleanArgument(Dart_NativeArguments args, |
| 214 int arg_index, | 218 int arg_index, |
| 215 bool* value); | 219 bool* value); |
| 216 | 220 |
| 217 // Helper function to set the return value of native functions. | 221 // Helper function to set the return value of native functions. |
| 218 static void SetReturnValue(NativeArguments* args, Dart_Handle retval) { | 222 static void SetReturnValue(NativeArguments* args, Dart_Handle retval) { |
| 219 args->SetReturnUnsafe(UnwrapHandle(retval)); | 223 args->SetReturnUnsafe(UnwrapHandle(retval)); |
| 220 } | 224 } |
| 221 static void SetSmiReturnValue(NativeArguments* args, intptr_t retval) { | 225 static void SetSmiReturnValue(NativeArguments* args, intptr_t retval) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 269 if (isolate->no_callback_scope_depth() != 0) { \ | 273 if (isolate->no_callback_scope_depth() != 0) { \ |
| 270 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ | 274 return reinterpret_cast<Dart_Handle>(Api::AcquiredError(isolate)); \ |
| 271 } \ | 275 } \ |
| 272 | 276 |
| 273 #define ASSERT_CALLBACK_STATE(isolate) \ | 277 #define ASSERT_CALLBACK_STATE(isolate) \ |
| 274 ASSERT(isolate->no_callback_scope_depth() == 0) | 278 ASSERT(isolate->no_callback_scope_depth() == 0) |
| 275 | 279 |
| 276 } // namespace dart. | 280 } // namespace dart. |
| 277 | 281 |
| 278 #endif // VM_DART_API_IMPL_H_ | 282 #endif // VM_DART_API_IMPL_H_ |
| OLD | NEW |