| 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 | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 const Instr kLdrStrInstrArgumentMask = 0x0000ffff; | 293 const Instr kLdrStrInstrArgumentMask = 0x0000ffff; |
| 294 const Instr kLdrStrOffsetMask = 0x00000fff; | 294 const Instr kLdrStrOffsetMask = 0x00000fff; |
| 295 | 295 |
| 296 | 296 |
| 297 // Spare buffer. | 297 // Spare buffer. |
| 298 static const int kMinimalBufferSize = 4*KB; | 298 static const int kMinimalBufferSize = 4*KB; |
| 299 | 299 |
| 300 | 300 |
| 301 Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) | 301 Assembler::Assembler(Isolate* arg_isolate, void* buffer, int buffer_size) |
| 302 : AssemblerBase(arg_isolate), | 302 : AssemblerBase(arg_isolate), |
| 303 recorded_ast_id_(TypeFeedbackId::None()), |
| 303 positions_recorder_(this), | 304 positions_recorder_(this), |
| 304 emit_debug_code_(FLAG_debug_code) { | 305 emit_debug_code_(FLAG_debug_code) { |
| 305 if (buffer == NULL) { | 306 if (buffer == NULL) { |
| 306 // Do our own buffer management. | 307 // Do our own buffer management. |
| 307 if (buffer_size <= kMinimalBufferSize) { | 308 if (buffer_size <= kMinimalBufferSize) { |
| 308 buffer_size = kMinimalBufferSize; | 309 buffer_size = kMinimalBufferSize; |
| 309 | 310 |
| 310 if (isolate()->assembler_spare_buffer() != NULL) { | 311 if (isolate()->assembler_spare_buffer() != NULL) { |
| 311 buffer = isolate()->assembler_spare_buffer(); | 312 buffer = isolate()->assembler_spare_buffer(); |
| 312 isolate()->set_assembler_spare_buffer(NULL); | 313 isolate()->set_assembler_spare_buffer(NULL); |
| (...skipping 2245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2558 if (!Serializer::enabled()) { | 2559 if (!Serializer::enabled()) { |
| 2559 Serializer::TooLateToEnableNow(); | 2560 Serializer::TooLateToEnableNow(); |
| 2560 } | 2561 } |
| 2561 #endif | 2562 #endif |
| 2562 if (!Serializer::enabled() && !emit_debug_code()) { | 2563 if (!Serializer::enabled() && !emit_debug_code()) { |
| 2563 return; | 2564 return; |
| 2564 } | 2565 } |
| 2565 } | 2566 } |
| 2566 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here | 2567 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here |
| 2567 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { | 2568 if (rmode == RelocInfo::CODE_TARGET_WITH_ID) { |
| 2568 RelocInfo reloc_info_with_ast_id(pc_, rmode, RecordedAstId(), NULL); | 2569 RelocInfo reloc_info_with_ast_id(pc_, |
| 2570 rmode, |
| 2571 RecordedAstId().ToInt(), |
| 2572 NULL); |
| 2569 ClearRecordedAstId(); | 2573 ClearRecordedAstId(); |
| 2570 reloc_info_writer.Write(&reloc_info_with_ast_id); | 2574 reloc_info_writer.Write(&reloc_info_with_ast_id); |
| 2571 } else { | 2575 } else { |
| 2572 reloc_info_writer.Write(&rinfo); | 2576 reloc_info_writer.Write(&rinfo); |
| 2573 } | 2577 } |
| 2574 } | 2578 } |
| 2575 } | 2579 } |
| 2576 | 2580 |
| 2577 | 2581 |
| 2578 void Assembler::BlockConstPoolFor(int instructions) { | 2582 void Assembler::BlockConstPoolFor(int instructions) { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2681 | 2685 |
| 2682 // Since a constant pool was just emitted, move the check offset forward by | 2686 // Since a constant pool was just emitted, move the check offset forward by |
| 2683 // the standard interval. | 2687 // the standard interval. |
| 2684 next_buffer_check_ = pc_offset() + kCheckPoolInterval; | 2688 next_buffer_check_ = pc_offset() + kCheckPoolInterval; |
| 2685 } | 2689 } |
| 2686 | 2690 |
| 2687 | 2691 |
| 2688 } } // namespace v8::internal | 2692 } } // namespace v8::internal |
| 2689 | 2693 |
| 2690 #endif // V8_TARGET_ARCH_ARM | 2694 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |