| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 #include <setjmp.h> // NOLINT | 5 #include <setjmp.h> // NOLINT |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 | 7 |
| 8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
| 9 #if defined(TARGET_ARCH_ARM) | 9 #if defined(TARGET_ARCH_ARM) |
| 10 | 10 |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 } | 1169 } |
| 1170 return value; | 1170 return value; |
| 1171 } | 1171 } |
| 1172 | 1172 |
| 1173 | 1173 |
| 1174 // Returns the top of the stack area to enable checking for stack pointer | 1174 // Returns the top of the stack area to enable checking for stack pointer |
| 1175 // validity. | 1175 // validity. |
| 1176 uword Simulator::StackTop() const { | 1176 uword Simulator::StackTop() const { |
| 1177 // To be safe in potential stack underflows we leave some buffer above and | 1177 // To be safe in potential stack underflows we leave some buffer above and |
| 1178 // set the stack top. | 1178 // set the stack top. |
| 1179 return reinterpret_cast<uword>(stack_) + | 1179 return StackBase() + |
| 1180 (Isolate::GetSpecifiedStackSize() + Isolate::kStackSizeBuffer); | 1180 (Isolate::GetSpecifiedStackSize() + Isolate::kStackSizeBuffer); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 | 1183 |
| 1184 bool Simulator::IsTracingExecution() const { | 1184 bool Simulator::IsTracingExecution() const { |
| 1185 return icount_ > FLAG_trace_sim_after; | 1185 return icount_ > FLAG_trace_sim_after; |
| 1186 } | 1186 } |
| 1187 | 1187 |
| 1188 | 1188 |
| 1189 // Unsupported instructions use Format to print an error and stop execution. | 1189 // Unsupported instructions use Format to print an error and stop execution. |
| (...skipping 2683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3873 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 3873 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
| 3874 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 3874 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
| 3875 buf->Longjmp(); | 3875 buf->Longjmp(); |
| 3876 } | 3876 } |
| 3877 | 3877 |
| 3878 } // namespace dart | 3878 } // namespace dart |
| 3879 | 3879 |
| 3880 #endif // !defined(HOST_ARCH_ARM) | 3880 #endif // !defined(HOST_ARCH_ARM) |
| 3881 | 3881 |
| 3882 #endif // defined TARGET_ARCH_ARM | 3882 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |