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

Side by Side Diff: src/x64/lithium-x64.cc

Issue 10933087: Consistently use named getters for Lithium operands on x64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments Created 8 years, 3 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/x64/lithium-x64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 191
192 void LGoto::PrintDataTo(StringStream* stream) { 192 void LGoto::PrintDataTo(StringStream* stream) {
193 stream->Add("B%d", block_id()); 193 stream->Add("B%d", block_id());
194 } 194 }
195 195
196 196
197 void LBranch::PrintDataTo(StringStream* stream) { 197 void LBranch::PrintDataTo(StringStream* stream) {
198 stream->Add("B%d | B%d on ", true_block_id(), false_block_id()); 198 stream->Add("B%d | B%d on ", true_block_id(), false_block_id());
199 InputAt(0)->PrintTo(stream); 199 value()->PrintTo(stream);
200 } 200 }
201 201
202 202
203 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) { 203 void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
204 stream->Add("if "); 204 stream->Add("if ");
205 InputAt(0)->PrintTo(stream); 205 left()->PrintTo(stream);
206 stream->Add(" %s ", Token::String(op())); 206 stream->Add(" %s ", Token::String(op()));
207 InputAt(1)->PrintTo(stream); 207 right()->PrintTo(stream);
208 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); 208 stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
209 } 209 }
210 210
211 211
212 void LIsNilAndBranch::PrintDataTo(StringStream* stream) { 212 void LIsNilAndBranch::PrintDataTo(StringStream* stream) {
213 stream->Add("if "); 213 stream->Add("if ");
214 InputAt(0)->PrintTo(stream); 214 value()->PrintTo(stream);
215 stream->Add(kind() == kStrictEquality ? " === " : " == "); 215 stream->Add(kind() == kStrictEquality ? " === " : " == ");
216 stream->Add(nil() == kNullValue ? "null" : "undefined"); 216 stream->Add(nil() == kNullValue ? "null" : "undefined");
217 stream->Add(" then B%d else B%d", true_block_id(), false_block_id()); 217 stream->Add(" then B%d else B%d", true_block_id(), false_block_id());
218 } 218 }
219 219
220 220
221 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { 221 void LIsObjectAndBranch::PrintDataTo(StringStream* stream) {
222 stream->Add("if is_object("); 222 stream->Add("if is_object(");
223 InputAt(0)->PrintTo(stream); 223 value()->PrintTo(stream);
224 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 224 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
225 } 225 }
226 226
227 227
228 void LIsStringAndBranch::PrintDataTo(StringStream* stream) { 228 void LIsStringAndBranch::PrintDataTo(StringStream* stream) {
229 stream->Add("if is_string("); 229 stream->Add("if is_string(");
230 InputAt(0)->PrintTo(stream); 230 value()->PrintTo(stream);
231 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 231 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
232 } 232 }
233 233
234 234
235 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) { 235 void LIsSmiAndBranch::PrintDataTo(StringStream* stream) {
236 stream->Add("if is_smi("); 236 stream->Add("if is_smi(");
237 InputAt(0)->PrintTo(stream); 237 value()->PrintTo(stream);
238 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 238 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
239 } 239 }
240 240
241 241
242 void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) { 242 void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) {
243 stream->Add("if is_undetectable("); 243 stream->Add("if is_undetectable(");
244 InputAt(0)->PrintTo(stream); 244 value()->PrintTo(stream);
245 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 245 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
246 } 246 }
247 247
248 248
249 void LStringCompareAndBranch::PrintDataTo(StringStream* stream) { 249 void LStringCompareAndBranch::PrintDataTo(StringStream* stream) {
250 stream->Add("if string_compare("); 250 stream->Add("if string_compare(");
251 InputAt(0)->PrintTo(stream); 251 left()->PrintTo(stream);
252 InputAt(1)->PrintTo(stream); 252 right()->PrintTo(stream);
253 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 253 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
254 } 254 }
255 255
256 256
257 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { 257 void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
258 stream->Add("if has_instance_type("); 258 stream->Add("if has_instance_type(");
259 InputAt(0)->PrintTo(stream); 259 value()->PrintTo(stream);
260 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 260 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
261 } 261 }
262 262
263 263
264 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) { 264 void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
265 stream->Add("if has_cached_array_index("); 265 stream->Add("if has_cached_array_index(");
266 InputAt(0)->PrintTo(stream); 266 value()->PrintTo(stream);
267 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); 267 stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
268 } 268 }
269 269
270 270
271 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) { 271 void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
272 stream->Add("if class_of_test("); 272 stream->Add("if class_of_test(");
273 InputAt(0)->PrintTo(stream); 273 value()->PrintTo(stream);
274 stream->Add(", \"%o\") then B%d else B%d", 274 stream->Add(", \"%o\") then B%d else B%d",
275 *hydrogen()->class_name(), 275 *hydrogen()->class_name(),
276 true_block_id(), 276 true_block_id(),
277 false_block_id()); 277 false_block_id());
278 } 278 }
279 279
280 280
281 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) { 281 void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
282 stream->Add("if typeof "); 282 stream->Add("if typeof ");
283 InputAt(0)->PrintTo(stream); 283 value()->PrintTo(stream);
284 stream->Add(" == \"%s\" then B%d else B%d", 284 stream->Add(" == \"%s\" then B%d else B%d",
285 *hydrogen()->type_literal()->ToCString(), 285 *hydrogen()->type_literal()->ToCString(),
286 true_block_id(), false_block_id()); 286 true_block_id(), false_block_id());
287 } 287 }
288 288
289 289
290 void LCallConstantFunction::PrintDataTo(StringStream* stream) { 290 void LCallConstantFunction::PrintDataTo(StringStream* stream) {
291 stream->Add("#%d / ", arity()); 291 stream->Add("#%d / ", arity());
292 } 292 }
293 293
294 294
295 void LUnaryMathOperation::PrintDataTo(StringStream* stream) { 295 void LUnaryMathOperation::PrintDataTo(StringStream* stream) {
296 stream->Add("/%s ", hydrogen()->OpName()); 296 stream->Add("/%s ", hydrogen()->OpName());
297 InputAt(0)->PrintTo(stream); 297 value()->PrintTo(stream);
298 } 298 }
299 299
300 300
301 void LLoadContextSlot::PrintDataTo(StringStream* stream) { 301 void LLoadContextSlot::PrintDataTo(StringStream* stream) {
302 InputAt(0)->PrintTo(stream); 302 context()->PrintTo(stream);
303 stream->Add("[%d]", slot_index()); 303 stream->Add("[%d]", slot_index());
304 } 304 }
305 305
306 306
307 void LStoreContextSlot::PrintDataTo(StringStream* stream) { 307 void LStoreContextSlot::PrintDataTo(StringStream* stream) {
308 InputAt(0)->PrintTo(stream); 308 context()->PrintTo(stream);
309 stream->Add("[%d] <- ", slot_index()); 309 stream->Add("[%d] <- ", slot_index());
310 InputAt(1)->PrintTo(stream); 310 value()->PrintTo(stream);
311 } 311 }
312 312
313 313
314 void LInvokeFunction::PrintDataTo(StringStream* stream) { 314 void LInvokeFunction::PrintDataTo(StringStream* stream) {
315 stream->Add("= "); 315 stream->Add("= ");
316 InputAt(0)->PrintTo(stream); 316 function()->PrintTo(stream);
317 stream->Add(" #%d / ", arity()); 317 stream->Add(" #%d / ", arity());
318 } 318 }
319 319
320 320
321 void LCallKeyed::PrintDataTo(StringStream* stream) { 321 void LCallKeyed::PrintDataTo(StringStream* stream) {
322 stream->Add("[rcx] #%d / ", arity()); 322 stream->Add("[rcx] #%d / ", arity());
323 } 323 }
324 324
325 325
326 void LCallNamed::PrintDataTo(StringStream* stream) { 326 void LCallNamed::PrintDataTo(StringStream* stream) {
327 SmartArrayPointer<char> name_string = name()->ToCString(); 327 SmartArrayPointer<char> name_string = name()->ToCString();
328 stream->Add("%s #%d / ", *name_string, arity()); 328 stream->Add("%s #%d / ", *name_string, arity());
329 } 329 }
330 330
331 331
332 void LCallGlobal::PrintDataTo(StringStream* stream) { 332 void LCallGlobal::PrintDataTo(StringStream* stream) {
333 SmartArrayPointer<char> name_string = name()->ToCString(); 333 SmartArrayPointer<char> name_string = name()->ToCString();
334 stream->Add("%s #%d / ", *name_string, arity()); 334 stream->Add("%s #%d / ", *name_string, arity());
335 } 335 }
336 336
337 337
338 void LCallKnownGlobal::PrintDataTo(StringStream* stream) { 338 void LCallKnownGlobal::PrintDataTo(StringStream* stream) {
339 stream->Add("#%d / ", arity()); 339 stream->Add("#%d / ", arity());
340 } 340 }
341 341
342 342
343 void LCallNew::PrintDataTo(StringStream* stream) { 343 void LCallNew::PrintDataTo(StringStream* stream) {
344 stream->Add("= "); 344 stream->Add("= ");
345 InputAt(0)->PrintTo(stream); 345 constructor()->PrintTo(stream);
346 stream->Add(" #%d / ", arity()); 346 stream->Add(" #%d / ", arity());
347 } 347 }
348 348
349 349
350 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { 350 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
351 arguments()->PrintTo(stream); 351 arguments()->PrintTo(stream);
352 352
353 stream->Add(" length "); 353 stream->Add(" length ");
354 length()->PrintTo(stream); 354 length()->PrintTo(stream);
355 355
(...skipping 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2313 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2314 LOperand* object = UseRegister(instr->object()); 2314 LOperand* object = UseRegister(instr->object());
2315 LOperand* index = UseTempRegister(instr->index()); 2315 LOperand* index = UseTempRegister(instr->index());
2316 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2316 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2317 } 2317 }
2318 2318
2319 2319
2320 } } // namespace v8::internal 2320 } } // namespace v8::internal
2321 2321
2322 #endif // V8_TARGET_ARCH_X64 2322 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698