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

Unified Diff: src/hydrogen-instructions.h

Issue 7216009: Change the handling of stack check on backward branches (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed presubmit errors Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index f2ca730b404d6c62585b7de1905cec0d4e4a79e5..c655e8f09cd3798d948949240ea1bc9de2ded7df 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -895,24 +895,15 @@ class HDeoptimize: public HControlInstruction {
class HGoto: public HTemplateControlInstruction<1, 0> {
public:
- explicit HGoto(HBasicBlock* target)
- : include_stack_check_(false) {
+ explicit HGoto(HBasicBlock* target) {
SetSuccessorAt(0, target);
}
- void set_include_stack_check(bool include_stack_check) {
- include_stack_check_ = include_stack_check;
- }
- bool include_stack_check() const { return include_stack_check_; }
-
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::None();
}
DECLARE_CONCRETE_INSTRUCTION(Goto)
-
- private:
- bool include_stack_check_;
};
@@ -1257,13 +1248,31 @@ class HSimulate: public HInstruction {
class HStackCheck: public HTemplateInstruction<0> {
public:
- HStackCheck() { }
+ enum Type {
+ kFunctionEntry,
+ kBackwardsBranch
+ };
+
+ explicit HStackCheck(Type type) : type_(type), eliminated_(false) { }
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::None();
}
+ bool is_function_entry() { return type_ == kFunctionEntry; }
+ bool is_backwards_branch() { return type_ == kBackwardsBranch; }
+
+ void set_eliminated(bool eliminated) {
+ ASSERT(is_backwards_branch());
+ eliminated_ = eliminated;
+ }
+ bool is_eliminated() const { return eliminated_; }
+
DECLARE_CONCRETE_INSTRUCTION(StackCheck)
+
+ private:
+ Type type_;
+ bool eliminated_;
};
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698