| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 5195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5206 // unbox handles and relocate | 5206 // unbox handles and relocate |
| 5207 intptr_t delta = instruction_start() - desc.buffer; | 5207 intptr_t delta = instruction_start() - desc.buffer; |
| 5208 int mode_mask = RelocInfo::kCodeTargetMask | | 5208 int mode_mask = RelocInfo::kCodeTargetMask | |
| 5209 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | | 5209 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | |
| 5210 RelocInfo::kApplyMask; | 5210 RelocInfo::kApplyMask; |
| 5211 Assembler* origin = desc.origin; // Needed to find target_object on X64. | 5211 Assembler* origin = desc.origin; // Needed to find target_object on X64. |
| 5212 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { | 5212 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { |
| 5213 RelocInfo::Mode mode = it.rinfo()->rmode(); | 5213 RelocInfo::Mode mode = it.rinfo()->rmode(); |
| 5214 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 5214 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
| 5215 Handle<Object> p = it.rinfo()->target_object_handle(origin); | 5215 Handle<Object> p = it.rinfo()->target_object_handle(origin); |
| 5216 it.rinfo()->set_target_object(*p); | 5216 it.rinfo()->set_target_object(*p, false); |
| 5217 } else if (RelocInfo::IsCodeTarget(mode)) { | 5217 } else if (RelocInfo::IsCodeTarget(mode)) { |
| 5218 // rewrite code handles in inline cache targets to direct | 5218 // rewrite code handles in inline cache targets to direct |
| 5219 // pointers to the first instruction in the code object | 5219 // pointers to the first instruction in the code object |
| 5220 Handle<Object> p = it.rinfo()->target_object_handle(origin); | 5220 Handle<Object> p = it.rinfo()->target_object_handle(origin); |
| 5221 Code* code = Code::cast(*p); | 5221 Code* code = Code::cast(*p); |
| 5222 it.rinfo()->set_target_address(code->instruction_start()); | 5222 it.rinfo()->set_target_address(code->instruction_start(), false); |
| 5223 } else { | 5223 } else { |
| 5224 it.rinfo()->apply(delta); | 5224 it.rinfo()->apply(delta); |
| 5225 } | 5225 } |
| 5226 } | 5226 } |
| 5227 CPU::FlushICache(instruction_start(), instruction_size()); | 5227 CPU::FlushICache(instruction_start(), instruction_size()); |
| 5228 } | 5228 } |
| 5229 | 5229 |
| 5230 | 5230 |
| 5231 // Locate the source position which is closest to the address in the code. This | 5231 // Locate the source position which is closest to the address in the code. This |
| 5232 // is using the source position information embedded in the relocation info. | 5232 // is using the source position information embedded in the relocation info. |
| (...skipping 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8538 if (break_point_objects()->IsUndefined()) return 0; | 8538 if (break_point_objects()->IsUndefined()) return 0; |
| 8539 // Single beak point. | 8539 // Single beak point. |
| 8540 if (!break_point_objects()->IsFixedArray()) return 1; | 8540 if (!break_point_objects()->IsFixedArray()) return 1; |
| 8541 // Multiple break points. | 8541 // Multiple break points. |
| 8542 return FixedArray::cast(break_point_objects())->length(); | 8542 return FixedArray::cast(break_point_objects())->length(); |
| 8543 } | 8543 } |
| 8544 #endif | 8544 #endif |
| 8545 | 8545 |
| 8546 | 8546 |
| 8547 } } // namespace v8::internal | 8547 } } // namespace v8::internal |
| OLD | NEW |