| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/debugger.h" | 8 #include "vm/debugger.h" |
| 9 | 9 |
| 10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 ASSERT(!is_enabled_); | 46 ASSERT(!is_enabled_); |
| 47 switch (breakpoint_kind_) { | 47 switch (breakpoint_kind_) { |
| 48 case PcDescriptors::kIcCall: { | 48 case PcDescriptors::kIcCall: { |
| 49 const Code& code = | 49 const Code& code = |
| 50 Code::Handle(Function::Handle(function_).unoptimized_code()); | 50 Code::Handle(Function::Handle(function_).unoptimized_code()); |
| 51 saved_value_ = CodePatcher::GetInstanceCallAt(pc_, code, NULL); | 51 saved_value_ = CodePatcher::GetInstanceCallAt(pc_, code, NULL); |
| 52 CodePatcher::PatchInstanceCallAt(pc_, code, | 52 CodePatcher::PatchInstanceCallAt(pc_, code, |
| 53 StubCode::BreakpointDynamicEntryPoint()); | 53 StubCode::BreakpointDynamicEntryPoint()); |
| 54 break; | 54 break; |
| 55 } | 55 } |
| 56 case PcDescriptors::kUnoptStaticCall: { | 56 case PcDescriptors::kUnoptStaticCall: |
| 57 const Code& code = | |
| 58 Code::Handle(Function::Handle(function_).unoptimized_code()); | |
| 59 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); | |
| 60 CodePatcher::PatchStaticCallAt(pc_, code, | |
| 61 StubCode::BreakpointStaticEntryPoint()); | |
| 62 break; | |
| 63 } | |
| 64 case PcDescriptors::kRuntimeCall: | 57 case PcDescriptors::kRuntimeCall: |
| 65 case PcDescriptors::kClosureCall: | 58 case PcDescriptors::kClosureCall: |
| 66 case PcDescriptors::kReturn: { | 59 case PcDescriptors::kReturn: { |
| 67 const Code& code = | 60 const Code& code = |
| 68 Code::Handle(Function::Handle(function_).unoptimized_code()); | 61 Code::Handle(Function::Handle(function_).unoptimized_code()); |
| 69 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); | 62 saved_value_ = CodePatcher::GetStaticCallTargetAt(pc_, code); |
| 70 CodePatcher::PatchStaticCallAt(pc_, code, | 63 CodePatcher::PatchStaticCallAt(pc_, code, |
| 71 StubCode::BreakpointRuntimeEntryPoint()); | 64 StubCode::BreakpointRuntimeEntryPoint()); |
| 72 break; | 65 break; |
| 73 } | 66 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 98 } | 91 } |
| 99 default: | 92 default: |
| 100 UNREACHABLE(); | 93 UNREACHABLE(); |
| 101 } | 94 } |
| 102 is_enabled_ = false; | 95 is_enabled_ = false; |
| 103 } | 96 } |
| 104 | 97 |
| 105 } // namespace dart | 98 } // namespace dart |
| 106 | 99 |
| 107 #endif // defined TARGET_ARCH_IA32 | 100 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |