| 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 "platform/memory_sanitizer.h" | 9 #include "platform/memory_sanitizer.h" |
| 10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #if defined(USING_SIMULATOR) | 30 #if defined(USING_SIMULATOR) |
| 31 #define CHECK_STACK_ALIGNMENT { \ | 31 #define CHECK_STACK_ALIGNMENT { \ |
| 32 uword current_sp = Simulator::Current()->get_register(SPREG); \ | 32 uword current_sp = Simulator::Current()->get_register(SPREG); \ |
| 33 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ | 33 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ |
| 34 } | 34 } |
| 35 #elif defined(TARGET_OS_WINDOWS) | 35 #elif defined(TARGET_OS_WINDOWS) |
| 36 // The compiler may dynamically align the stack on Windows, so do not check. | 36 // The compiler may dynamically align the stack on Windows, so do not check. |
| 37 #define CHECK_STACK_ALIGNMENT { } | 37 #define CHECK_STACK_ALIGNMENT { } |
| 38 #else | 38 #else |
| 39 #define CHECK_STACK_ALIGNMENT { \ | 39 #define CHECK_STACK_ALIGNMENT { \ |
| 40 uword (*func)() = \ | 40 uword (*func)() = reinterpret_cast<uword (*)()>( \ |
| 41 reinterpret_cast<uword (*)()>(StubCode::GetStackPointerEntryPoint()); \ | 41 StubCode::GetStackPointer_entry()->EntryPoint()); \ |
| 42 uword current_sp = func(); \ | 42 uword current_sp = func(); \ |
| 43 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ | 43 ASSERT(Utils::IsAligned(current_sp, OS::ActivationFrameAlignment())); \ |
| 44 } | 44 } |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 #define VERIFY_ON_TRANSITION \ | 47 #define VERIFY_ON_TRANSITION \ |
| 48 if (FLAG_verify_on_transition) { \ | 48 if (FLAG_verify_on_transition) { \ |
| 49 VerifyPointersVisitor::VerifyPointers(); \ | 49 VerifyPointersVisitor::VerifyPointers(); \ |
| 50 Isolate::Current()->heap()->Verify(); \ | 50 Isolate::Current()->heap()->Verify(); \ |
| 51 } | 51 } |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 Thread* thread_; // Current thread pointer. | 224 Thread* thread_; // Current thread pointer. |
| 225 int argc_tag_; // Encodes argument count and invoked native call type. | 225 int argc_tag_; // Encodes argument count and invoked native call type. |
| 226 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call. | 226 RawObject*(*argv_)[]; // Pointer to an array of arguments to runtime call. |
| 227 RawObject** retval_; // Pointer to the return value area. | 227 RawObject** retval_; // Pointer to the return value area. |
| 228 }; | 228 }; |
| 229 | 229 |
| 230 } // namespace dart | 230 } // namespace dart |
| 231 | 231 |
| 232 #endif // VM_NATIVE_ARGUMENTS_H_ | 232 #endif // VM_NATIVE_ARGUMENTS_H_ |
| OLD | NEW |