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

Unified Diff: src/factory.cc

Issue 2345823002: [modules] Turn JSModule into Module. (Closed)
Patch Set: Address comments. 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 f7e1c746dd49f79fe31d6ffbb11aab5f24785557..2522803786e917e9a8cb3f1b066cd5509869d756 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -789,7 +789,7 @@ Handle<ScriptContextTable> Factory::NewScriptContextTable() {
return context_table;
}
-Handle<Context> Factory::NewModuleContext(Handle<JSModule> module,
+Handle<Context> Factory::NewModuleContext(Handle<Module> module,
Handle<JSFunction> function,
Handle<ScopeInfo> scope_info) {
DCHECK_EQ(scope_info->scope_type(), MODULE_SCOPE);
@@ -1705,9 +1705,10 @@ Handle<JSGeneratorObject> Factory::NewJSGeneratorObject(
JSGeneratorObject);
}
-Handle<JSModule> Factory::NewJSModule() {
- Handle<JSModule> module =
- Handle<JSModule>::cast(NewJSObjectFromMap(js_module_map(), TENURED));
+Handle<Module> Factory::NewModule(int min_size) {
+ Handle<Module> module = Handle<Module>::cast(NewStruct(MODULE_TYPE));
+ Handle<ObjectHashTable> exports = ObjectHashTable::New(isolate(), min_size);
+ module->set_exports(*exports);
return module;
}
« 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