| 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 RUNTIME_VM_NATIVE_ARGUMENTS_H_ | 5 #ifndef RUNTIME_VM_NATIVE_ARGUMENTS_H_ |
| 6 #define RUNTIME_VM_NATIVE_ARGUMENTS_H_ | 6 #define RUNTIME_VM_NATIVE_ARGUMENTS_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "platform/memory_sanitizer.h" | 9 #include "platform/memory_sanitizer.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ | 34 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ |
| 35 } | 35 } |
| 36 #elif defined(HOST_OS_WINDOWS) | 36 #elif defined(HOST_OS_WINDOWS) |
| 37 // The compiler may dynamically align the stack on Windows, so do not check. | 37 // The compiler may dynamically align the stack on Windows, so do not check. |
| 38 #define CHECK_STACK_ALIGNMENT \ | 38 #define CHECK_STACK_ALIGNMENT \ |
| 39 {} | 39 {} |
| 40 #else | 40 #else |
| 41 #define CHECK_STACK_ALIGNMENT \ | 41 #define CHECK_STACK_ALIGNMENT \ |
| 42 { \ | 42 { \ |
| 43 uword (*func)() = reinterpret_cast<uword (*)()>( \ | 43 uword (*func)() = reinterpret_cast<uword (*)()>( \ |
| 44 StubCode::GetStackPointer_entry()->EntryPoint()); \ | 44 StubCode::GetCStackPointer_entry()->EntryPoint()); \ |
| 45 uword current_sp = func(); \ | 45 uword current_sp = func(); \ |
| 46 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ | 46 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ |
| 47 } | 47 } |
| 48 #endif | 48 #endif |
| 49 | 49 |
| 50 void VerifyOnTransition(); | 50 void VerifyOnTransition(); |
| 51 | 51 |
| 52 #define VERIFY_ON_TRANSITION \ | 52 #define VERIFY_ON_TRANSITION \ |
| 53 if (FLAG_verify_on_transition) { \ | 53 if (FLAG_verify_on_transition) { \ |
| 54 VerifyOnTransition(); \ | 54 VerifyOnTransition(); \ |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 | 234 |
| 235 Thread* thread_; // Current thread pointer. | 235 Thread* thread_; // Current thread pointer. |
| 236 intptr_t argc_tag_; // Encodes argument count and invoked native call type. | 236 intptr_t argc_tag_; // Encodes argument count and invoked native call type. |
| 237 RawObject** argv_; // Pointer to an array of arguments to runtime call. | 237 RawObject** argv_; // Pointer to an array of arguments to runtime call. |
| 238 RawObject** retval_; // Pointer to the return value area. | 238 RawObject** retval_; // Pointer to the return value area. |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 } // namespace dart | 241 } // namespace dart |
| 242 | 242 |
| 243 #endif // RUNTIME_VM_NATIVE_ARGUMENTS_H_ | 243 #endif // RUNTIME_VM_NATIVE_ARGUMENTS_H_ |
| OLD | NEW |