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

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

Issue 7043003: Version 3.3.8 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 7 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/messages.js ('k') | src/mips/assembler-mips.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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 809
810 // Writes a single byte or word of data in the code stream. Used for 810 // Writes a single byte or word of data in the code stream. Used for
811 // inline tables, e.g., jump-tables. 811 // inline tables, e.g., jump-tables.
812 void db(uint8_t data); 812 void db(uint8_t data);
813 void dd(uint32_t data); 813 void dd(uint32_t data);
814 814
815 int32_t pc_offset() const { return pc_ - buffer_; } 815 int32_t pc_offset() const { return pc_ - buffer_; }
816 816
817 PositionsRecorder* positions_recorder() { return &positions_recorder_; } 817 PositionsRecorder* positions_recorder() { return &positions_recorder_; }
818 818
819 bool can_peephole_optimize(int instructions) {
820 if (!allow_peephole_optimization_) return false;
821 if (last_bound_pos_ > pc_offset() - instructions * kInstrSize) return false;
822 return reloc_info_writer.last_pc() <= pc_ - instructions * kInstrSize;
823 }
824
825 // Postpone the generation of the trampoline pool for the specified number of 819 // Postpone the generation of the trampoline pool for the specified number of
826 // instructions. 820 // instructions.
827 void BlockTrampolinePoolFor(int instructions); 821 void BlockTrampolinePoolFor(int instructions);
828 822
829 // Check if there is less than kGap bytes available in the buffer. 823 // Check if there is less than kGap bytes available in the buffer.
830 // If this is the case, we need to grow the buffer before emitting 824 // If this is the case, we need to grow the buffer before emitting
831 // an instruction or relocation information. 825 // an instruction or relocation information.
832 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; } 826 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; }
833 827
834 // Get the number of bytes available in the buffer. 828 // Get the number of bytes available in the buffer.
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 1113
1120 List<Trampoline> trampolines_; 1114 List<Trampoline> trampolines_;
1121 bool internal_trampoline_exception_; 1115 bool internal_trampoline_exception_;
1122 1116
1123 friend class RegExpMacroAssemblerMIPS; 1117 friend class RegExpMacroAssemblerMIPS;
1124 friend class RelocInfo; 1118 friend class RelocInfo;
1125 friend class CodePatcher; 1119 friend class CodePatcher;
1126 friend class BlockTrampolinePoolScope; 1120 friend class BlockTrampolinePoolScope;
1127 1121
1128 PositionsRecorder positions_recorder_; 1122 PositionsRecorder positions_recorder_;
1129 bool allow_peephole_optimization_;
1130 bool emit_debug_code_; 1123 bool emit_debug_code_;
1131 friend class PositionsRecorder; 1124 friend class PositionsRecorder;
1132 friend class EnsureSpace; 1125 friend class EnsureSpace;
1133 }; 1126 };
1134 1127
1135 1128
1136 class EnsureSpace BASE_EMBEDDED { 1129 class EnsureSpace BASE_EMBEDDED {
1137 public: 1130 public:
1138 explicit EnsureSpace(Assembler* assembler) { 1131 explicit EnsureSpace(Assembler* assembler) {
1139 assembler->CheckBuffer(); 1132 assembler->CheckBuffer();
1140 } 1133 }
1141 }; 1134 };
1142 1135
1143 } } // namespace v8::internal 1136 } } // namespace v8::internal
1144 1137
1145 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1138 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/mips/assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698