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

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

Issue 10701157: Rename LChunkBase to LChunk, LChunk to LPlatformChunk and remove some unneeded explicit constructor… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 5 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/ia32/lithium-ia32.h ('k') | src/lithium.h » ('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 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 arguments()->PrintTo(stream); 359 arguments()->PrintTo(stream);
360 360
361 stream->Add(" length "); 361 stream->Add(" length ");
362 length()->PrintTo(stream); 362 length()->PrintTo(stream);
363 363
364 stream->Add(" index "); 364 stream->Add(" index ");
365 index()->PrintTo(stream); 365 index()->PrintTo(stream);
366 } 366 }
367 367
368 368
369 int LChunk::GetNextSpillIndex(bool is_double) { 369 int LPlatformChunk::GetNextSpillIndex(bool is_double) {
370 // Skip a slot if for a double-width slot. 370 // Skip a slot if for a double-width slot.
371 if (is_double) { 371 if (is_double) {
372 spill_slot_count_++; 372 spill_slot_count_++;
373 spill_slot_count_ |= 1; 373 spill_slot_count_ |= 1;
374 num_double_slots_++; 374 num_double_slots_++;
375 } 375 }
376 return spill_slot_count_++; 376 return spill_slot_count_++;
377 } 377 }
378 378
379 379
380 LOperand* LChunk::GetNextSpillSlot(bool is_double) { 380 LOperand* LPlatformChunk::GetNextSpillSlot(bool is_double) {
381 int index = GetNextSpillIndex(is_double); 381 int index = GetNextSpillIndex(is_double);
382 if (is_double) { 382 if (is_double) {
383 return LDoubleStackSlot::Create(index, zone()); 383 return LDoubleStackSlot::Create(index, zone());
384 } else { 384 } else {
385 return LStackSlot::Create(index, zone()); 385 return LStackSlot::Create(index, zone());
386 } 386 }
387 } 387 }
388 388
389 389
390 void LStoreNamedField::PrintDataTo(StringStream* stream) { 390 void LStoreNamedField::PrintDataTo(StringStream* stream) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 value()->PrintTo(stream); 431 value()->PrintTo(stream);
432 } 432 }
433 433
434 434
435 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { 435 void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
436 object()->PrintTo(stream); 436 object()->PrintTo(stream);
437 stream->Add(" %p -> %p", *original_map(), *transitioned_map()); 437 stream->Add(" %p -> %p", *original_map(), *transitioned_map());
438 } 438 }
439 439
440 440
441 LChunk* LChunkBuilder::Build() { 441 LPlatformChunk* LChunkBuilder::Build() {
442 ASSERT(is_unused()); 442 ASSERT(is_unused());
443 chunk_ = new(zone()) LChunk(info(), graph()); 443 chunk_ = new(zone()) LPlatformChunk(info(), graph());
444 HPhase phase("L_Building chunk", chunk_); 444 HPhase phase("L_Building chunk", chunk_);
445 status_ = BUILDING; 445 status_ = BUILDING;
446 446
447 // Reserve the first spill slot for the state of dynamic alignment. 447 // Reserve the first spill slot for the state of dynamic alignment.
448 int alignment_state_index = chunk_->GetNextSpillIndex(false); 448 int alignment_state_index = chunk_->GetNextSpillIndex(false);
449 ASSERT_EQ(alignment_state_index, 0); 449 ASSERT_EQ(alignment_state_index, 0);
450 USE(alignment_state_index); 450 USE(alignment_state_index);
451 451
452 const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); 452 const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
453 for (int i = 0; i < blocks->length(); i++) { 453 for (int i = 0; i < blocks->length(); i++) {
454 HBasicBlock* next = NULL; 454 HBasicBlock* next = NULL;
455 if (i < blocks->length() - 1) next = blocks->at(i + 1); 455 if (i < blocks->length() - 1) next = blocks->at(i + 1);
456 DoBasicBlock(blocks->at(i), next); 456 DoBasicBlock(blocks->at(i), next);
457 if (is_aborted()) return NULL; 457 if (is_aborted()) return NULL;
458 } 458 }
459 status_ = DONE; 459 status_ = DONE;
460 return chunk_; 460 return chunk_;
461 } 461 }
462 462
463 463
464 void LChunkBuilder::Abort(const char* format, ...) { 464 void LChunkBuilder::Abort(const char* format, ...) {
465 if (FLAG_trace_bailout) { 465 if (FLAG_trace_bailout) {
466 SmartArrayPointer<char> name( 466 SmartArrayPointer<char> name(
467 info()->shared_info()->DebugName()->ToCString()); 467 info()->shared_info()->DebugName()->ToCString());
468 PrintF("Aborting LChunk building in @\"%s\": ", *name); 468 PrintF("Aborting LPlatformChunk building in @\"%s\": ", *name);
469 va_list arguments; 469 va_list arguments;
470 va_start(arguments, format); 470 va_start(arguments, format);
471 OS::VPrint(format, arguments); 471 OS::VPrint(format, arguments);
472 va_end(arguments); 472 va_end(arguments);
473 PrintF("\n"); 473 PrintF("\n");
474 } 474 }
475 status_ = ABORTED; 475 status_ = ABORTED;
476 } 476 }
477 477
478 478
(...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2382 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2383 LOperand* object = UseRegister(instr->object()); 2383 LOperand* object = UseRegister(instr->object());
2384 LOperand* index = UseTempRegister(instr->index()); 2384 LOperand* index = UseTempRegister(instr->index());
2385 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2385 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2386 } 2386 }
2387 2387
2388 2388
2389 } } // namespace v8::internal 2389 } } // namespace v8::internal
2390 2390
2391 #endif // V8_TARGET_ARCH_IA32 2391 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/lithium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698