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 3058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3069 EnsureSpace ensure_space(this); | 3069 EnsureSpace ensure_space(this); |
3070 emitl(data); | 3070 emitl(data); |
3071 } | 3071 } |
3072 | 3072 |
3073 | 3073 |
3074 // Relocation information implementations. | 3074 // Relocation information implementations. |
3075 | 3075 |
3076 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { | 3076 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { |
3077 ASSERT(rmode != RelocInfo::NONE); | 3077 ASSERT(rmode != RelocInfo::NONE); |
3078 // Don't record external references unless the heap will be serialized. | 3078 // Don't record external references unless the heap will be serialized. |
3079 if (rmode == RelocInfo::EXTERNAL_REFERENCE && | 3079 if (rmode == RelocInfo::EXTERNAL_REFERENCE) { |
3080 !Serializer::enabled() && | 3080 #ifdef DEBUG |
3081 !FLAG_debug_code) { | 3081 if (!Serializer::enabled()) { |
3082 return; | 3082 Serializer::TooLateToEnableNow(); |
| 3083 } |
| 3084 #endif |
| 3085 if (!Serializer::enabled() && !FLAG_debug_code) { |
| 3086 return; |
| 3087 } |
3083 } | 3088 } |
3084 RelocInfo rinfo(pc_, rmode, data); | 3089 RelocInfo rinfo(pc_, rmode, data); |
3085 reloc_info_writer.Write(&rinfo); | 3090 reloc_info_writer.Write(&rinfo); |
3086 } | 3091 } |
3087 | 3092 |
3088 void Assembler::RecordJSReturn() { | 3093 void Assembler::RecordJSReturn() { |
3089 positions_recorder()->WriteRecordedPositions(); | 3094 positions_recorder()->WriteRecordedPositions(); |
3090 EnsureSpace ensure_space(this); | 3095 EnsureSpace ensure_space(this); |
3091 RecordRelocInfo(RelocInfo::JS_RETURN); | 3096 RecordRelocInfo(RelocInfo::JS_RETURN); |
3092 } | 3097 } |
(...skipping 23 matching lines...) Expand all Loading... |
3116 // specially coded on x64 means that it is a relative 32 bit address, as used | 3121 // specially coded on x64 means that it is a relative 32 bit address, as used |
3117 // by branch instructions. | 3122 // by branch instructions. |
3118 return (1 << rmode_) & kApplyMask; | 3123 return (1 << rmode_) & kApplyMask; |
3119 } | 3124 } |
3120 | 3125 |
3121 | 3126 |
3122 | 3127 |
3123 } } // namespace v8::internal | 3128 } } // namespace v8::internal |
3124 | 3129 |
3125 #endif // V8_TARGET_ARCH_X64 | 3130 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |