summaryrefslogtreecommitdiff
path: root/deps/v8/src/ast/scopes.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/ast/scopes.h')
-rw-r--r--deps/v8/src/ast/scopes.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/deps/v8/src/ast/scopes.h b/deps/v8/src/ast/scopes.h
index bcfd2187df..d2e8886319 100644
--- a/deps/v8/src/ast/scopes.h
+++ b/deps/v8/src/ast/scopes.h
@@ -334,14 +334,6 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) {
bool is_hidden() const { return is_hidden_; }
void set_is_hidden() { is_hidden_ = true; }
- // In some cases we want to force context allocation for a whole scope.
- void ForceContextAllocation() {
- DCHECK(!already_resolved_);
- force_context_allocation_ = true;
- }
- bool has_forced_context_allocation() const {
- return force_context_allocation_;
- }
void ForceContextAllocationForParameters() {
DCHECK(!already_resolved_);
force_context_allocation_for_parameters_ = true;
@@ -404,6 +396,8 @@ class V8_EXPORT_PRIVATE Scope : public NON_EXPORTED_BASE(ZoneObject) {
return static_cast<Variable*>(variables_.Start()->value);
}
+ bool ShouldBanArguments();
+
// ---------------------------------------------------------------------------
// Variable allocation.
@@ -704,6 +698,10 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope {
bool asm_module() const { return asm_module_; }
void set_asm_module();
+ bool should_ban_arguments() const {
+ return IsClassFieldsInitializerFunction(function_kind());
+ }
+
void DeclareThis(AstValueFactory* ast_value_factory);
void DeclareArguments(AstValueFactory* ast_value_factory);
void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory);