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

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

Issue 609843002: Refactor FrameAndConstantPoolScope and ConstantPoolUnavailableScope to be architecture independent (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Re-factoring to enable FrameAndConstantPoolScope and ConstantPoolUnavailableScope to be used by oth… Created 6 years, 2 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
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 1093 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 static bool IsEmittedConstant(Instr instr); 1104 static bool IsEmittedConstant(Instr instr);
1105 1105
1106 void CheckTrampolinePool(); 1106 void CheckTrampolinePool();
1107 1107
1108 // Allocate a constant pool of the correct size for the generated code. 1108 // Allocate a constant pool of the correct size for the generated code.
1109 Handle<ConstantPoolArray> NewConstantPool(Isolate* isolate); 1109 Handle<ConstantPoolArray> NewConstantPool(Isolate* isolate);
1110 1110
1111 // Generate the constant pool for the generated code. 1111 // Generate the constant pool for the generated code.
1112 void PopulateConstantPool(ConstantPoolArray* constant_pool); 1112 void PopulateConstantPool(ConstantPoolArray* constant_pool);
1113 1113
1114 bool is_constant_pool_available() const { return false; }
1115
1114 protected: 1116 protected:
1115 // Relocation for a type-recording IC has the AST id added to it. This 1117 // Relocation for a type-recording IC has the AST id added to it. This
1116 // member variable is a way to pass the information from the call site to 1118 // member variable is a way to pass the information from the call site to
1117 // the relocation info. 1119 // the relocation info.
1118 TypeFeedbackId recorded_ast_id_; 1120 TypeFeedbackId recorded_ast_id_;
1119 1121
1120 int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; } 1122 int32_t buffer_space() const { return reloc_info_writer.pos() - pc_; }
1121 1123
1122 // Decode branch instruction at pos and return branch target pos. 1124 // Decode branch instruction at pos and return branch target pos.
1123 int target_at(int32_t pos); 1125 int target_at(int32_t pos);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 1169
1168 void EndBlockGrowBuffer() { 1170 void EndBlockGrowBuffer() {
1169 DCHECK(block_buffer_growth_); 1171 DCHECK(block_buffer_growth_);
1170 block_buffer_growth_ = false; 1172 block_buffer_growth_ = false;
1171 } 1173 }
1172 1174
1173 bool is_buffer_growth_blocked() const { 1175 bool is_buffer_growth_blocked() const {
1174 return block_buffer_growth_; 1176 return block_buffer_growth_;
1175 } 1177 }
1176 1178
1179 void set_constant_pool_available(bool available) {
1180 // Constant pool is not supported on mips.
1181 UNREACHABLE();
1182 }
1183
1177 private: 1184 private:
1178 // Buffer size and constant pool distance are checked together at regular 1185 // Buffer size and constant pool distance are checked together at regular
1179 // intervals of kBufferCheckInterval emitted bytes. 1186 // intervals of kBufferCheckInterval emitted bytes.
1180 static const int kBufferCheckInterval = 1*KB/2; 1187 static const int kBufferCheckInterval = 1*KB/2;
1181 1188
1182 // Code generation. 1189 // Code generation.
1183 // The relocation writer's position is at least kGap bytes below the end of 1190 // The relocation writer's position is at least kGap bytes below the end of
1184 // the generated instructions. This is so that multi-instruction sequences do 1191 // the generated instructions. This is so that multi-instruction sequences do
1185 // not have to check for overflow. The same is true for writes of large 1192 // not have to check for overflow. The same is true for writes of large
1186 // relocation info entries. 1193 // relocation info entries.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 bool internal_trampoline_exception_; 1368 bool internal_trampoline_exception_;
1362 1369
1363 friend class RegExpMacroAssemblerMIPS; 1370 friend class RegExpMacroAssemblerMIPS;
1364 friend class RelocInfo; 1371 friend class RelocInfo;
1365 friend class CodePatcher; 1372 friend class CodePatcher;
1366 friend class BlockTrampolinePoolScope; 1373 friend class BlockTrampolinePoolScope;
1367 1374
1368 PositionsRecorder positions_recorder_; 1375 PositionsRecorder positions_recorder_;
1369 friend class PositionsRecorder; 1376 friend class PositionsRecorder;
1370 friend class EnsureSpace; 1377 friend class EnsureSpace;
1378
1379 // constant pool
1380 friend class FrameAndConstantPoolScope;
1381 friend class ConstantPoolUnavailableScope;
1371 }; 1382 };
1372 1383
1373 1384
1374 class EnsureSpace BASE_EMBEDDED { 1385 class EnsureSpace BASE_EMBEDDED {
1375 public: 1386 public:
1376 explicit EnsureSpace(Assembler* assembler) { 1387 explicit EnsureSpace(Assembler* assembler) {
1377 assembler->CheckBuffer(); 1388 assembler->CheckBuffer();
1378 } 1389 }
1379 }; 1390 };
1380 1391
1381 } } // namespace v8::internal 1392 } } // namespace v8::internal
1382 1393
1383 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1394 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698