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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 void RecordStatementPosition(int pos); | 676 void RecordStatementPosition(int pos); |
677 void WriteRecordedPositions(); | 677 void WriteRecordedPositions(); |
678 | 678 |
679 // Writes a single word of data in the code stream. | 679 // Writes a single word of data in the code stream. |
680 // Used for inline tables, e.g., jump-tables. | 680 // Used for inline tables, e.g., jump-tables. |
681 void dd(uint32_t data, RelocMode reloc_info); | 681 void dd(uint32_t data, RelocMode reloc_info); |
682 | 682 |
683 // Writes the absolute address of a bound label at the given position in | 683 // Writes the absolute address of a bound label at the given position in |
684 // the generated code. That positions should have the relocation mode | 684 // the generated code. That positions should have the relocation mode |
685 // internal_reference! | 685 // internal_reference! |
686 void WriteInternalReference(int position, Label &bound_label); | 686 void WriteInternalReference(int position, const Label& bound_label); |
687 | 687 |
688 int pc_offset() const { return pc_ - buffer_; } | 688 int pc_offset() const { return pc_ - buffer_; } |
689 int last_statement_position() const { return last_statement_position_; } | 689 int last_statement_position() const { return last_statement_position_; } |
690 int last_position() const { return last_position_; } | 690 int last_position() const { return last_position_; } |
691 | 691 |
692 // Check if there is less than kGap bytes available in the buffer. | 692 // Check if there is less than kGap bytes available in the buffer. |
693 // If this is the case, we need to grow the buffer before emitting | 693 // If this is the case, we need to grow the buffer before emitting |
694 // an instruction or relocation information. | 694 // an instruction or relocation information. |
695 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; } | 695 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; } |
696 | 696 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 private: | 807 private: |
808 Assembler* assembler_; | 808 Assembler* assembler_; |
809 #ifdef DEBUG | 809 #ifdef DEBUG |
810 int space_before_; | 810 int space_before_; |
811 #endif | 811 #endif |
812 }; | 812 }; |
813 | 813 |
814 } } // namespace v8::internal | 814 } } // namespace v8::internal |
815 | 815 |
816 #endif // V8_ASSEMBLER_IA32_H_ | 816 #endif // V8_ASSEMBLER_IA32_H_ |
OLD | NEW |