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 "vm/globals.h" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
11 #include "vm/instructions.h" | 11 #include "vm/instructions.h" |
12 #include "vm/stub_code.h" | 12 #include "vm/stub_code.h" |
13 | 13 |
14 namespace dart { | 14 namespace dart { |
15 | 15 |
| 16 #ifndef PRODUCT |
| 17 |
16 RawCode* CodeBreakpoint::OrigStubAddress() const { | 18 RawCode* CodeBreakpoint::OrigStubAddress() const { |
17 return saved_value_; | 19 return saved_value_; |
18 } | 20 } |
19 | 21 |
20 | 22 |
21 void CodeBreakpoint::PatchCode() { | 23 void CodeBreakpoint::PatchCode() { |
22 ASSERT(!is_enabled_); | 24 ASSERT(!is_enabled_); |
23 Code& stub_target = Code::Handle(); | 25 Code& stub_target = Code::Handle(); |
24 switch (breakpoint_kind_) { | 26 switch (breakpoint_kind_) { |
25 case RawPcDescriptors::kIcCall: | 27 case RawPcDescriptors::kIcCall: |
(...skipping 22 matching lines...) Expand all Loading... |
48 case RawPcDescriptors::kRuntimeCall: { | 50 case RawPcDescriptors::kRuntimeCall: { |
49 CodePatcher::PatchStaticCallAt(pc_, code, Code::Handle(saved_value_)); | 51 CodePatcher::PatchStaticCallAt(pc_, code, Code::Handle(saved_value_)); |
50 break; | 52 break; |
51 } | 53 } |
52 default: | 54 default: |
53 UNREACHABLE(); | 55 UNREACHABLE(); |
54 } | 56 } |
55 is_enabled_ = false; | 57 is_enabled_ = false; |
56 } | 58 } |
57 | 59 |
| 60 #endif // !PRODUCT |
| 61 |
58 } // namespace dart | 62 } // namespace dart |
59 | 63 |
60 #endif // defined TARGET_ARCH_MIPS | 64 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |