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

Side by Side Diff: src/assembler-ia32.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 | « src/assembler-arm.h ('k') | src/assembler-ia32.cc » ('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 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 666
667 // Mark address of the ExitJSFrame code. 667 // Mark address of the ExitJSFrame code.
668 void RecordJSReturn(); 668 void RecordJSReturn();
669 669
670 // Record a comment relocation entry that can be used by a disassembler. 670 // Record a comment relocation entry that can be used by a disassembler.
671 // Use --debug_code to enable. 671 // Use --debug_code to enable.
672 void RecordComment(const char* msg); 672 void RecordComment(const char* msg);
673 673
674 void RecordPosition(int pos); 674 void RecordPosition(int pos);
675 void RecordStatementPosition(int pos); 675 void RecordStatementPosition(int pos);
676 void WriteRecordedPositions();
676 677
677 int pc_offset() const { return pc_ - buffer_; } 678 int pc_offset() const { return pc_ - buffer_; }
679 int last_statement_position() const { return last_statement_position_; }
678 int last_position() const { return last_position_; } 680 int last_position() const { return last_position_; }
679 bool last_position_is_statement() const {
680 return last_position_is_statement_;
681 }
682 681
683 // Check if there is less than kGap bytes available in the buffer. 682 // Check if there is less than kGap bytes available in the buffer.
684 // If this is the case, we need to grow the buffer before emitting 683 // If this is the case, we need to grow the buffer before emitting
685 // an instruction or relocation information. 684 // an instruction or relocation information.
686 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; } 685 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; }
687 686
688 // Get the number of bytes available in the buffer. 687 // Get the number of bytes available in the buffer.
689 inline int available_space() const { return reloc_info_writer.pos() - pc_; } 688 inline int available_space() const { return reloc_info_writer.pos() - pc_; }
690 689
691 // Avoid overflows for displacements etc. 690 // Avoid overflows for displacements etc.
(...skipping 26 matching lines...) Expand all
718 // Jump-to-jump elimination: 717 // Jump-to-jump elimination:
719 // The last label to be bound to _binding_pos, if unbound. 718 // The last label to be bound to _binding_pos, if unbound.
720 Label unbound_label_; 719 Label unbound_label_;
721 // The position to which _unbound_label has to be bound, if present. 720 // The position to which _unbound_label has to be bound, if present.
722 int binding_pos_; 721 int binding_pos_;
723 // The position before which jumps cannot be eliminated. 722 // The position before which jumps cannot be eliminated.
724 int last_bound_pos_; 723 int last_bound_pos_;
725 724
726 // source position information 725 // source position information
727 int last_position_; 726 int last_position_;
728 bool last_position_is_statement_; 727 int last_statement_position_;
729 728
730 byte* addr_at(int pos) { return buffer_ + pos; } 729 byte* addr_at(int pos) { return buffer_ + pos; }
731 byte byte_at(int pos) { return buffer_[pos]; } 730 byte byte_at(int pos) { return buffer_[pos]; }
732 uint32_t long_at(int pos) { 731 uint32_t long_at(int pos) {
733 return *reinterpret_cast<uint32_t*>(addr_at(pos)); 732 return *reinterpret_cast<uint32_t*>(addr_at(pos));
734 } 733 }
735 void long_at_put(int pos, uint32_t x) { 734 void long_at_put(int pos, uint32_t x) {
736 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; 735 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x;
737 } 736 }
738 737
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 private: 797 private:
799 Assembler* assembler_; 798 Assembler* assembler_;
800 #ifdef DEBUG 799 #ifdef DEBUG
801 int space_before_; 800 int space_before_;
802 #endif 801 #endif
803 }; 802 };
804 803
805 } } // namespace v8::internal 804 } } // namespace v8::internal
806 805
807 #endif // V8_ASSEMBLER_IA32_H_ 806 #endif // V8_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/assembler-arm.h ('k') | src/assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698