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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 8380017: Add and use ElementsKind side effect (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 1 month 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/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.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 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
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
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
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
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698