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 2986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2997 void Assembler::dd(uint32_t data) { | 2997 void Assembler::dd(uint32_t data) { |
2998 EnsureSpace ensure_space(this); | 2998 EnsureSpace ensure_space(this); |
2999 emitl(data); | 2999 emitl(data); |
3000 } | 3000 } |
3001 | 3001 |
3002 | 3002 |
3003 // Relocation information implementations. | 3003 // Relocation information implementations. |
3004 | 3004 |
3005 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { | 3005 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { |
3006 ASSERT(!RelocInfo::IsNone(rmode)); | 3006 ASSERT(!RelocInfo::IsNone(rmode)); |
3007 // Don't record external references unless the heap will be serialized. | |
3008 if (rmode == RelocInfo::EXTERNAL_REFERENCE) { | 3007 if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
| 3008 // Don't record external references unless the heap will be serialized. |
3009 #ifdef DEBUG | 3009 #ifdef DEBUG |
3010 if (!Serializer::enabled()) { | 3010 if (!Serializer::enabled()) { |
3011 Serializer::TooLateToEnableNow(); | 3011 Serializer::TooLateToEnableNow(); |
3012 } | 3012 } |
3013 #endif | 3013 #endif |
3014 if (!Serializer::enabled() && !emit_debug_code()) { | 3014 if (!Serializer::enabled() && !emit_debug_code()) { |
3015 return; | 3015 return; |
3016 } | 3016 } |
| 3017 } else if (rmode == RelocInfo::CODE_AGE_SEQUENCE) { |
| 3018 // Don't record psuedo relocation info for code age sequence mode. |
| 3019 return; |
3017 } | 3020 } |
3018 RelocInfo rinfo(pc_, rmode, data, NULL); | 3021 RelocInfo rinfo(pc_, rmode, data, NULL); |
3019 reloc_info_writer.Write(&rinfo); | 3022 reloc_info_writer.Write(&rinfo); |
3020 } | 3023 } |
3021 | 3024 |
3022 | 3025 |
3023 void Assembler::RecordJSReturn() { | 3026 void Assembler::RecordJSReturn() { |
3024 positions_recorder()->WriteRecordedPositions(); | 3027 positions_recorder()->WriteRecordedPositions(); |
3025 EnsureSpace ensure_space(this); | 3028 EnsureSpace ensure_space(this); |
3026 RecordRelocInfo(RelocInfo::JS_RETURN); | 3029 RecordRelocInfo(RelocInfo::JS_RETURN); |
(...skipping 24 matching lines...) Expand all Loading... |
3051 bool RelocInfo::IsCodedSpecially() { | 3054 bool RelocInfo::IsCodedSpecially() { |
3052 // The deserializer needs to know whether a pointer is specially coded. Being | 3055 // The deserializer needs to know whether a pointer is specially coded. Being |
3053 // specially coded on x64 means that it is a relative 32 bit address, as used | 3056 // specially coded on x64 means that it is a relative 32 bit address, as used |
3054 // by branch instructions. | 3057 // by branch instructions. |
3055 return (1 << rmode_) & kApplyMask; | 3058 return (1 << rmode_) & kApplyMask; |
3056 } | 3059 } |
3057 | 3060 |
3058 } } // namespace v8::internal | 3061 } } // namespace v8::internal |
3059 | 3062 |
3060 #endif // V8_TARGET_ARCH_X64 | 3063 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |