Index: src/ast.h |
diff --git a/src/ast.h b/src/ast.h |
index 73b06631e49c8312ed4435a59735222a0a3ad017..01154d37628a9f8518497f8428c8523922db54be 100644 |
--- a/src/ast.h |
+++ b/src/ast.h |
@@ -1161,17 +1161,13 @@ class IfStatement final : public Statement { |
class TryStatement : public Statement { |
public: |
- int index() const { return index_; } |
Block* try_block() const { return try_block_; } |
protected: |
- TryStatement(Zone* zone, int index, Block* try_block, int pos) |
- : Statement(zone, pos), index_(index), try_block_(try_block) {} |
+ TryStatement(Zone* zone, Block* try_block, int pos) |
+ : Statement(zone, pos), try_block_(try_block) {} |
private: |
- // Unique (per-function) index of this handler. This is not an AST ID. |
- int index_; |
- |
Block* try_block_; |
}; |
@@ -1185,18 +1181,12 @@ class TryCatchStatement final : public TryStatement { |
Block* catch_block() const { return catch_block_; } |
protected: |
- TryCatchStatement(Zone* zone, |
- int index, |
- Block* try_block, |
- Scope* scope, |
- Variable* variable, |
- Block* catch_block, |
- int pos) |
- : TryStatement(zone, index, try_block, pos), |
+ TryCatchStatement(Zone* zone, Block* try_block, Scope* scope, |
+ Variable* variable, Block* catch_block, int pos) |
+ : TryStatement(zone, try_block, pos), |
scope_(scope), |
variable_(variable), |
- catch_block_(catch_block) { |
- } |
+ catch_block_(catch_block) {} |
private: |
Scope* scope_; |
@@ -1212,10 +1202,9 @@ class TryFinallyStatement final : public TryStatement { |
Block* finally_block() const { return finally_block_; } |
protected: |
- TryFinallyStatement( |
- Zone* zone, int index, Block* try_block, Block* finally_block, int pos) |
- : TryStatement(zone, index, try_block, pos), |
- finally_block_(finally_block) { } |
+ TryFinallyStatement(Zone* zone, Block* try_block, Block* finally_block, |
+ int pos) |
+ : TryStatement(zone, try_block, pos), finally_block_(finally_block) {} |
private: |
Block* finally_block_; |
@@ -2405,18 +2394,6 @@ class Yield final : public Expression { |
Expression* expression() const { return expression_; } |
Kind yield_kind() const { return yield_kind_; } |
- // Delegating yield surrounds the "yield" in a "try/catch". This index |
- // locates the catch handler in the handler table, and is equivalent to |
- // TryCatchStatement::index(). |
- int index() const { |
- DCHECK_EQ(kDelegating, yield_kind()); |
- return index_; |
- } |
- void set_index(int index) { |
- DCHECK_EQ(kDelegating, yield_kind()); |
- index_ = index; |
- } |
- |
// Type feedback information. |
bool HasFeedbackSlots() const { return yield_kind() == kDelegating; } |
virtual FeedbackVectorRequirements ComputeFeedbackRequirements( |
@@ -2449,14 +2426,12 @@ class Yield final : public Expression { |
generator_object_(generator_object), |
expression_(expression), |
yield_kind_(yield_kind), |
- index_(-1), |
yield_first_feedback_slot_(FeedbackVectorICSlot::Invalid()) {} |
private: |
Expression* generator_object_; |
Expression* expression_; |
Kind yield_kind_; |
- int index_; |
FeedbackVectorICSlot yield_first_feedback_slot_; |
}; |
@@ -2523,7 +2498,6 @@ class FunctionLiteral final : public Expression { |
int materialized_literal_count() { return materialized_literal_count_; } |
int expected_property_count() { return expected_property_count_; } |
- int handler_count() { return handler_count_; } |
int parameter_count() { return parameter_count_; } |
bool AllowsLazyCompilation(); |
@@ -2618,8 +2592,8 @@ class FunctionLiteral final : public Expression { |
FunctionLiteral(Zone* zone, const AstRawString* name, |
AstValueFactory* ast_value_factory, Scope* scope, |
ZoneList<Statement*>* body, int materialized_literal_count, |
- int expected_property_count, int handler_count, |
- int parameter_count, FunctionType function_type, |
+ int expected_property_count, int parameter_count, |
+ FunctionType function_type, |
ParameterFlag has_duplicate_parameters, |
IsFunctionFlag is_function, |
EagerCompileHint eager_compile_hint, FunctionKind kind, |
@@ -2633,7 +2607,6 @@ class FunctionLiteral final : public Expression { |
dont_optimize_reason_(kNoReason), |
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_ = IsExpression::encode(function_type != DECLARATION) | |
@@ -2660,7 +2633,6 @@ class FunctionLiteral final : public Expression { |
int materialized_literal_count_; |
int expected_property_count_; |
- int handler_count_; |
int parameter_count_; |
int function_token_position_; |
@@ -3360,22 +3332,17 @@ class AstNodeFactory final BASE_EMBEDDED { |
IfStatement(zone_, condition, then_statement, else_statement, pos); |
} |
- TryCatchStatement* NewTryCatchStatement(int index, |
- Block* try_block, |
- Scope* scope, |
+ TryCatchStatement* NewTryCatchStatement(Block* try_block, Scope* scope, |
Variable* variable, |
- Block* catch_block, |
- int pos) { |
- return new (zone_) TryCatchStatement(zone_, index, try_block, scope, |
- variable, catch_block, pos); |
+ Block* catch_block, int pos) { |
+ return new (zone_) |
+ TryCatchStatement(zone_, try_block, scope, variable, catch_block, pos); |
} |
- TryFinallyStatement* NewTryFinallyStatement(int index, |
- Block* try_block, |
- Block* finally_block, |
- int pos) { |
+ TryFinallyStatement* NewTryFinallyStatement(Block* try_block, |
+ Block* finally_block, int pos) { |
return new (zone_) |
- TryFinallyStatement(zone_, index, try_block, finally_block, pos); |
+ TryFinallyStatement(zone_, try_block, finally_block, pos); |
} |
DebuggerStatement* NewDebuggerStatement(int pos) { |
@@ -3577,7 +3544,7 @@ class AstNodeFactory final BASE_EMBEDDED { |
FunctionLiteral* NewFunctionLiteral( |
const AstRawString* name, AstValueFactory* ast_value_factory, |
Scope* scope, ZoneList<Statement*>* body, int materialized_literal_count, |
- int expected_property_count, int handler_count, int parameter_count, |
+ int expected_property_count, int parameter_count, |
FunctionLiteral::ParameterFlag has_duplicate_parameters, |
FunctionLiteral::FunctionType function_type, |
FunctionLiteral::IsFunctionFlag is_function, |
@@ -3585,7 +3552,7 @@ class AstNodeFactory final BASE_EMBEDDED { |
int position) { |
return new (zone_) FunctionLiteral( |
zone_, name, ast_value_factory, scope, body, materialized_literal_count, |
- expected_property_count, handler_count, parameter_count, function_type, |
+ expected_property_count, parameter_count, function_type, |
has_duplicate_parameters, is_function, eager_compile_hint, kind, |
position); |
} |