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