Index: src/ast/scopes.h |
diff --git a/src/ast/scopes.h b/src/ast/scopes.h |
index d26d63a1341b2e13b268fd8a948d95dbfcdd11b3..b25440b7b0b3318a5d27928d932a30a67f8cafac 100644 |
--- a/src/ast/scopes.h |
+++ b/src/ast/scopes.h |
@@ -235,14 +235,6 @@ |
// declarations, i.e. a var declaration that has been hoisted from a nested |
// scope over a let binding of the same name. |
Declaration* CheckConflictingVarDeclarations(); |
- |
- // Check if the scope has a conflicting lexical declaration that has a name in |
- // the given list. This is used to catch patterns like |
- // `try{}catch(e){let e;}`, |
- // which is an error even though the two 'e's are declared in different |
- // scopes. |
- Declaration* CheckLexDeclarationsConflictingWith( |
- ZoneList<const AstRawString*>* names); |
// --------------------------------------------------------------------------- |
// Scope-specific info. |
@@ -499,12 +491,6 @@ |
// The ModuleDescriptor for this scope; only for module scopes. |
ModuleDescriptor* module() const { return module_descriptor_; } |
- AstRawString* catch_variable_name() const { |
- DCHECK(is_catch_scope()); |
- DCHECK(num_var() == 1); |
- return static_cast<AstRawString*>(variables_.Start()->key); |
- } |
- |
// --------------------------------------------------------------------------- |
// Variable allocation. |
@@ -515,8 +501,8 @@ |
ZoneList<Variable*>* context_locals, |
ZoneList<Variable*>* context_globals); |
- // Current number of var locals. |
- int num_var() const { return num_var_; } |
+ // Current number of var or const locals. |
+ int num_var_or_const() { return num_var_or_const_; } |
// Result of variable allocation. |
int num_stack_slots() const { return num_stack_slots_; } |
@@ -687,7 +673,7 @@ |
bool is_declaration_scope_; |
// Computed as variables are declared. |
- int num_var_; |
+ int num_var_or_const_; |
// Computed via AllocateVariables; function, block and catch scopes only. |
int num_stack_slots_; |