Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: src/factory.cc

Issue 2328283002: Revert of [modules] Basic support of exports (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/factory.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698