OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 7896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7907 DECL_INT_ACCESSORS(hash) | 7907 DECL_INT_ACCESSORS(hash) |
7908 | 7908 |
7909 // The namespace object (or undefined). | 7909 // The namespace object (or undefined). |
7910 DECL_ACCESSORS(module_namespace, HeapObject) | 7910 DECL_ACCESSORS(module_namespace, HeapObject) |
7911 | 7911 |
7912 // Modules imported or re-exported by this module. | 7912 // Modules imported or re-exported by this module. |
7913 // Corresponds 1-to-1 to the module specifier strings in | 7913 // Corresponds 1-to-1 to the module specifier strings in |
7914 // ModuleInfo::module_requests. | 7914 // ModuleInfo::module_requests. |
7915 DECL_ACCESSORS(requested_modules, FixedArray) | 7915 DECL_ACCESSORS(requested_modules, FixedArray) |
7916 | 7916 |
| 7917 // [script]: Script from which the module originates. |
| 7918 DECL_ACCESSORS(script, Script) |
| 7919 |
7917 // Get the ModuleInfo associated with the code. | 7920 // Get the ModuleInfo associated with the code. |
7918 inline ModuleInfo* info() const; | 7921 inline ModuleInfo* info() const; |
7919 | 7922 |
7920 inline bool instantiated() const; | 7923 inline bool instantiated() const; |
7921 inline bool evaluated() const; | 7924 inline bool evaluated() const; |
7922 inline void set_evaluated(); | 7925 inline void set_evaluated(); |
7923 | 7926 |
7924 // Implementation of spec operation ModuleDeclarationInstantiation. | 7927 // Implementation of spec operation ModuleDeclarationInstantiation. |
7925 // Returns false if an exception occurred during instantiation, true | 7928 // Returns false if an exception occurred during instantiation, true |
7926 // otherwise. | 7929 // otherwise. |
(...skipping 14 matching lines...) Expand all Loading... |
7941 int module_request); | 7944 int module_request); |
7942 | 7945 |
7943 static const int kCodeOffset = HeapObject::kHeaderSize; | 7946 static const int kCodeOffset = HeapObject::kHeaderSize; |
7944 static const int kExportsOffset = kCodeOffset + kPointerSize; | 7947 static const int kExportsOffset = kCodeOffset + kPointerSize; |
7945 static const int kRegularExportsOffset = kExportsOffset + kPointerSize; | 7948 static const int kRegularExportsOffset = kExportsOffset + kPointerSize; |
7946 static const int kRegularImportsOffset = kRegularExportsOffset + kPointerSize; | 7949 static const int kRegularImportsOffset = kRegularExportsOffset + kPointerSize; |
7947 static const int kHashOffset = kRegularImportsOffset + kPointerSize; | 7950 static const int kHashOffset = kRegularImportsOffset + kPointerSize; |
7948 static const int kModuleNamespaceOffset = kHashOffset + kPointerSize; | 7951 static const int kModuleNamespaceOffset = kHashOffset + kPointerSize; |
7949 static const int kRequestedModulesOffset = | 7952 static const int kRequestedModulesOffset = |
7950 kModuleNamespaceOffset + kPointerSize; | 7953 kModuleNamespaceOffset + kPointerSize; |
7951 static const int kSize = kRequestedModulesOffset + kPointerSize; | 7954 static const int kScriptOffset = kRequestedModulesOffset + kPointerSize; |
| 7955 static const int kSize = kScriptOffset + kPointerSize; |
7952 | 7956 |
7953 private: | 7957 private: |
7954 static void CreateExport(Handle<Module> module, int cell_index, | 7958 static void CreateExport(Handle<Module> module, int cell_index, |
7955 Handle<FixedArray> names); | 7959 Handle<FixedArray> names); |
7956 static void CreateIndirectExport(Handle<Module> module, Handle<String> name, | 7960 static void CreateIndirectExport(Handle<Module> module, Handle<String> name, |
7957 Handle<ModuleInfoEntry> entry); | 7961 Handle<ModuleInfoEntry> entry); |
7958 | 7962 |
7959 // Get the namespace object for [module]. If it doesn't exist yet, it is | 7963 // Get the namespace object for [module]. If it doesn't exist yet, it is |
7960 // created. | 7964 // created. |
7961 static Handle<JSModuleNamespace> GetModuleNamespace(Handle<Module> module); | 7965 static Handle<JSModuleNamespace> GetModuleNamespace(Handle<Module> module); |
(...skipping 3660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11622 } | 11626 } |
11623 }; | 11627 }; |
11624 | 11628 |
11625 | 11629 |
11626 } // NOLINT, false-positive due to second-order macros. | 11630 } // NOLINT, false-positive due to second-order macros. |
11627 } // NOLINT, false-positive due to second-order macros. | 11631 } // NOLINT, false-positive due to second-order macros. |
11628 | 11632 |
11629 #include "src/objects/object-macros-undef.h" | 11633 #include "src/objects/object-macros-undef.h" |
11630 | 11634 |
11631 #endif // V8_OBJECTS_H_ | 11635 #endif // V8_OBJECTS_H_ |
OLD | NEW |