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

Unified Diff: src/ast/scopeinfo.cc

Issue 2460353002: [modules] Make ModuleInfoEntry a Struct rather than FixedArray. (Closed)
Patch Set: Remove extra semicolons after macro use. Created 4 years, 1 month 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/ast/ast-types.cc ('k') | src/compiler/types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopeinfo.cc
diff --git a/src/ast/scopeinfo.cc b/src/ast/scopeinfo.cc
index 17a4b50366895fb46fd5d768b1c18199ad70d9af..41895790450ca86d52109512e75322bd5252d231 100644
--- a/src/ast/scopeinfo.cc
+++ b/src/ast/scopeinfo.cc
@@ -867,14 +867,15 @@ 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 = isolate->factory()->NewModuleInfoEntry();
- result->set(kExportNameIndex, *export_name);
- result->set(kLocalNameIndex, *local_name);
- result->set(kImportNameIndex, *import_name);
- result->set(kModuleRequestIndex, Smi::FromInt(module_request));
- result->set(kCellIndexIndex, Smi::FromInt(cell_index));
- result->set(kBegPosIndex, Smi::FromInt(beg_pos));
- result->set(kEndPosIndex, Smi::FromInt(end_pos));
+ Handle<ModuleInfoEntry> result = Handle<ModuleInfoEntry>::cast(
+ isolate->factory()->NewStruct(MODULE_INFO_ENTRY_TYPE));
+ result->set_export_name(*export_name);
+ result->set_local_name(*local_name);
+ result->set_import_name(*import_name);
+ result->set_module_request(module_request);
+ result->set_cell_index(cell_index);
+ result->set_beg_pos(beg_pos);
+ result->set_end_pos(end_pos);
return result;
}
« no previous file with comments | « src/ast/ast-types.cc ('k') | src/compiler/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698