| 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 4556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4567 kImportNameIndex, | 4567 kImportNameIndex, |
| 4568 kModuleRequestIndex, | 4568 kModuleRequestIndex, |
| 4569 kLength | 4569 kLength |
| 4570 }; | 4570 }; |
| 4571 }; | 4571 }; |
| 4572 | 4572 |
| 4573 // ModuleInfo is to ModuleDescriptor what ScopeInfo is to Scope. | 4573 // ModuleInfo is to ModuleDescriptor what ScopeInfo is to Scope. |
| 4574 class ModuleInfo : public FixedArray { | 4574 class ModuleInfo : public FixedArray { |
| 4575 public: | 4575 public: |
| 4576 DECLARE_CAST(ModuleInfo) | 4576 DECLARE_CAST(ModuleInfo) |
| 4577 static Handle<ModuleInfo> New(Isolate* isolate, ModuleDescriptor* descr); | 4577 static Handle<ModuleInfo> New(Isolate* isolate, Zone* zone, |
| 4578 ModuleDescriptor* descr); |
| 4578 inline FixedArray* module_requests() const; | 4579 inline FixedArray* module_requests() const; |
| 4579 inline FixedArray* special_exports() const; | 4580 inline FixedArray* special_exports() const; |
| 4580 inline FixedArray* regular_exports() const; | 4581 inline FixedArray* regular_exports() const; |
| 4581 inline FixedArray* special_imports() const; | 4582 inline FixedArray* special_imports() const; |
| 4582 inline FixedArray* regular_imports() const; | 4583 inline FixedArray* regular_imports() const; |
| 4583 | 4584 |
| 4584 #ifdef DEBUG | 4585 #ifdef DEBUG |
| 4585 inline bool Equals(ModuleInfo* other) const; | 4586 inline bool Equals(ModuleInfo* other) const; |
| 4586 #endif | 4587 #endif |
| 4587 | 4588 |
| (...skipping 3341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7929 // ModuleInfo::module_requests. | 7930 // ModuleInfo::module_requests. |
| 7930 DECL_ACCESSORS(requested_modules, FixedArray) | 7931 DECL_ACCESSORS(requested_modules, FixedArray) |
| 7931 | 7932 |
| 7932 // [[Evaluated]]: Whether this module has been evaluated. Modules | 7933 // [[Evaluated]]: Whether this module has been evaluated. Modules |
| 7933 // are only evaluated a single time. | 7934 // are only evaluated a single time. |
| 7934 DECL_BOOLEAN_ACCESSORS(evaluated) | 7935 DECL_BOOLEAN_ACCESSORS(evaluated) |
| 7935 | 7936 |
| 7936 // Storage for [[Evaluated]] | 7937 // Storage for [[Evaluated]] |
| 7937 DECL_INT_ACCESSORS(flags) | 7938 DECL_INT_ACCESSORS(flags) |
| 7938 | 7939 |
| 7939 static void CreateExport(Handle<Module> module, Handle<String> name); | 7940 static void CreateExport(Handle<Module> module, Handle<FixedArray> names); |
| 7940 static void StoreExport(Handle<Module> module, Handle<String> name, | 7941 static void StoreExport(Handle<Module> module, Handle<String> name, |
| 7941 Handle<Object> value); | 7942 Handle<Object> value); |
| 7942 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); | 7943 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); |
| 7943 | 7944 |
| 7944 static const int kCodeOffset = HeapObject::kHeaderSize; | 7945 static const int kCodeOffset = HeapObject::kHeaderSize; |
| 7945 static const int kExportsOffset = kCodeOffset + kPointerSize; | 7946 static const int kExportsOffset = kCodeOffset + kPointerSize; |
| 7946 static const int kRequestedModulesOffset = kExportsOffset + kPointerSize; | 7947 static const int kRequestedModulesOffset = kExportsOffset + kPointerSize; |
| 7947 static const int kFlagsOffset = kRequestedModulesOffset + kPointerSize; | 7948 static const int kFlagsOffset = kRequestedModulesOffset + kPointerSize; |
| 7948 static const int kSize = kFlagsOffset + kPointerSize; | 7949 static const int kSize = kFlagsOffset + kPointerSize; |
| 7949 | 7950 |
| (...skipping 3417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11367 } | 11368 } |
| 11368 return value; | 11369 return value; |
| 11369 } | 11370 } |
| 11370 }; | 11371 }; |
| 11371 | 11372 |
| 11372 | 11373 |
| 11373 } // NOLINT, false-positive due to second-order macros. | 11374 } // NOLINT, false-positive due to second-order macros. |
| 11374 } // NOLINT, false-positive due to second-order macros. | 11375 } // NOLINT, false-positive due to second-order macros. |
| 11375 | 11376 |
| 11376 #endif // V8_OBJECTS_H_ | 11377 #endif // V8_OBJECTS_H_ |
| OLD | NEW |