| OLD | NEW |
| 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 #ifndef VM_NATIVE_ARGUMENTS_H_ | 5 #ifndef VM_NATIVE_ARGUMENTS_H_ |
| 6 #define VM_NATIVE_ARGUMENTS_H_ | 6 #define VM_NATIVE_ARGUMENTS_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/handles_impl.h" | 10 #include "vm/handles_impl.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 uword current_sp = func(); \ | 41 uword current_sp = func(); \ |
| 42 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ | 42 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ |
| 43 } | 43 } |
| 44 #endif | 44 #endif |
| 45 | 45 |
| 46 #define VERIFY_ON_TRANSITION \ | 46 #define VERIFY_ON_TRANSITION \ |
| 47 if (FLAG_verify_on_transition) { \ | 47 if (FLAG_verify_on_transition) { \ |
| 48 VerifyPointersVisitor::VerifyPointers(); \ | 48 VerifyPointersVisitor::VerifyPointers(); \ |
| 49 Isolate::Current()->heap()->Verify(); \ | 49 Isolate::Current()->heap()->Verify(); \ |
| 50 } | 50 } |
| 51 #define TRACE_NATIVES(name) \ | 51 #define TRACE_NATIVE_CALL(format, name) \ |
| 52 if (FLAG_trace_natives) { \ | 52 if (FLAG_trace_natives) { \ |
| 53 OS::Print("Calling native: %s\n", name); \ | 53 OS::Print("Calling native: " format "\n", name); \ |
| 54 } | 54 } |
| 55 #define DEOPTIMIZE_ALOT \ | 55 #define DEOPTIMIZE_ALOT \ |
| 56 if (FLAG_deoptimize_alot) { \ | 56 if (FLAG_deoptimize_alot) { \ |
| 57 DeoptimizeAll(); \ | 57 DeoptimizeAll(); \ |
| 58 } | 58 } |
| 59 | 59 |
| 60 #else | 60 #else |
| 61 | 61 |
| 62 #define CHECK_STACK_ALIGNMENT { } | 62 #define CHECK_STACK_ALIGNMENT { } |
| 63 #define VERIFY_ON_TRANSITION { } | 63 #define VERIFY_ON_TRANSITION { } |
| 64 #define TRACE_NATIVES(name) { } | 64 #define TRACE_NATIVE_CALL(format, name) { } |
| 65 #define DEOPTIMIZE_ALOT { } | 65 #define DEOPTIMIZE_ALOT { } |
| 66 | 66 |
| 67 #endif | 67 #endif |
| 68 | 68 |
| 69 | 69 |
| 70 // Class NativeArguments is used to access arguments passed in from | 70 // Class NativeArguments is used to access arguments passed in from |
| 71 // generated dart code to a runtime function or a dart library native | 71 // generated dart code to a runtime function or a dart library native |
| 72 // function. It is also used to set the return value if any at the slot | 72 // function. It is also used to set the return value if any at the slot |
| 73 // reserved for return values. | 73 // reserved for return values. |
| 74 // All runtime function/dart library native functions have the | 74 // All runtime function/dart library native functions have the |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 Isolate* isolate_; // Current isolate pointer. | 192 Isolate* isolate_; // Current isolate pointer. |
| 193 int argc_tag_; // Encodes argument count and invoked native call type. | 193 int argc_tag_; // Encodes argument count and invoked native call type. |
| 194 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call. | 194 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call. |
| 195 RawObject** retval_; // Pointer to the return value area. | 195 RawObject** retval_; // Pointer to the return value area. |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 } // namespace dart | 198 } // namespace dart |
| 199 | 199 |
| 200 #endif // VM_NATIVE_ARGUMENTS_H_ | 200 #endif // VM_NATIVE_ARGUMENTS_H_ |
| OLD | NEW |