Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1014 } | 1014 } |
| 1015 } | 1015 } |
| 1016 | 1016 |
| 1017 virtual void VisitCodeEntry(Address entry) { | 1017 virtual void VisitCodeEntry(Address entry) { |
| 1018 if (Code::GetObjectFromEntryAddress(entry) == original_) { | 1018 if (Code::GetObjectFromEntryAddress(entry) == original_) { |
| 1019 Address substitution_entry = substitution_->instruction_start(); | 1019 Address substitution_entry = substitution_->instruction_start(); |
| 1020 Memory::Address_at(entry) = substitution_entry; | 1020 Memory::Address_at(entry) = substitution_entry; |
| 1021 } | 1021 } |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 virtual void VisitCodeTarget(Address target_address_pointer) { | |
| 1025 if (Code::GetCodeFromTargetAddress( | |
| 1026 Memory::Address_at(target_address_pointer)) == original_) { | |
| 1027 Address substitution_entry = substitution_->instruction_start(); | |
| 1028 *reinterpret_cast<Address*>(target_address_pointer) = substitution_entry; | |
|
Michael Starzinger
2014/03/07 14:36:59
Can we instead of the reinterpret cast use ...
Me
rmcilroy
2014/03/10 12:25:23
Removed VisitCodeTarget(Address) as discussed, so
| |
| 1029 } | |
| 1030 } | |
| 1031 | |
| 1024 virtual void VisitCodeTarget(RelocInfo* rinfo) { | 1032 virtual void VisitCodeTarget(RelocInfo* rinfo) { |
| 1025 if (RelocInfo::IsCodeTarget(rinfo->rmode()) && | 1033 if (RelocInfo::IsCodeTarget(rinfo->rmode()) && |
| 1026 Code::GetCodeFromTargetAddress(rinfo->target_address()) == original_) { | 1034 Code::GetCodeFromTargetAddress(rinfo->target_address()) == original_) { |
| 1027 Address substitution_entry = substitution_->instruction_start(); | 1035 Address substitution_entry = substitution_->instruction_start(); |
| 1028 rinfo->set_target_address(substitution_entry); | 1036 rinfo->set_target_address(substitution_entry); |
| 1029 } | 1037 } |
| 1030 } | 1038 } |
| 1031 | 1039 |
| 1032 virtual void VisitDebugTarget(RelocInfo* rinfo) { | 1040 virtual void VisitDebugTarget(RelocInfo* rinfo) { |
| 1033 VisitCodeTarget(rinfo); | 1041 VisitCodeTarget(rinfo); |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2131 | 2139 |
| 2132 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { | 2140 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { |
| 2133 return false; | 2141 return false; |
| 2134 } | 2142 } |
| 2135 | 2143 |
| 2136 #endif // ENABLE_DEBUGGER_SUPPORT | 2144 #endif // ENABLE_DEBUGGER_SUPPORT |
| 2137 | 2145 |
| 2138 | 2146 |
| 2139 | 2147 |
| 2140 } } // namespace v8::internal | 2148 } } // namespace v8::internal |
| OLD | NEW |