| 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" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 ASSERT(!is_enabled_); | 42 ASSERT(!is_enabled_); |
| 43 switch (breakpoint_kind_) { | 43 switch (breakpoint_kind_) { |
| 44 case PcDescriptors::kIcCall: { | 44 case PcDescriptors::kIcCall: { |
| 45 const Code& code = | 45 const Code& code = |
| 46 Code::Handle(Function::Handle(function_).unoptimized_code()); | 46 Code::Handle(Function::Handle(function_).unoptimized_code()); |
| 47 saved_value_ = CodePatcher::GetInstanceCallAt(pc_, code, NULL); | 47 saved_value_ = CodePatcher::GetInstanceCallAt(pc_, code, NULL); |
| 48 CodePatcher::PatchInstanceCallAt(pc_, code, | 48 CodePatcher::PatchInstanceCallAt(pc_, code, |
| 49 StubCode::BreakpointDynamicEntryPoint()); | 49 StubCode::BreakpointDynamicEntryPoint()); |
| 50 break; | 50 break; |
| 51 } | 51 } |
| 52 case PcDescriptors::kUnoptStaticCall: { | 52 case PcDescriptors::kUnoptStaticCall: |
| 53 const Code& code = | |
| 54 Code::Handle(Function::Handle(function_).unoptimized_code()); | |
| 55 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); | |
| 56 CodePatcher::PatchStaticCallAt(pc_, code, | |
| 57 StubCode::BreakpointStaticEntryPoint()); | |
| 58 break; | |
| 59 } | |
| 60 case PcDescriptors::kRuntimeCall: | 53 case PcDescriptors::kRuntimeCall: |
| 61 case PcDescriptors::kClosureCall: | 54 case PcDescriptors::kClosureCall: |
| 62 case PcDescriptors::kReturn: { | 55 case PcDescriptors::kReturn: { |
| 63 const Code& code = | 56 const Code& code = |
| 64 Code::Handle(Function::Handle(function_).unoptimized_code()); | 57 Code::Handle(Function::Handle(function_).unoptimized_code()); |
| 65 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); | 58 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); |
| 66 CodePatcher::PatchStaticCallAt(pc_, code, | 59 CodePatcher::PatchStaticCallAt(pc_, code, |
| 67 StubCode::BreakpointRuntimeEntryPoint()); | 60 StubCode::BreakpointRuntimeEntryPoint()); |
| 68 break; | 61 break; |
| 69 } | 62 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 94 } | 87 } |
| 95 default: | 88 default: |
| 96 UNREACHABLE(); | 89 UNREACHABLE(); |
| 97 } | 90 } |
| 98 is_enabled_ = false; | 91 is_enabled_ = false; |
| 99 } | 92 } |
| 100 | 93 |
| 101 } // namespace dart | 94 } // namespace dart |
| 102 | 95 |
| 103 #endif // defined TARGET_ARCH_MIPS | 96 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |