OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 5902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5913 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | | 5913 RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT) | |
5914 RelocInfo::ModeMask(RelocInfo::GLOBAL_PROPERTY_CELL) | | 5914 RelocInfo::ModeMask(RelocInfo::GLOBAL_PROPERTY_CELL) | |
5915 RelocInfo::kApplyMask; | 5915 RelocInfo::kApplyMask; |
5916 Assembler* origin = desc.origin; // Needed to find target_object on X64. | 5916 Assembler* origin = desc.origin; // Needed to find target_object on X64. |
5917 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { | 5917 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { |
5918 RelocInfo::Mode mode = it.rinfo()->rmode(); | 5918 RelocInfo::Mode mode = it.rinfo()->rmode(); |
5919 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 5919 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
5920 Handle<Object> p = it.rinfo()->target_object_handle(origin); | 5920 Handle<Object> p = it.rinfo()->target_object_handle(origin); |
5921 it.rinfo()->set_target_object(*p); | 5921 it.rinfo()->set_target_object(*p); |
5922 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { | 5922 } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) { |
5923 Handle<JSGlobalPropertyCell> cell = it.rinfo()->target_cell_handle(); | 5923 Handle<JSGlobalPropertyCell> cell = it.rinfo()->target_cell_handle(); |
5924 it.rinfo()->set_target_cell(*cell); | 5924 it.rinfo()->set_target_cell(*cell); |
5925 } else if (RelocInfo::IsCodeTarget(mode)) { | 5925 } else if (RelocInfo::IsCodeTarget(mode)) { |
5926 // rewrite code handles in inline cache targets to direct | 5926 // rewrite code handles in inline cache targets to direct |
5927 // pointers to the first instruction in the code object | 5927 // pointers to the first instruction in the code object |
5928 Handle<Object> p = it.rinfo()->target_object_handle(origin); | 5928 Handle<Object> p = it.rinfo()->target_object_handle(origin); |
5929 Code* code = Code::cast(*p); | 5929 Code* code = Code::cast(*p); |
5930 it.rinfo()->set_target_address(code->instruction_start()); | 5930 it.rinfo()->set_target_address(code->instruction_start()); |
5931 } else { | 5931 } else { |
5932 it.rinfo()->apply(delta); | 5932 it.rinfo()->apply(delta); |
5933 } | 5933 } |
(...skipping 3944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9878 if (break_point_objects()->IsUndefined()) return 0; | 9878 if (break_point_objects()->IsUndefined()) return 0; |
9879 // Single beak point. | 9879 // Single beak point. |
9880 if (!break_point_objects()->IsFixedArray()) return 1; | 9880 if (!break_point_objects()->IsFixedArray()) return 1; |
9881 // Multiple break points. | 9881 // Multiple break points. |
9882 return FixedArray::cast(break_point_objects())->length(); | 9882 return FixedArray::cast(break_point_objects())->length(); |
9883 } | 9883 } |
9884 #endif | 9884 #endif |
9885 | 9885 |
9886 | 9886 |
9887 } } // namespace v8::internal | 9887 } } // namespace v8::internal |
OLD | NEW |