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

Unified Diff: src/ast.h

Issue 8538011: Reapply "Add a level of indirection to exception handler addresses." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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/arm/macro-assembler-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 12c755b6c4c3334cbf46381356ded3625d0cdc42..71639d5dd2d8a29645b3d26a543c810d0f4efa55 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -835,18 +835,25 @@ class TargetCollector: public AstNode {
class TryStatement: public Statement {
public:
- explicit TryStatement(Block* try_block)
- : try_block_(try_block), escaping_targets_(NULL) { }
+ explicit TryStatement(int index, Block* try_block)
+ : index_(index),
+ try_block_(try_block),
+ escaping_targets_(NULL) {
+ }
void set_escaping_targets(ZoneList<Label*>* targets) {
escaping_targets_ = targets;
}
+ int index() const { return index_; }
Block* try_block() const { return try_block_; }
ZoneList<Label*>* escaping_targets() const { return escaping_targets_; }
virtual bool IsInlineable() const;
private:
+ // Unique (per-function) index of this handler. This is not an AST ID.
+ int index_;
+
Block* try_block_;
ZoneList<Label*>* escaping_targets_;
};
@@ -854,11 +861,12 @@ class TryStatement: public Statement {
class TryCatchStatement: public TryStatement {
public:
- TryCatchStatement(Block* try_block,
+ TryCatchStatement(int index,
+ Block* try_block,
Scope* scope,
Variable* variable,
Block* catch_block)
- : TryStatement(try_block),
+ : TryStatement(index, try_block),
scope_(scope),
variable_(variable),
catch_block_(catch_block) {
@@ -880,8 +888,8 @@ class TryCatchStatement: public TryStatement {
class TryFinallyStatement: public TryStatement {
public:
- TryFinallyStatement(Block* try_block, Block* finally_block)
- : TryStatement(try_block),
+ TryFinallyStatement(int index, Block* try_block, Block* finally_block)
+ : TryStatement(index, try_block),
finally_block_(finally_block) { }
DECLARE_NODE_TYPE(TryFinallyStatement)
@@ -1644,6 +1652,7 @@ class FunctionLiteral: public Expression {
ZoneList<Statement*>* body,
int materialized_literal_count,
int expected_property_count,
+ int handler_count,
bool has_only_simple_this_property_assignments,
Handle<FixedArray> this_property_assignments,
int parameter_count,
@@ -1657,6 +1666,7 @@ class FunctionLiteral: public Expression {
inferred_name_(isolate->factory()->empty_string()),
materialized_literal_count_(materialized_literal_count),
expected_property_count_(expected_property_count),
+ handler_count_(handler_count),
parameter_count_(parameter_count),
function_token_position_(RelocInfo::kNoPosition) {
bitfield_ =
@@ -1684,6 +1694,7 @@ class FunctionLiteral: public Expression {
int materialized_literal_count() { return materialized_literal_count_; }
int expected_property_count() { return expected_property_count_; }
+ int handler_count() { return handler_count_; }
bool has_only_simple_this_property_assignments() {
return HasOnlySimpleThisPropertyAssignments::decode(bitfield_);
}
@@ -1721,6 +1732,7 @@ class FunctionLiteral: public Expression {
int materialized_literal_count_;
int expected_property_count_;
+ int handler_count_;
int parameter_count_;
int function_token_position_;
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698