diff options
Diffstat (limited to 'deps/v8/src/objects/module.h')
-rw-r--r-- | deps/v8/src/objects/module.h | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/deps/v8/src/objects/module.h b/deps/v8/src/objects/module.h index 9cf3bc4d2a..613304ae78 100644 --- a/deps/v8/src/objects/module.h +++ b/deps/v8/src/objects/module.h @@ -90,12 +90,13 @@ class Module : public Struct { // Returns false if an exception occurred during instantiation, true // otherwise. (In the case where the callback throws an exception, that // exception is propagated.) - static MUST_USE_RESULT bool Instantiate(Handle<Module> module, - v8::Local<v8::Context> context, - v8::Module::ResolveCallback callback); + static V8_WARN_UNUSED_RESULT bool Instantiate( + Handle<Module> module, v8::Local<v8::Context> context, + v8::Module::ResolveCallback callback); // Implementation of spec operation ModuleEvaluation. - static MUST_USE_RESULT MaybeHandle<Object> Evaluate(Handle<Module> module); + static V8_WARN_UNUSED_RESULT MaybeHandle<Object> Evaluate( + Handle<Module> module); Cell* GetCell(int cell_index); static Handle<Object> LoadVariable(Handle<Module> module, int cell_index); @@ -152,28 +153,28 @@ class Module : public Struct { // [must_resolve] is false, a null result may or may not indicate an // exception (so check manually!). class ResolveSet; - static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport( + static V8_WARN_UNUSED_RESULT MaybeHandle<Cell> ResolveExport( Handle<Module> module, Handle<String> module_specifier, Handle<String> export_name, MessageLocation loc, bool must_resolve, ResolveSet* resolve_set); - static MUST_USE_RESULT MaybeHandle<Cell> ResolveImport( + static V8_WARN_UNUSED_RESULT MaybeHandle<Cell> ResolveImport( Handle<Module> module, Handle<String> name, int module_request, MessageLocation loc, bool must_resolve, ResolveSet* resolve_set); - static MUST_USE_RESULT MaybeHandle<Cell> ResolveExportUsingStarExports( + static V8_WARN_UNUSED_RESULT MaybeHandle<Cell> ResolveExportUsingStarExports( Handle<Module> module, Handle<String> module_specifier, Handle<String> export_name, MessageLocation loc, bool must_resolve, ResolveSet* resolve_set); - static MUST_USE_RESULT bool PrepareInstantiate( + static V8_WARN_UNUSED_RESULT bool PrepareInstantiate( Handle<Module> module, v8::Local<v8::Context> context, v8::Module::ResolveCallback callback); - static MUST_USE_RESULT bool FinishInstantiate( + static V8_WARN_UNUSED_RESULT bool FinishInstantiate( Handle<Module> module, ZoneForwardList<Handle<Module>>* stack, unsigned* dfs_index, Zone* zone); static void RunInitializationCode(Handle<Module> module); - static MUST_USE_RESULT MaybeHandle<Object> Evaluate( + static V8_WARN_UNUSED_RESULT MaybeHandle<Object> Evaluate( Handle<Module> module, ZoneForwardList<Handle<Module>>* stack, unsigned* dfs_index); @@ -213,7 +214,13 @@ class JSModuleNamespace : public JSObject { // Retrieve the value exported by [module] under the given [name]. If there is // no such export, return Just(undefined). If the export is uninitialized, // schedule an exception and return Nothing. - MUST_USE_RESULT MaybeHandle<Object> GetExport(Handle<String> name); + V8_WARN_UNUSED_RESULT MaybeHandle<Object> GetExport(Handle<String> name); + + // Return the (constant) property attributes for the referenced property, + // which is assumed to correspond to an export. If the export is + // uninitialized, schedule an exception and return Nothing. + static V8_WARN_UNUSED_RESULT Maybe<PropertyAttributes> GetPropertyAttributes( + LookupIterator* it); // In-object fields. enum { |