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