Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/assembler-arm.h

Issue 2957: Defer the writing of the source position data to the relocation information... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/assembler-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 638
639 // Record a comment relocation entry that can be used by a disassembler. 639 // Record a comment relocation entry that can be used by a disassembler.
640 // Use --debug_code to enable. 640 // Use --debug_code to enable.
641 void RecordComment(const char* msg); 641 void RecordComment(const char* msg);
642 642
643 void RecordPosition(int pos); 643 void RecordPosition(int pos);
644 void RecordStatementPosition(int pos); 644 void RecordStatementPosition(int pos);
645 645
646 int pc_offset() const { return pc_ - buffer_; } 646 int pc_offset() const { return pc_ - buffer_; }
647 int last_position() const { return last_position_; } 647 int last_position() const { return last_position_; }
648 bool last_position_is_statement() const { 648 int last_statement_position() const { return last_statement_position_; }
649 return last_position_is_statement_;
650 }
651 649
652 protected: 650 protected:
653 int buffer_space() const { return reloc_info_writer.pos() - pc_; } 651 int buffer_space() const { return reloc_info_writer.pos() - pc_; }
654 652
655 // Read/patch instructions 653 // Read/patch instructions
656 Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); } 654 Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); }
657 void instr_at_put(byte* pc, Instr instr) { 655 void instr_at_put(byte* pc, Instr instr) {
658 *reinterpret_cast<Instr*>(pc) = instr; 656 *reinterpret_cast<Instr*>(pc) = instr;
659 } 657 }
660 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } 658 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 738
741 // Jump-to-jump elimination: 739 // Jump-to-jump elimination:
742 // The last label to be bound to _binding_pos, if unbound. 740 // The last label to be bound to _binding_pos, if unbound.
743 Label unbound_label_; 741 Label unbound_label_;
744 // The position to which _unbound_label has to be bound, if present. 742 // The position to which _unbound_label has to be bound, if present.
745 int binding_pos_; 743 int binding_pos_;
746 // The position before which jumps cannot be eliminated. 744 // The position before which jumps cannot be eliminated.
747 int last_bound_pos_; 745 int last_bound_pos_;
748 746
749 // source position information 747 // source position information
748 int last_statement_position_;
750 int last_position_; 749 int last_position_;
751 bool last_position_is_statement_;
752 750
753 // Code emission 751 // Code emission
754 inline void CheckBuffer(); 752 inline void CheckBuffer();
755 void GrowBuffer(); 753 void GrowBuffer();
756 inline void emit(Instr x); 754 inline void emit(Instr x);
757 755
758 // Instruction generation 756 // Instruction generation
759 void addrmod1(Instr instr, Register rn, Register rd, const Operand& x); 757 void addrmod1(Instr instr, Register rn, Register rd, const Operand& x);
760 void addrmod2(Instr instr, Register rd, const MemOperand& x); 758 void addrmod2(Instr instr, Register rd, const MemOperand& x);
761 void addrmod3(Instr instr, Register rd, const MemOperand& x); 759 void addrmod3(Instr instr, Register rd, const MemOperand& x);
(...skipping 14 matching lines...) Expand all
776 774
777 // Block the emission of the constant pool before pc_offset 775 // Block the emission of the constant pool before pc_offset
778 void BlockConstPoolBefore(int pc_offset) { 776 void BlockConstPoolBefore(int pc_offset) {
779 if (no_const_pool_before_ < pc_offset) no_const_pool_before_ = pc_offset; 777 if (no_const_pool_before_ < pc_offset) no_const_pool_before_ = pc_offset;
780 } 778 }
781 }; 779 };
782 780
783 } } // namespace v8::internal 781 } } // namespace v8::internal
784 782
785 #endif // V8_ASSEMBLER_ARM_H_ 783 #endif // V8_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698