Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 2548c4dc3432fef32a6c31e2a5c058812a072f98..3c4a3774cb630c8af434ab9f0f49bc2d26adab3e 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -789,19 +789,15 @@ |
return context_table; |
} |
-Handle<Context> Factory::NewModuleContext(Handle<JSModule> module, |
- Handle<JSFunction> function, |
- Handle<ScopeInfo> scope_info) { |
+ |
+Handle<Context> Factory::NewModuleContext(Handle<ScopeInfo> scope_info) { |
DCHECK_EQ(scope_info->scope_type(), MODULE_SCOPE); |
Handle<FixedArray> array = |
NewFixedArray(scope_info->ContextLength(), TENURED); |
array->set_map_no_write_barrier(*module_context_map()); |
+ // Instance link will be set later. |
Handle<Context> context = Handle<Context>::cast(array); |
- context->set_closure(*function); |
- context->set_previous(function->context()); |
- context->set_extension(*module); |
- context->set_native_context(function->native_context()); |
- DCHECK(context->IsModuleContext()); |
+ context->set_extension(*the_hole_value()); |
return context; |
} |
@@ -1402,16 +1398,11 @@ |
return scope_info; |
} |
-Handle<ModuleInfoEntry> Factory::NewModuleInfoEntry() { |
- Handle<FixedArray> array = NewFixedArray(ModuleInfoEntry::kLength, TENURED); |
- array->set_map_no_write_barrier(*module_info_entry_map()); |
- return Handle<ModuleInfoEntry>::cast(array); |
-} |
- |
Handle<ModuleInfo> Factory::NewModuleInfo() { |
Handle<FixedArray> array = NewFixedArray(ModuleInfo::kLength, TENURED); |
array->set_map_no_write_barrier(*module_info_map()); |
- return Handle<ModuleInfo>::cast(array); |
+ Handle<ModuleInfo> module_info = Handle<ModuleInfo>::cast(array); |
+ return module_info; |
} |
Handle<JSObject> Factory::NewExternal(void* value) { |
@@ -1704,11 +1695,6 @@ |
JSGeneratorObject); |
} |
-Handle<JSModule> Factory::NewJSModule() { |
- Handle<JSModule> module = |
- Handle<JSModule>::cast(NewJSObjectFromMap(js_module_map(), TENURED)); |
- return module; |
-} |
Handle<JSArrayBuffer> Factory::NewJSArrayBuffer(SharedFlag shared, |
PretenureFlag pretenure) { |