| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index f2ca730b404d6c62585b7de1905cec0d4e4a79e5..e70dcf8cd2b332a8d02e59e7ebe130b14bcbf20e 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,32 @@ class HSimulate: public HInstruction {
|
|
|
| class HStackCheck: public HTemplateInstruction<0> {
|
| public:
|
| - HStackCheck() { }
|
| + enum Type {
|
| + kFunctionEntry,
|
| + kBackwardsBranch
|
| + };
|
| +
|
| + explicit HStackCheck(Type type) : type_(type) { }
|
|
|
| virtual Representation RequiredInputRepresentation(int index) const {
|
| return Representation::None();
|
| }
|
|
|
| + void Eliminate() {
|
| + // The stack check eliminator might try to eliminate the same stack
|
| + // check instruction multiple times.
|
| + if (IsLinked()) {
|
| + DeleteFromGraph();
|
| + }
|
| + }
|
| +
|
| + bool is_function_entry() { return type_ == kFunctionEntry; }
|
| + bool is_backwards_branch() { return type_ == kBackwardsBranch; }
|
| +
|
| DECLARE_CONCRETE_INSTRUCTION(StackCheck)
|
| +
|
| + private:
|
| + Type type_;
|
| };
|
|
|
|
|
|
|