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

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

Issue 12224090: Remove instructions properly (stack check elimination was leaving "dangling uses" around). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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 | « no previous file | src/hydrogen-instructions.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 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 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 HValue* context() { return OperandAt(0); } 1538 HValue* context() { return OperandAt(0); }
1539 1539
1540 virtual Representation RequiredInputRepresentation(int index) { 1540 virtual Representation RequiredInputRepresentation(int index) {
1541 return Representation::Tagged(); 1541 return Representation::Tagged();
1542 } 1542 }
1543 1543
1544 void Eliminate() { 1544 void Eliminate() {
1545 // The stack check eliminator might try to eliminate the same stack 1545 // The stack check eliminator might try to eliminate the same stack
1546 // check instruction multiple times. 1546 // check instruction multiple times.
1547 if (IsLinked()) { 1547 if (IsLinked()) {
1548 DeleteFromGraph(); 1548 DeleteAndReplaceWith(NULL);
1549 } 1549 }
1550 } 1550 }
1551 1551
1552 bool is_function_entry() { return type_ == kFunctionEntry; } 1552 bool is_function_entry() { return type_ == kFunctionEntry; }
1553 bool is_backwards_branch() { return type_ == kBackwardsBranch; } 1553 bool is_backwards_branch() { return type_ == kBackwardsBranch; }
1554 1554
1555 DECLARE_CONCRETE_INSTRUCTION(StackCheck) 1555 DECLARE_CONCRETE_INSTRUCTION(StackCheck)
1556 1556
1557 private: 1557 private:
1558 Type type_; 1558 Type type_;
(...skipping 4184 matching lines...) Expand 10 before | Expand all | Expand 10 after
5743 virtual bool IsDeletable() const { return true; } 5743 virtual bool IsDeletable() const { return true; }
5744 }; 5744 };
5745 5745
5746 5746
5747 #undef DECLARE_INSTRUCTION 5747 #undef DECLARE_INSTRUCTION
5748 #undef DECLARE_CONCRETE_INSTRUCTION 5748 #undef DECLARE_CONCRETE_INSTRUCTION
5749 5749
5750 } } // namespace v8::internal 5750 } } // namespace v8::internal
5751 5751
5752 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 5752 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698