| 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 if (block->IsStartBlock() && block->IsFinished() && !IsConstant()) { | 557 if (block->IsStartBlock() && block->IsFinished() && !IsConstant()) { |
| 558 ASSERT(block->end()->SecondSuccessor() == NULL); | 558 ASSERT(block->end()->SecondSuccessor() == NULL); |
| 559 InsertAfter(block->end()->FirstSuccessor()->first()); | 559 InsertAfter(block->end()->FirstSuccessor()->first()); |
| 560 return; | 560 return; |
| 561 } | 561 } |
| 562 | 562 |
| 563 // If we're inserting after an instruction with side-effects that is | 563 // If we're inserting after an instruction with side-effects that is |
| 564 // followed by a simulate instruction, we need to insert after the | 564 // followed by a simulate instruction, we need to insert after the |
| 565 // simulate instruction instead. | 565 // simulate instruction instead. |
| 566 HInstruction* next = previous->next_; | 566 HInstruction* next = previous->next_; |
| 567 if (previous->HasSideEffects() && next != NULL) { | 567 if (previous->HasObservableSideEffects() && next != NULL) { |
| 568 ASSERT(next->IsSimulate()); | 568 ASSERT(next->IsSimulate()); |
| 569 previous = next; | 569 previous = next; |
| 570 next = previous->next_; | 570 next = previous->next_; |
| 571 } | 571 } |
| 572 | 572 |
| 573 previous_ = previous; | 573 previous_ = previous; |
| 574 next_ = next; | 574 next_ = next; |
| 575 SetBlock(block); | 575 SetBlock(block); |
| 576 previous->next_ = this; | 576 previous->next_ = this; |
| 577 if (next != NULL) next->previous_ = this; | 577 if (next != NULL) next->previous_ = this; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 597 } | 597 } |
| 598 } else { | 598 } else { |
| 599 // If the following assert fires, you may have forgotten an | 599 // If the following assert fires, you may have forgotten an |
| 600 // AddInstruction. | 600 // AddInstruction. |
| 601 ASSERT(other_block->Dominates(cur_block)); | 601 ASSERT(other_block->Dominates(cur_block)); |
| 602 } | 602 } |
| 603 } | 603 } |
| 604 | 604 |
| 605 // Verify that instructions that may have side-effects are followed | 605 // Verify that instructions that may have side-effects are followed |
| 606 // by a simulate instruction. | 606 // by a simulate instruction. |
| 607 if (HasSideEffects() && !IsOsrEntry()) { | 607 if (HasObservableSideEffects() && !IsOsrEntry()) { |
| 608 ASSERT(next()->IsSimulate()); | 608 ASSERT(next()->IsSimulate()); |
| 609 } | 609 } |
| 610 | 610 |
| 611 // Verify that instructions that can be eliminated by GVN have overridden | 611 // Verify that instructions that can be eliminated by GVN have overridden |
| 612 // HValue::DataEquals. The default implementation is UNREACHABLE. We | 612 // HValue::DataEquals. The default implementation is UNREACHABLE. We |
| 613 // don't actually care whether DataEquals returns true or false here. | 613 // don't actually care whether DataEquals returns true or false here. |
| 614 if (CheckFlag(kUseGVN)) DataEquals(this); | 614 if (CheckFlag(kUseGVN)) DataEquals(this); |
| 615 } | 615 } |
| 616 #endif | 616 #endif |
| 617 | 617 |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1984 | 1984 |
| 1985 | 1985 |
| 1986 void HCheckPrototypeMaps::Verify() { | 1986 void HCheckPrototypeMaps::Verify() { |
| 1987 HInstruction::Verify(); | 1987 HInstruction::Verify(); |
| 1988 ASSERT(HasNoUses()); | 1988 ASSERT(HasNoUses()); |
| 1989 } | 1989 } |
| 1990 | 1990 |
| 1991 #endif | 1991 #endif |
| 1992 | 1992 |
| 1993 } } // namespace v8::internal | 1993 } } // namespace v8::internal |
| OLD | NEW |