1 /* -*- Mode: javascript; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 #include "NamespaceImports.h"
12 #include "builtin/ModuleObject.h"
13 #include "js/AllocPolicy.h"
14 #include "js/GCVector.h"
15 #include "js/RootingAPI.h"
21 using ModuleVector
= GCVector
<ModuleObject
*, 0, SystemAllocPolicy
>;
23 bool ModuleResolveExport(JSContext
* cx
, Handle
<ModuleObject
*> module
,
24 Handle
<JSAtom
*> exportName
,
25 MutableHandle
<Value
> result
);
27 ModuleNamespaceObject
* GetOrCreateModuleNamespace(JSContext
* cx
,
28 Handle
<ModuleObject
*> module
);
30 bool ModuleInitializeEnvironment(JSContext
* cx
, Handle
<ModuleObject
*> module
);
32 bool ModuleLink(JSContext
* cx
, Handle
<ModuleObject
*> module
);
34 // Start evaluating the module. If TLA is enabled, result will be a promise.
35 bool ModuleEvaluate(JSContext
* cx
, Handle
<ModuleObject
*> module
,
36 MutableHandle
<Value
> result
);
38 void AsyncModuleExecutionFulfilled(JSContext
* cx
, Handle
<ModuleObject
*> module
);
40 void AsyncModuleExecutionRejected(JSContext
* cx
, Handle
<ModuleObject
*> module
,
45 #endif // vm_Modules_h