| Index: src/hydrogen.h
|
| diff --git a/src/hydrogen.h b/src/hydrogen.h
|
| index 7d23ac7306cce97bc31f21a29a2fdee8bceb7c14..7d8d261e379c532c1c699840287f2338c9685056 100644
|
| --- a/src/hydrogen.h
|
| +++ b/src/hydrogen.h
|
| @@ -526,6 +526,13 @@ class HEnvironment: public ZoneObject {
|
|
|
| void SetExpressionStackAt(int index_from_top, HValue* value);
|
|
|
| + int handler_count() { return handler_count_; }
|
| + void AddExceptionHandler() { ++handler_count_; }
|
| + void RemoveExceptionHandler() {
|
| + ASSERT(handler_count_ > 0);
|
| + --handler_count_;
|
| + }
|
| +
|
| HEnvironment* Copy() const;
|
| HEnvironment* CopyWithoutHistory() const;
|
| HEnvironment* CopyAsLoopHeader(HBasicBlock* block) const;
|
| @@ -599,6 +606,7 @@ class HEnvironment: public ZoneObject {
|
| int parameter_count_;
|
| int specials_count_;
|
| int local_count_;
|
| + int handler_count_;
|
| HEnvironment* outer_;
|
| int pop_count_;
|
| int push_count_;
|
| @@ -809,15 +817,15 @@ class HGraphBuilder: public AstVisitor {
|
| // can have a separate lifetime.
|
| class BreakAndContinueInfo BASE_EMBEDDED {
|
| public:
|
| - explicit BreakAndContinueInfo(BreakableStatement* target,
|
| - int drop_extra = 0)
|
| - : target_(target),
|
| + BreakAndContinueInfo(Statement* statement, int drop_extra)
|
| + : statement_(statement),
|
| break_block_(NULL),
|
| continue_block_(NULL),
|
| drop_extra_(drop_extra) {
|
| }
|
|
|
| - BreakableStatement* target() { return target_; }
|
| + Statement* statement() { return statement_; }
|
| +
|
| HBasicBlock* break_block() { return break_block_; }
|
| void set_break_block(HBasicBlock* block) { break_block_ = block; }
|
| HBasicBlock* continue_block() { return continue_block_; }
|
| @@ -825,7 +833,7 @@ class HGraphBuilder: public AstVisitor {
|
| int drop_extra() { return drop_extra_; }
|
|
|
| private:
|
| - BreakableStatement* target_;
|
| + Statement* statement_;
|
| HBasicBlock* break_block_;
|
| HBasicBlock* continue_block_;
|
| int drop_extra_;
|
| @@ -846,8 +854,13 @@ class HGraphBuilder: public AstVisitor {
|
| HGraphBuilder* owner() { return owner_; }
|
| BreakAndContinueScope* next() { return next_; }
|
|
|
| - // Search the break stack for a break or continue target.
|
| - HBasicBlock* Get(BreakableStatement* stmt, BreakType type, int* drop_extra);
|
| + // Search the break stack for a break or continue target, emit any
|
| + // instructions necessary to unwind the break stack and emit a jump to
|
| + // the target block.
|
| + void Unwind(BreakableStatement* target, BreakType type);
|
| +
|
| + // Unwind the entire break stack for returning from the function.
|
| + void UnwindReturn();
|
|
|
| private:
|
| BreakAndContinueInfo* info_;
|
|
|