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

Unified Diff: src/objects.h

Issue 2362153003: [modules] Support star exports. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/messages.h ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index ca3c8f89b7c5bbac73d62cd5e3c597b1f41c258b..8df564eddd5008c752a37159152a9ca10cae41f2 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -7962,11 +7962,17 @@ class Module : public Struct {
static Handle<Object> LoadImport(Handle<Module> module, Handle<String> name,
int module_request);
+ // The [must_resolve] argument indicates whether or not an exception should be
+ // thrown if the module does not provide an export named [name].
+ // Currently, an exception is always thrown in the case of a cycle and in the
+ // case of conflicting star exports. TODO(neis): Make that spec-compliant.
+ static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport(Handle<Module> module,
+ Handle<String> name,
+ bool must_resolve);
static MUST_USE_RESULT MaybeHandle<Cell> ResolveImport(Handle<Module> module,
Handle<String> name,
- int module_request);
- static MUST_USE_RESULT MaybeHandle<Cell> ResolveExport(Handle<Module> module,
- Handle<String> name);
+ int module_request,
+ bool must_resolve);
static const int kCodeOffset = HeapObject::kHeaderSize;
static const int kExportsOffset = kCodeOffset + kPointerSize;
@@ -7978,6 +7984,10 @@ class Module : public Struct {
private:
enum { kEvaluatedBit };
+ // Helper for ResolveExport.
adamk 2016/09/24 01:01:00 Please document the fact that you have to check th
+ static MUST_USE_RESULT MaybeHandle<Cell> ResolveExportUsingStarExports(
+ Handle<Module> module, Handle<String> name, bool must_resolve);
+
DISALLOW_IMPLICIT_CONSTRUCTORS(Module);
};
« no previous file with comments | « src/messages.h ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698