OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 const Instr kLwSwInstrArgumentMask = ~kLwSwInstrTypeMask; | 266 const Instr kLwSwInstrArgumentMask = ~kLwSwInstrTypeMask; |
267 const Instr kLwSwOffsetMask = kImm16Mask; | 267 const Instr kLwSwOffsetMask = kImm16Mask; |
268 | 268 |
269 | 269 |
270 // Spare buffer. | 270 // Spare buffer. |
271 static const int kMinimalBufferSize = 4 * KB; | 271 static const int kMinimalBufferSize = 4 * KB; |
272 | 272 |
273 | 273 |
274 Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) | 274 Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) |
275 : AssemblerBase(arg_isolate), | 275 : AssemblerBase(arg_isolate), |
| 276 recorded_ast_id_(TypeFeedbackId::None()), |
276 positions_recorder_(this), | 277 positions_recorder_(this), |
277 emit_debug_code_(FLAG_debug_code) { | 278 emit_debug_code_(FLAG_debug_code) { |
278 if (buffer == NULL) { | 279 if (buffer == NULL) { |
279 // Do our own buffer management. | 280 // Do our own buffer management. |
280 if (buffer_size <= kMinimalBufferSize) { | 281 if (buffer_size <= kMinimalBufferSize) { |
281 buffer_size = kMinimalBufferSize; | 282 buffer_size = kMinimalBufferSize; |
282 | 283 |
283 if (isolate()->assembler_spare_buffer() != NULL) { | 284 if (isolate()->assembler_spare_buffer() != NULL) { |
284 buffer = isolate()->assembler_spare_buffer(); | 285 buffer = isolate()->assembler_spare_buffer(); |
285 isolate()->set_assembler_spare_buffer(NULL); | 286 isolate()->set_assembler_spare_buffer(NULL); |
(...skipping 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2039 if (!Serializer::enabled()) { | 2040 if (!Serializer::enabled()) { |
2040 Serializer::TooLateToEnableNow(); | 2041 Serializer::TooLateToEnableNow(); |
2041 } | 2042 } |
2042 #endif | 2043 #endif |
2043 if (!Serializer::enabled() && !emit_debug_code()) { | 2044 if (!Serializer::enabled() && !emit_debug_code()) { |
2044 return; | 2045 return; |
2045 } | 2046 } |
2046 } | 2047 } |
2047 ASSERT(buffer_space() >= kMaxRelocSize); // Too late to grow buffer here. | 2048 ASSERT(buffer_space() >= kMaxRelocSize); // Too late to grow buffer here. |
2048 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { | 2049 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { |
2049 RelocInfo reloc_info_with_ast_id(pc_, rmode, RecordedAstId(), NULL); | 2050 RelocInfo reloc_info_with_ast_id(pc_, |
| 2051 rmode, |
| 2052 RecordedAstId().ToInt(), |
| 2053 NULL); |
2050 ClearRecordedAstId(); | 2054 ClearRecordedAstId(); |
2051 reloc_info_writer.Write(&reloc_info_with_ast_id); | 2055 reloc_info_writer.Write(&reloc_info_with_ast_id); |
2052 } else { | 2056 } else { |
2053 reloc_info_writer.Write(&rinfo); | 2057 reloc_info_writer.Write(&rinfo); |
2054 } | 2058 } |
2055 } | 2059 } |
2056 } | 2060 } |
2057 | 2061 |
2058 | 2062 |
2059 void Assembler::BlockTrampolinePoolFor(int instructions) { | 2063 void Assembler::BlockTrampolinePoolFor(int instructions) { |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2279 } | 2283 } |
2280 | 2284 |
2281 if (patched) { | 2285 if (patched) { |
2282 CPU::FlushICache(pc+2, sizeof(Address)); | 2286 CPU::FlushICache(pc+2, sizeof(Address)); |
2283 } | 2287 } |
2284 } | 2288 } |
2285 | 2289 |
2286 } } // namespace v8::internal | 2290 } } // namespace v8::internal |
2287 | 2291 |
2288 #endif // V8_TARGET_ARCH_MIPS | 2292 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |