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 7909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7920 // ModuleInfo::module_requests. | 7920 // ModuleInfo::module_requests. |
7921 DECL_ACCESSORS(requested_modules, FixedArray) | 7921 DECL_ACCESSORS(requested_modules, FixedArray) |
7922 | 7922 |
7923 // [[Evaluated]]: Whether this module has been evaluated. Modules | 7923 // [[Evaluated]]: Whether this module has been evaluated. Modules |
7924 // are only evaluated a single time. | 7924 // are only evaluated a single time. |
7925 DECL_BOOLEAN_ACCESSORS(evaluated) | 7925 DECL_BOOLEAN_ACCESSORS(evaluated) |
7926 | 7926 |
7927 // Storage for [[Evaluated]]. | 7927 // Storage for [[Evaluated]]. |
7928 DECL_INT_ACCESSORS(flags) | 7928 DECL_INT_ACCESSORS(flags) |
7929 | 7929 |
| 7930 // Embedder-specified data |
| 7931 DECL_ACCESSORS(embedder_data, Object) |
| 7932 |
7930 // Hash for this object (a random non-zero Smi). | 7933 // Hash for this object (a random non-zero Smi). |
7931 DECL_INT_ACCESSORS(hash) | 7934 DECL_INT_ACCESSORS(hash) |
7932 | 7935 |
7933 // Get the SharedFunctionInfo associated with the code. | 7936 // Get the SharedFunctionInfo associated with the code. |
7934 inline SharedFunctionInfo* shared() const; | 7937 inline SharedFunctionInfo* shared() const; |
7935 | 7938 |
7936 // Get the ModuleInfo associated with the code. | 7939 // Get the ModuleInfo associated with the code. |
7937 inline ModuleInfo* info() const; | 7940 inline ModuleInfo* info() const; |
7938 | 7941 |
7939 // Implementation of spec operation ModuleDeclarationInstantiation. | 7942 // Implementation of spec operation ModuleDeclarationInstantiation. |
7940 // Returns false if an exception occurred during instantiation, true | 7943 // Returns false if an exception occurred during instantiation, true |
7941 // otherwise. | 7944 // otherwise. |
7942 static MUST_USE_RESULT bool Instantiate(Handle<Module> module, | 7945 static MUST_USE_RESULT bool Instantiate(Handle<Module> module, |
7943 v8::Local<v8::Context> context, | 7946 v8::Local<v8::Context> context, |
7944 v8::Module::ResolveCallback callback); | 7947 v8::Module::ResolveCallback callback, |
| 7948 v8::Local<v8::Value> callback_data); |
7945 | 7949 |
7946 // Implementation of spec operation ModuleEvaluation. | 7950 // Implementation of spec operation ModuleEvaluation. |
7947 static MUST_USE_RESULT MaybeHandle<Object> Evaluate(Handle<Module> module); | 7951 static MUST_USE_RESULT MaybeHandle<Object> Evaluate(Handle<Module> module); |
7948 | 7952 |
7949 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); | 7953 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); |
7950 static void StoreExport(Handle<Module> module, Handle<String> name, | 7954 static void StoreExport(Handle<Module> module, Handle<String> name, |
7951 Handle<Object> value); | 7955 Handle<Object> value); |
7952 | 7956 |
7953 static Handle<Object> LoadImport(Handle<Module> module, Handle<String> name, | 7957 static Handle<Object> LoadImport(Handle<Module> module, Handle<String> name, |
7954 int module_request); | 7958 int module_request); |
(...skipping 3491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11446 } | 11450 } |
11447 return value; | 11451 return value; |
11448 } | 11452 } |
11449 }; | 11453 }; |
11450 | 11454 |
11451 | 11455 |
11452 } // NOLINT, false-positive due to second-order macros. | 11456 } // NOLINT, false-positive due to second-order macros. |
11453 } // NOLINT, false-positive due to second-order macros. | 11457 } // NOLINT, false-positive due to second-order macros. |
11454 | 11458 |
11455 #endif // V8_OBJECTS_H_ | 11459 #endif // V8_OBJECTS_H_ |
OLD | NEW |