summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/scope-info.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/scope-info.cc')
-rw-r--r--deps/v8/src/objects/scope-info.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/deps/v8/src/objects/scope-info.cc b/deps/v8/src/objects/scope-info.cc
index b9084137a4..f3b3a15ab7 100644
--- a/deps/v8/src/objects/scope-info.cc
+++ b/deps/v8/src/objects/scope-info.cc
@@ -508,14 +508,14 @@ int ScopeInfo::ContextLength() const {
bool function_name_context_slot =
FunctionVariableField::decode(Flags()) == CONTEXT;
bool force_context = ForceContextAllocationField::decode(Flags());
- bool has_context = context_locals > 0 || force_context ||
- function_name_context_slot ||
- scope_type() == WITH_SCOPE ||
- (scope_type() == BLOCK_SCOPE && CallsSloppyEval() &&
- is_declaration_scope()) ||
- (scope_type() == FUNCTION_SCOPE && CallsSloppyEval()) ||
- (scope_type() == FUNCTION_SCOPE && IsAsmModule()) ||
- scope_type() == MODULE_SCOPE;
+ bool has_context =
+ context_locals > 0 || force_context || function_name_context_slot ||
+ scope_type() == WITH_SCOPE || scope_type() == CLASS_SCOPE ||
+ (scope_type() == BLOCK_SCOPE && CallsSloppyEval() &&
+ is_declaration_scope()) ||
+ (scope_type() == FUNCTION_SCOPE && CallsSloppyEval()) ||
+ (scope_type() == FUNCTION_SCOPE && IsAsmModule()) ||
+ scope_type() == MODULE_SCOPE;
if (has_context) {
return Context::MIN_CONTEXT_SLOTS + context_locals +
@@ -871,8 +871,9 @@ Handle<ModuleInfoEntry> ModuleInfoEntry::New(Isolate* isolate,
Handle<Object> import_name,
int module_request, int cell_index,
int beg_pos, int end_pos) {
- Handle<ModuleInfoEntry> result = Handle<ModuleInfoEntry>::cast(
- isolate->factory()->NewStruct(MODULE_INFO_ENTRY_TYPE, TENURED));
+ Handle<ModuleInfoEntry> result =
+ Handle<ModuleInfoEntry>::cast(isolate->factory()->NewStruct(
+ MODULE_INFO_ENTRY_TYPE, AllocationType::kOld));
result->set_export_name(*export_name);
result->set_local_name(*local_name);
result->set_import_name(*import_name);