Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: src/objects.h

Issue 2393303002: [modules] Store Module metadata in per-Context EmbedderData (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/d8.cc ('K') | « src/factory.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7883 matching lines...) Expand 10 before | Expand all | Expand 10 after
7894 // ModuleInfo::module_requests. 7894 // ModuleInfo::module_requests.
7895 DECL_ACCESSORS(requested_modules, FixedArray) 7895 DECL_ACCESSORS(requested_modules, FixedArray)
7896 7896
7897 // [[Evaluated]]: Whether this module has been evaluated. Modules 7897 // [[Evaluated]]: Whether this module has been evaluated. Modules
7898 // are only evaluated a single time. 7898 // are only evaluated a single time.
7899 DECL_BOOLEAN_ACCESSORS(evaluated) 7899 DECL_BOOLEAN_ACCESSORS(evaluated)
7900 7900
7901 // Storage for [[Evaluated]] 7901 // Storage for [[Evaluated]]
7902 DECL_INT_ACCESSORS(flags) 7902 DECL_INT_ACCESSORS(flags)
7903 7903
7904 // Embedder-specified data
7905 DECL_ACCESSORS(embedder_data, Object)
7906
7907 // Get the SharedFunctionInfo associated with the code. 7904 // Get the SharedFunctionInfo associated with the code.
7908 inline SharedFunctionInfo* shared() const; 7905 inline SharedFunctionInfo* shared() const;
7909 7906
7910 // Get the ModuleInfo associated with the code. 7907 // Get the ModuleInfo associated with the code.
7911 inline ModuleInfo* info() const; 7908 inline ModuleInfo* info() const;
7912 7909
7913 // Compute a hash for this object. 7910 // Compute a hash for this object.
7914 inline uint32_t Hash() const; 7911 inline uint32_t Hash() const;
7915 7912
7916 // Implementation of spec operation ModuleDeclarationInstantiation. 7913 // Implementation of spec operation ModuleDeclarationInstantiation.
7917 // Returns false if an exception occurred during instantiation, true 7914 // Returns false if an exception occurred during instantiation, true
7918 // otherwise. 7915 // otherwise.
7919 static MUST_USE_RESULT bool Instantiate(Handle<Module> module, 7916 static MUST_USE_RESULT bool Instantiate(Handle<Module> module,
7920 v8::Local<v8::Context> context, 7917 v8::Local<v8::Context> context,
7921 v8::Module::ResolveCallback callback, 7918 v8::Module::ResolveCallback callback);
7922 v8::Local<v8::Value> callback_data);
7923 7919
7924 // Implementation of spec operation ModuleEvaluation. 7920 // Implementation of spec operation ModuleEvaluation.
7925 static MUST_USE_RESULT MaybeHandle<Object> Evaluate(Handle<Module> module); 7921 static MUST_USE_RESULT MaybeHandle<Object> Evaluate(Handle<Module> module);
7926 7922
7927 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name); 7923 static Handle<Object> LoadExport(Handle<Module> module, Handle<String> name);
7928 static void StoreExport(Handle<Module> module, Handle<String> name, 7924 static void StoreExport(Handle<Module> module, Handle<String> name,
7929 Handle<Object> value); 7925 Handle<Object> value);
7930 7926
7931 static Handle<Object> LoadImport(Handle<Module> module, Handle<String> name, 7927 static Handle<Object> LoadImport(Handle<Module> module, Handle<String> name,
7932 int module_request); 7928 int module_request);
(...skipping 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after
11406 } 11402 }
11407 return value; 11403 return value;
11408 } 11404 }
11409 }; 11405 };
11410 11406
11411 11407
11412 } // NOLINT, false-positive due to second-order macros. 11408 } // NOLINT, false-positive due to second-order macros.
11413 } // NOLINT, false-positive due to second-order macros. 11409 } // NOLINT, false-positive due to second-order macros.
11414 11410
11415 #endif // V8_OBJECTS_H_ 11411 #endif // V8_OBJECTS_H_
OLDNEW
« src/d8.cc ('K') | « src/factory.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698