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

Unified Diff: src/hydrogen.h

Issue 20680002: Rebase of partial ia32 implementation of optimized try/catch (started by Kevin Millikin, continued … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix detection of CATCH frames (fixes debuger exception reporting anf breaks another assertion...). Created 7 years, 5 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
« no previous file with comments | « src/full-codegen.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 8f273f4967e4fb6538f558a9620026deb716ef00..f27e4fe8ff9329b1ecd155ece34e2a9fcd149410 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -599,6 +599,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;
@@ -692,6 +699,7 @@ class HEnvironment: public ZoneObject {
int parameter_count_;
int specials_count_;
int local_count_;
+ int handler_count_;
HEnvironment* outer_;
HEnterInlined* entry_;
int pop_count_;
@@ -1389,15 +1397,15 @@ class HOptimizedGraphBuilder: public 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_; }
@@ -1405,7 +1413,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
int drop_extra() { return drop_extra_; }
private:
- BreakableStatement* target_;
+ Statement* statement_;
HBasicBlock* break_block_;
HBasicBlock* continue_block_;
int drop_extra_;
@@ -1427,9 +1435,15 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
HOptimizedGraphBuilder* owner() { return owner_; }
BreakAndContinueScope* next() { return next_; }
- // Search the break stack for a break or continue target.
enum BreakType { BREAK, CONTINUE };
- 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_;
« no previous file with comments | « src/full-codegen.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698