| 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" |
| 11 #include "vm/cpu.h" | 11 #include "vm/cpu.h" |
| 12 #include "vm/disassembler.h" | 12 #include "vm/disassembler.h" |
| 13 #include "vm/object.h" | 13 #include "vm/object.h" |
| 14 #include "vm/os.h" | 14 #include "vm/os.h" |
| 15 #include "vm/stack_frame.h" | 15 #include "vm/stack_frame.h" |
| 16 #include "vm/stub_code.h" | 16 #include "vm/stub_code.h" |
| 17 | 17 |
| 18 namespace dart { | 18 namespace dart { |
| 19 | 19 |
| 20 #ifndef PRODUCT |
| 21 |
| 20 RawCode* CodeBreakpoint::OrigStubAddress() const { | 22 RawCode* CodeBreakpoint::OrigStubAddress() const { |
| 21 return saved_value_; | 23 return saved_value_; |
| 22 } | 24 } |
| 23 | 25 |
| 24 | 26 |
| 25 void CodeBreakpoint::PatchCode() { | 27 void CodeBreakpoint::PatchCode() { |
| 26 ASSERT(!is_enabled_); | 28 ASSERT(!is_enabled_); |
| 27 const Code& code = Code::Handle(code_); | 29 const Code& code = Code::Handle(code_); |
| 28 const Instructions& instrs = Instructions::Handle(code.instructions()); | 30 const Instructions& instrs = Instructions::Handle(code.instructions()); |
| 29 Code& stub_target = Code::Handle(); | 31 Code& stub_target = Code::Handle(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 CodePatcher::PatchStaticCallAt(pc_, code, Code::Handle(saved_value_)); | 65 CodePatcher::PatchStaticCallAt(pc_, code, Code::Handle(saved_value_)); |
| 64 break; | 66 break; |
| 65 } | 67 } |
| 66 default: | 68 default: |
| 67 UNREACHABLE(); | 69 UNREACHABLE(); |
| 68 } | 70 } |
| 69 } | 71 } |
| 70 is_enabled_ = false; | 72 is_enabled_ = false; |
| 71 } | 73 } |
| 72 | 74 |
| 75 #endif // !PRODUCT |
| 76 |
| 73 } // namespace dart | 77 } // namespace dart |
| 74 | 78 |
| 75 #endif // defined TARGET_ARCH_IA32 | 79 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |