| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_DBC) | 9 #if defined(TARGET_ARCH_DBC) |
| 10 | 10 |
| (...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 if (thread->isolate()->single_step()) { | 1122 if (thread->isolate()->single_step()) { |
| 1123 Exit(thread, FP, SP + 1, pc); | 1123 Exit(thread, FP, SP + 1, pc); |
| 1124 NativeArguments args(thread, 0, NULL, NULL); | 1124 NativeArguments args(thread, 0, NULL, NULL); |
| 1125 INVOKE_RUNTIME(DRT_SingleStepHandler, args); | 1125 INVOKE_RUNTIME(DRT_SingleStepHandler, args); |
| 1126 } | 1126 } |
| 1127 DISPATCH(); | 1127 DISPATCH(); |
| 1128 } | 1128 } |
| 1129 | 1129 |
| 1130 { | 1130 { |
| 1131 BYTECODE(DebugBreak, A); | 1131 BYTECODE(DebugBreak, A); |
| 1132 #if !defined(PRODUCT) |
| 1132 { | 1133 { |
| 1133 const uint32_t original_bc = | 1134 const uint32_t original_bc = |
| 1134 static_cast<uint32_t>(reinterpret_cast<uintptr_t>( | 1135 static_cast<uint32_t>(reinterpret_cast<uintptr_t>( |
| 1135 thread->isolate()->debugger()->GetPatchedStubAddress( | 1136 thread->isolate()->debugger()->GetPatchedStubAddress( |
| 1136 reinterpret_cast<uword>(pc)))); | 1137 reinterpret_cast<uword>(pc)))); |
| 1137 | 1138 |
| 1138 SP[1] = null_value; | 1139 SP[1] = null_value; |
| 1139 Exit(thread, FP, SP + 2, pc); | 1140 Exit(thread, FP, SP + 2, pc); |
| 1140 NativeArguments args(thread, 0, NULL, SP + 1); | 1141 NativeArguments args(thread, 0, NULL, SP + 1); |
| 1141 INVOKE_RUNTIME(DRT_BreakpointRuntimeHandler, args) | 1142 INVOKE_RUNTIME(DRT_BreakpointRuntimeHandler, args) |
| 1142 DISPATCH_OP(original_bc); | 1143 DISPATCH_OP(original_bc); |
| 1143 } | 1144 } |
| 1145 #else |
| 1146 // There should be no debug breaks in product mode. |
| 1147 UNREACHABLE(); |
| 1148 #endif |
| 1144 DISPATCH(); | 1149 DISPATCH(); |
| 1145 } | 1150 } |
| 1146 | 1151 |
| 1147 { | 1152 { |
| 1148 BYTECODE(InstantiateType, A_D); | 1153 BYTECODE(InstantiateType, A_D); |
| 1149 RawObject* type = LOAD_CONSTANT(rD); | 1154 RawObject* type = LOAD_CONSTANT(rD); |
| 1150 SP[1] = type; | 1155 SP[1] = type; |
| 1151 SP[2] = SP[0]; | 1156 SP[2] = SP[0]; |
| 1152 SP[0] = null_value; | 1157 SP[0] = null_value; |
| 1153 Exit(thread, FP, SP + 3, pc); | 1158 Exit(thread, FP, SP + 3, pc); |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1920 special_[kExceptionSpecialIndex] = raw_exception; | 1925 special_[kExceptionSpecialIndex] = raw_exception; |
| 1921 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 1926 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
| 1922 buf->Longjmp(); | 1927 buf->Longjmp(); |
| 1923 UNREACHABLE(); | 1928 UNREACHABLE(); |
| 1924 } | 1929 } |
| 1925 | 1930 |
| 1926 } // namespace dart | 1931 } // namespace dart |
| 1927 | 1932 |
| 1928 | 1933 |
| 1929 #endif // defined TARGET_ARCH_DBC | 1934 #endif // defined TARGET_ARCH_DBC |
| OLD | NEW |