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 3101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3112 } | 3112 } |
3113 | 3113 |
3114 | 3114 |
3115 void Assembler::RecordDebugBreakSlot() { | 3115 void Assembler::RecordDebugBreakSlot() { |
3116 positions_recorder()->WriteRecordedPositions(); | 3116 positions_recorder()->WriteRecordedPositions(); |
3117 EnsureSpace ensure_space(this); | 3117 EnsureSpace ensure_space(this); |
3118 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); | 3118 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); |
3119 } | 3119 } |
3120 | 3120 |
3121 | 3121 |
3122 void Assembler::RecordComment(const char* msg) { | 3122 void Assembler::RecordComment(const char* msg, bool force) { |
3123 if (FLAG_code_comments) { | 3123 if (FLAG_code_comments || force) { |
3124 EnsureSpace ensure_space(this); | 3124 EnsureSpace ensure_space(this); |
3125 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); | 3125 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg)); |
3126 } | 3126 } |
3127 } | 3127 } |
3128 | 3128 |
3129 | 3129 |
3130 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | | 3130 const int RelocInfo::kApplyMask = RelocInfo::kCodeTargetMask | |
3131 1 << RelocInfo::INTERNAL_REFERENCE; | 3131 1 << RelocInfo::INTERNAL_REFERENCE; |
3132 | 3132 |
3133 | 3133 |
3134 bool RelocInfo::IsCodedSpecially() { | 3134 bool RelocInfo::IsCodedSpecially() { |
3135 // The deserializer needs to know whether a pointer is specially coded. Being | 3135 // The deserializer needs to know whether a pointer is specially coded. Being |
3136 // specially coded on x64 means that it is a relative 32 bit address, as used | 3136 // specially coded on x64 means that it is a relative 32 bit address, as used |
3137 // by branch instructions. | 3137 // by branch instructions. |
3138 return (1 << rmode_) & kApplyMask; | 3138 return (1 << rmode_) & kApplyMask; |
3139 } | 3139 } |
3140 | 3140 |
3141 | 3141 |
3142 | 3142 |
3143 } } // namespace v8::internal | 3143 } } // namespace v8::internal |
3144 | 3144 |
3145 #endif // V8_TARGET_ARCH_X64 | 3145 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |