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

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

Issue 6902066: Add AST ID to RelocInfo for type-recording ICs. Changes 7644 and 7632, combined. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix an issue where a switch statement label ID could be used for both a load IC and a compare IC. 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 | « no previous file | src/arm/assembler-arm.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 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 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 void BlockConstPoolFor(int instructions); 1160 void BlockConstPoolFor(int instructions);
1161 1161
1162 // Debugging 1162 // Debugging
1163 1163
1164 // Mark address of the ExitJSFrame code. 1164 // Mark address of the ExitJSFrame code.
1165 void RecordJSReturn(); 1165 void RecordJSReturn();
1166 1166
1167 // Mark address of a debug break slot. 1167 // Mark address of a debug break slot.
1168 void RecordDebugBreakSlot(); 1168 void RecordDebugBreakSlot();
1169 1169
1170 // Record the AST id of the CallIC being compiled, so that it can be placed
1171 // in the relocation information.
1172 void RecordAstId(unsigned ast_id) { ast_id_for_reloc_info_ = ast_id; }
1173
1170 // Record a comment relocation entry that can be used by a disassembler. 1174 // Record a comment relocation entry that can be used by a disassembler.
1171 // Use --code-comments to enable. 1175 // Use --code-comments to enable.
1172 void RecordComment(const char* msg); 1176 void RecordComment(const char* msg);
1173 1177
1174 // Writes a single byte or word of data in the code stream. Used 1178 // Writes a single byte or word of data in the code stream. Used
1175 // for inline tables, e.g., jump-tables. The constant pool should be 1179 // for inline tables, e.g., jump-tables. The constant pool should be
1176 // emitted before any use of db and dd to ensure that constant pools 1180 // emitted before any use of db and dd to ensure that constant pools
1177 // are not emitted as part of the tables generated. 1181 // are not emitted as part of the tables generated.
1178 void db(uint8_t data); 1182 void db(uint8_t data);
1179 void dd(uint32_t data); 1183 void dd(uint32_t data);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 static bool IsCmpRegister(Instr instr); 1221 static bool IsCmpRegister(Instr instr);
1218 static bool IsCmpImmediate(Instr instr); 1222 static bool IsCmpImmediate(Instr instr);
1219 static Register GetCmpImmediateRegister(Instr instr); 1223 static Register GetCmpImmediateRegister(Instr instr);
1220 static int GetCmpImmediateRawImmediate(Instr instr); 1224 static int GetCmpImmediateRawImmediate(Instr instr);
1221 static bool IsNop(Instr instr, int type = NON_MARKING_NOP); 1225 static bool IsNop(Instr instr, int type = NON_MARKING_NOP);
1222 1226
1223 // Check if is time to emit a constant pool for pending reloc info entries 1227 // Check if is time to emit a constant pool for pending reloc info entries
1224 void CheckConstPool(bool force_emit, bool require_jump); 1228 void CheckConstPool(bool force_emit, bool require_jump);
1225 1229
1226 protected: 1230 protected:
1231 // Relocation for a type-recording IC has the AST id added to it. This
1232 // member variable is a way to pass the information from the call site to
1233 // the relocation info.
1234 unsigned ast_id_for_reloc_info_;
1235
1227 bool emit_debug_code() const { return emit_debug_code_; } 1236 bool emit_debug_code() const { return emit_debug_code_; }
1228 1237
1229 int buffer_space() const { return reloc_info_writer.pos() - pc_; } 1238 int buffer_space() const { return reloc_info_writer.pos() - pc_; }
1230 1239
1231 // Read/patch instructions 1240 // Read/patch instructions
1232 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); } 1241 Instr instr_at(int pos) { return *reinterpret_cast<Instr*>(buffer_ + pos); }
1233 void instr_at_put(int pos, Instr instr) { 1242 void instr_at_put(int pos, Instr instr) {
1234 *reinterpret_cast<Instr*>(buffer_ + pos) = instr; 1243 *reinterpret_cast<Instr*>(buffer_ + pos) = instr;
1235 } 1244 }
1236 1245
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 public: 1373 public:
1365 explicit EnsureSpace(Assembler* assembler) { 1374 explicit EnsureSpace(Assembler* assembler) {
1366 assembler->CheckBuffer(); 1375 assembler->CheckBuffer();
1367 } 1376 }
1368 }; 1377 };
1369 1378
1370 1379
1371 } } // namespace v8::internal 1380 } } // namespace v8::internal
1372 1381
1373 #endif // V8_ARM_ASSEMBLER_ARM_H_ 1382 #endif // V8_ARM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm/assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698