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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 bool last_position_is_statement() const { |
649 return last_position_is_statement_; | 649 return last_position_is_statement_; |
650 } | 650 } |
651 | 651 |
| 652 // Temporary helper function. Used by codegen.cc. |
| 653 int last_statement_position() const { return last_position_; } |
| 654 |
652 protected: | 655 protected: |
653 int buffer_space() const { return reloc_info_writer.pos() - pc_; } | 656 int buffer_space() const { return reloc_info_writer.pos() - pc_; } |
654 | 657 |
655 // Read/patch instructions | 658 // Read/patch instructions |
656 Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); } | 659 Instr instr_at(byte* pc) { return *reinterpret_cast<Instr*>(pc); } |
657 void instr_at_put(byte* pc, Instr instr) { | 660 void instr_at_put(byte* pc, Instr instr) { |
658 *reinterpret_cast<Instr*>(pc) = instr; | 661 *reinterpret_cast<Instr*>(pc) = instr; |
659 } | 662 } |
660 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } | 663 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } |
661 void instr_at_put(int pos, Instr instr) { | 664 void instr_at_put(int pos, Instr instr) { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 | 779 |
777 // Block the emission of the constant pool before pc_offset | 780 // Block the emission of the constant pool before pc_offset |
778 void BlockConstPoolBefore(int pc_offset) { | 781 void BlockConstPoolBefore(int pc_offset) { |
779 if (no_const_pool_before_ < pc_offset) no_const_pool_before_ = pc_offset; | 782 if (no_const_pool_before_ < pc_offset) no_const_pool_before_ = pc_offset; |
780 } | 783 } |
781 }; | 784 }; |
782 | 785 |
783 } } // namespace v8::internal | 786 } } // namespace v8::internal |
784 | 787 |
785 #endif // V8_ASSEMBLER_ARM_H_ | 788 #endif // V8_ASSEMBLER_ARM_H_ |
OLD | NEW |