| OLD | NEW |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_OBJECTS_MODULE_INFO_H_ | 5 #ifndef V8_OBJECTS_MODULE_INFO_H_ |
| 6 #define V8_OBJECTS_MODULE_INFO_H_ | 6 #define V8_OBJECTS_MODULE_INFO_H_ |
| 7 | 7 |
| 8 #include "src/objects.h" | 8 #include "src/objects.h" |
| 9 | 9 |
| 10 // Has to be the last include (doesn't have include guards): | 10 // Has to be the last include (doesn't have include guards): |
| 11 #include "src/objects/object-macros.h" | 11 #include "src/objects/object-macros.h" |
| 12 | 12 |
| 13 namespace v8 { | 13 namespace v8 { |
| 14 namespace internal { | 14 namespace internal { |
| 15 | 15 |
| 16 template <typename T> | 16 template <typename T> |
| 17 class Handle; | 17 class Handle; |
| 18 class Isolate; | 18 class Isolate; |
| 19 class ModuleDescriptor; | 19 class ModuleDescriptor; |
| 20 class ModuleInfoEntry; | 20 class ModuleInfoEntry; |
| 21 class String; | 21 class String; |
| 22 class Zone; | 22 class Zone; |
| 23 | 23 |
| 24 // ModuleInfo is to ModuleDescriptor what ScopeInfo is to Scope. | 24 // ModuleInfo is to ModuleDescriptor what ScopeInfo is to Scope. |
| 25 class ModuleInfo : public FixedArray { | 25 class ModuleInfo : public FixedArray { |
| 26 public: | 26 public: |
| 27 DECLARE_CAST(ModuleInfo) | 27 DECL_CAST(ModuleInfo) |
| 28 | 28 |
| 29 static Handle<ModuleInfo> New(Isolate* isolate, Zone* zone, | 29 static Handle<ModuleInfo> New(Isolate* isolate, Zone* zone, |
| 30 ModuleDescriptor* descr); | 30 ModuleDescriptor* descr); |
| 31 | 31 |
| 32 inline FixedArray* module_requests() const { | 32 inline FixedArray* module_requests() const { |
| 33 return FixedArray::cast(get(kModuleRequestsIndex)); | 33 return FixedArray::cast(get(kModuleRequestsIndex)); |
| 34 } | 34 } |
| 35 | 35 |
| 36 inline FixedArray* special_exports() const { | 36 inline FixedArray* special_exports() const { |
| 37 return FixedArray::cast(get(kSpecialExportsIndex)); | 37 return FixedArray::cast(get(kSpecialExportsIndex)); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 kRegularExportLocalNameOffset, | 86 kRegularExportLocalNameOffset, |
| 87 kRegularExportCellIndexOffset, | 87 kRegularExportCellIndexOffset, |
| 88 kRegularExportExportNamesOffset, | 88 kRegularExportExportNamesOffset, |
| 89 kRegularExportLength | 89 kRegularExportLength |
| 90 }; | 90 }; |
| 91 DISALLOW_IMPLICIT_CONSTRUCTORS(ModuleInfo); | 91 DISALLOW_IMPLICIT_CONSTRUCTORS(ModuleInfo); |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 class ModuleInfoEntry : public Struct { | 94 class ModuleInfoEntry : public Struct { |
| 95 public: | 95 public: |
| 96 DECLARE_CAST(ModuleInfoEntry) | 96 DECL_CAST(ModuleInfoEntry) |
| 97 DECLARE_PRINTER(ModuleInfoEntry) | 97 DECL_PRINTER(ModuleInfoEntry) |
| 98 DECLARE_VERIFIER(ModuleInfoEntry) | 98 DECL_VERIFIER(ModuleInfoEntry) |
| 99 | 99 |
| 100 DECL_ACCESSORS(export_name, Object) | 100 DECL_ACCESSORS(export_name, Object) |
| 101 DECL_ACCESSORS(local_name, Object) | 101 DECL_ACCESSORS(local_name, Object) |
| 102 DECL_ACCESSORS(import_name, Object) | 102 DECL_ACCESSORS(import_name, Object) |
| 103 DECL_INT_ACCESSORS(module_request) | 103 DECL_INT_ACCESSORS(module_request) |
| 104 DECL_INT_ACCESSORS(cell_index) | 104 DECL_INT_ACCESSORS(cell_index) |
| 105 DECL_INT_ACCESSORS(beg_pos) | 105 DECL_INT_ACCESSORS(beg_pos) |
| 106 DECL_INT_ACCESSORS(end_pos) | 106 DECL_INT_ACCESSORS(end_pos) |
| 107 | 107 |
| 108 static Handle<ModuleInfoEntry> New(Isolate* isolate, | 108 static Handle<ModuleInfoEntry> New(Isolate* isolate, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 124 private: | 124 private: |
| 125 DISALLOW_IMPLICIT_CONSTRUCTORS(ModuleInfoEntry); | 125 DISALLOW_IMPLICIT_CONSTRUCTORS(ModuleInfoEntry); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 } // namespace internal | 128 } // namespace internal |
| 129 } // namespace v8 | 129 } // namespace v8 |
| 130 | 130 |
| 131 #include "src/objects/object-macros-undef.h" | 131 #include "src/objects/object-macros-undef.h" |
| 132 | 132 |
| 133 #endif // V8_OBJECTS_MODULE_INFO_H_ | 133 #endif // V8_OBJECTS_MODULE_INFO_H_ |
| OLD | NEW |