OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 | 458 |
459 if (representation().IsTagged() && !type().Equals(HType::Tagged())) { | 459 if (representation().IsTagged() && !type().Equals(HType::Tagged())) { |
460 stream->Add(" type[%s]", type().ToString()); | 460 stream->Add(" type[%s]", type().ToString()); |
461 } | 461 } |
462 } | 462 } |
463 | 463 |
464 | 464 |
465 void HInstruction::Unlink() { | 465 void HInstruction::Unlink() { |
466 ASSERT(IsLinked()); | 466 ASSERT(IsLinked()); |
467 ASSERT(!IsControlInstruction()); // Must never move control instructions. | 467 ASSERT(!IsControlInstruction()); // Must never move control instructions. |
| 468 ASSERT(!IsBlockEntry()); // Doesn't make sense to delete these. |
| 469 ASSERT(previous_ != NULL); |
| 470 previous_->next_ = next_; |
| 471 if (next_ == NULL) { |
| 472 ASSERT(block()->last() == this); |
| 473 block()->set_last(previous_); |
| 474 } else { |
| 475 next_->previous_ = previous_; |
| 476 } |
468 clear_block(); | 477 clear_block(); |
469 if (previous_ != NULL) previous_->next_ = next_; | |
470 if (next_ != NULL) next_->previous_ = previous_; | |
471 } | 478 } |
472 | 479 |
473 | 480 |
474 void HInstruction::InsertBefore(HInstruction* next) { | 481 void HInstruction::InsertBefore(HInstruction* next) { |
475 ASSERT(!IsLinked()); | 482 ASSERT(!IsLinked()); |
476 ASSERT(!next->IsBlockEntry()); | 483 ASSERT(!next->IsBlockEntry()); |
477 ASSERT(!IsControlInstruction()); | 484 ASSERT(!IsControlInstruction()); |
478 ASSERT(!next->block()->IsStartBlock()); | 485 ASSERT(!next->block()->IsStartBlock()); |
479 ASSERT(next->previous_ != NULL); | 486 ASSERT(next->previous_ != NULL); |
480 HInstruction* prev = next->previous(); | 487 HInstruction* prev = next->previous(); |
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1472 | 1479 |
1473 | 1480 |
1474 void HCheckPrototypeMaps::Verify() { | 1481 void HCheckPrototypeMaps::Verify() { |
1475 HInstruction::Verify(); | 1482 HInstruction::Verify(); |
1476 ASSERT(HasNoUses()); | 1483 ASSERT(HasNoUses()); |
1477 } | 1484 } |
1478 | 1485 |
1479 #endif | 1486 #endif |
1480 | 1487 |
1481 } } // namespace v8::internal | 1488 } } // namespace v8::internal |
OLD | NEW |