| 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 RUNTIME_VM_NATIVE_ENTRY_H_ | 5 #ifndef RUNTIME_VM_NATIVE_ENTRY_H_ |
| 6 #define RUNTIME_VM_NATIVE_ENTRY_H_ | 6 #define RUNTIME_VM_NATIVE_ENTRY_H_ |
| 7 | 7 |
| 8 #include "platform/memory_sanitizer.h" | 8 #include "platform/memory_sanitizer.h" |
| 9 | 9 |
| 10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #define TRACE_NATIVE_CALL(format, name) \ | 46 #define TRACE_NATIVE_CALL(format, name) \ |
| 47 do { \ | 47 do { \ |
| 48 } while (0) | 48 } while (0) |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 #define NATIVE_ENTRY_FUNCTION(name) BootstrapNatives::DN_##name | 51 #define NATIVE_ENTRY_FUNCTION(name) BootstrapNatives::DN_##name |
| 52 | 52 |
| 53 #ifdef DEBUG | 53 #ifdef DEBUG |
| 54 #define SET_NATIVE_RETVAL(args, value) \ | 54 #define SET_NATIVE_RETVAL(args, value) \ |
| 55 RawObject* retval = value; \ | 55 RawObject* retval = value; \ |
| 56 ASSERT(retval->IsDartInstance() || retval->IsTypeArguments()); \ | 56 ASSERT(retval->IsDartInstance()); \ |
| 57 arguments->SetReturnUnsafe(retval); | 57 arguments->SetReturnUnsafe(retval); |
| 58 #else | 58 #else |
| 59 #define SET_NATIVE_RETVAL(arguments, value) arguments->SetReturnUnsafe(value); | 59 #define SET_NATIVE_RETVAL(arguments, value) arguments->SetReturnUnsafe(value); |
| 60 #endif | 60 #endif |
| 61 | 61 |
| 62 #define DEFINE_NATIVE_ENTRY(name, argument_count) \ | 62 #define DEFINE_NATIVE_ENTRY(name, argument_count) \ |
| 63 static RawObject* DN_Helper##name(Isolate* isolate, Thread* thread, \ | 63 static RawObject* DN_Helper##name(Isolate* isolate, Thread* thread, \ |
| 64 Zone* zone, NativeArguments* arguments); \ | 64 Zone* zone, NativeArguments* arguments); \ |
| 65 void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \ | 65 void NATIVE_ENTRY_FUNCTION(name)(Dart_NativeArguments args) { \ |
| 66 CHECK_STACK_ALIGNMENT; \ | 66 CHECK_STACK_ALIGNMENT; \ |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 static void AutoScopeNativeCallWrapperNoStackCheck(Dart_NativeArguments args, | 147 static void AutoScopeNativeCallWrapperNoStackCheck(Dart_NativeArguments args, |
| 148 Dart_NativeFunction func); | 148 Dart_NativeFunction func); |
| 149 | 149 |
| 150 static bool ReturnValueIsError(NativeArguments* arguments); | 150 static bool ReturnValueIsError(NativeArguments* arguments); |
| 151 static void PropagateErrors(NativeArguments* arguments); | 151 static void PropagateErrors(NativeArguments* arguments); |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 } // namespace dart | 154 } // namespace dart |
| 155 | 155 |
| 156 #endif // RUNTIME_VM_NATIVE_ENTRY_H_ | 156 #endif // RUNTIME_VM_NATIVE_ENTRY_H_ |
| OLD | NEW |