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 7927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7938 // ModuleInfo::module_requests. | 7938 // ModuleInfo::module_requests. |
7939 DECL_ACCESSORS(requested_modules, FixedArray) | 7939 DECL_ACCESSORS(requested_modules, FixedArray) |
7940 | 7940 |
7941 // [[Evaluated]]: Whether this module has been evaluated. Modules | 7941 // [[Evaluated]]: Whether this module has been evaluated. Modules |
7942 // are only evaluated a single time. | 7942 // are only evaluated a single time. |
7943 DECL_BOOLEAN_ACCESSORS(evaluated) | 7943 DECL_BOOLEAN_ACCESSORS(evaluated) |
7944 | 7944 |
7945 // Storage for [[Evaluated]] | 7945 // Storage for [[Evaluated]] |
7946 DECL_INT_ACCESSORS(flags) | 7946 DECL_INT_ACCESSORS(flags) |
7947 | 7947 |
| 7948 // Embedder-specified data |
| 7949 DECL_ACCESSORS(embedder_data, Object) |
| 7950 |
7948 static void CreateExport(Handle<Module> module, Handle<FixedArray> names); | 7951 static void CreateExport(Handle<Module> module, Handle<FixedArray> names); |
7949 static void StoreExport(Handle<Module> module, Handle<String> name, | 7952 static void StoreExport(Handle<Module> module, Handle<String> name, |
7950 Handle<Object> value); | 7953 Handle<Object> value); |
7951 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); | 7954 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); |
7952 | 7955 |
7953 static const int kCodeOffset = HeapObject::kHeaderSize; | 7956 static const int kCodeOffset = HeapObject::kHeaderSize; |
7954 static const int kExportsOffset = kCodeOffset + kPointerSize; | 7957 static const int kExportsOffset = kCodeOffset + kPointerSize; |
7955 static const int kRequestedModulesOffset = kExportsOffset + kPointerSize; | 7958 static const int kRequestedModulesOffset = kExportsOffset + kPointerSize; |
7956 static const int kFlagsOffset = kRequestedModulesOffset + kPointerSize; | 7959 static const int kFlagsOffset = kRequestedModulesOffset + kPointerSize; |
7957 static const int kSize = kFlagsOffset + kPointerSize; | 7960 static const int kEmbedderDataOffset = kFlagsOffset + kPointerSize; |
| 7961 static const int kSize = kEmbedderDataOffset + kPointerSize; |
7958 | 7962 |
7959 private: | 7963 private: |
7960 enum { kEvaluatedBit }; | 7964 enum { kEvaluatedBit }; |
7961 | 7965 |
7962 DISALLOW_IMPLICIT_CONSTRUCTORS(Module); | 7966 DISALLOW_IMPLICIT_CONSTRUCTORS(Module); |
7963 }; | 7967 }; |
7964 | 7968 |
7965 // JSBoundFunction describes a bound function exotic object. | 7969 // JSBoundFunction describes a bound function exotic object. |
7966 class JSBoundFunction : public JSObject { | 7970 class JSBoundFunction : public JSObject { |
7967 public: | 7971 public: |
(...skipping 3430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11398 } | 11402 } |
11399 return value; | 11403 return value; |
11400 } | 11404 } |
11401 }; | 11405 }; |
11402 | 11406 |
11403 | 11407 |
11404 } // NOLINT, false-positive due to second-order macros. | 11408 } // NOLINT, false-positive due to second-order macros. |
11405 } // NOLINT, false-positive due to second-order macros. | 11409 } // NOLINT, false-positive due to second-order macros. |
11406 | 11410 |
11407 #endif // V8_OBJECTS_H_ | 11411 #endif // V8_OBJECTS_H_ |
OLD | NEW |