OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2793 RecordRelocInfo(RelocInfo::POSITION, current_position_); | 2793 RecordRelocInfo(RelocInfo::POSITION, current_position_); |
2794 written_position_ = current_position_; | 2794 written_position_ = current_position_; |
2795 } | 2795 } |
2796 } | 2796 } |
2797 | 2797 |
2798 | 2798 |
2799 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | | 2799 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | |
2800 1 << RelocInfo::INTERNAL_REFERENCE | | 2800 1 << RelocInfo::INTERNAL_REFERENCE | |
2801 1 << RelocInfo::JS_RETURN; | 2801 1 << RelocInfo::JS_RETURN; |
2802 | 2802 |
| 2803 |
| 2804 bool RelocInfo::IsCodedSpecially() { |
| 2805 // The deserializer needs to know whether a pointer is specially coded. Being |
| 2806 // specially coded on x64 means that it is a relative 32 bit address, as used |
| 2807 // by branch instructions. |
| 2808 return (1 << rmode_) & kApplyMask; |
| 2809 } |
| 2810 |
| 2811 |
| 2812 |
2803 } } // namespace v8::internal | 2813 } } // namespace v8::internal |
2804 | 2814 |
2805 #endif // V8_TARGET_ARCH_X64 | 2815 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |