Class WebAssemblyModuleRecord
java.lang.Object
com.oracle.truffle.js.runtime.objects.ScriptOrModule
com.oracle.truffle.js.runtime.objects.AbstractModuleRecord
com.oracle.truffle.js.runtime.objects.CyclicModuleRecord
com.oracle.truffle.js.runtime.objects.WebAssemblyModuleRecord
WebAssembly Module Record.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.js.runtime.objects.CyclicModuleRecord
CyclicModuleRecord.Status -
Field Summary
Fields inherited from class com.oracle.truffle.js.runtime.objects.ScriptOrModule
context, source -
Constructor Summary
ConstructorsConstructorDescriptionWebAssemblyModuleRecord(JSContext context, com.oracle.truffle.api.source.Source source, JSWebAssemblyModuleObject webAssemblyModule) -
Method Summary
Modifier and TypeMethodDescriptionexecuteModule(JSRealm realm, PromiseCapabilityRecord promiseCapability) Evaluate the module's code within its execution context.Collection<com.oracle.truffle.api.strings.TruffleString> getExportedNames(Set<JSModuleRecord> exportStarSet) A list of all the ModuleSpecifier strings and import attributes used by the module represented by this record to request the importation of a module, in occurrence order.voidinitializeEnvironment(JSRealm realm) Initialize the Environment Record of the module, including resolving all imported bindings, and create the module's execution context.loadRequestedModules(JSRealm realm, Object hostDefined) Prepares the module for linking by recursively loading all its dependencies.resolveExport(com.oracle.truffle.api.strings.TruffleString exportName, Set<Pair<? extends AbstractModuleRecord, com.oracle.truffle.api.strings.TruffleString>> resolveSet) toString()Methods inherited from class com.oracle.truffle.js.runtime.objects.CyclicModuleRecord
addLoadedModule, appendAsyncParentModules, decPendingAsyncDependencies, evaluate, getAsyncEvaluatingOrder, getAsyncParentModules, getCycleRoot, getDFSAncestorIndex, getDFSIndex, getEvaluationError, getExecutionResult, getExecutionResultOrThrow, getImportedModule, getLoadedModule, getPendingAsyncDependencies, getStatus, getTopLevelCapability, hasBeenEvaluated, hasTLA, incPendingAsyncDependencies, initAsyncParentModules, isAsyncEvaluation, isLinked, isReadyForSyncExecution, link, setAsyncEvaluatingOrder, setAsyncEvaluation, setCycleRoot, setDFSAncestorIndex, setDFSIndex, setEvaluationError, setExecutionResult, setPendingAsyncDependencies, setStatus, setTopLevelCapability, setUnlinkedMethods inherited from class com.oracle.truffle.js.runtime.objects.AbstractModuleRecord
clearEnvironment, getEnvironment, getExportedNames, getFrameDescriptor, getHostDefined, getModuleNamespace, getModuleNamespaceOrNull, loadRequestedModulesSync, resolveExport, setEnvironmentMethods inherited from class com.oracle.truffle.js.runtime.objects.ScriptOrModule
getContext, getSource, rememberImportedModuleSource
-
Constructor Details
-
WebAssemblyModuleRecord
public WebAssemblyModuleRecord(JSContext context, com.oracle.truffle.api.source.Source source, JSWebAssemblyModuleObject webAssemblyModule)
-
-
Method Details
-
getModuleSource
- Specified by:
getModuleSourcein classAbstractModuleRecord
-
loadRequestedModules
Description copied from class:AbstractModuleRecordPrepares the module for linking by recursively loading all its dependencies.- Specified by:
loadRequestedModulesin classAbstractModuleRecord
-
getRequestedModules
Description copied from class:CyclicModuleRecordA list of all the ModuleSpecifier strings and import attributes used by the module represented by this record to request the importation of a module, in occurrence order.- Specified by:
getRequestedModulesin classCyclicModuleRecord
-
getExportedNames
public Collection<com.oracle.truffle.api.strings.TruffleString> getExportedNames(Set<JSModuleRecord> exportStarSet) - Specified by:
getExportedNamesin classAbstractModuleRecord
-
resolveExport
public ExportResolution resolveExport(com.oracle.truffle.api.strings.TruffleString exportName, Set<Pair<? extends AbstractModuleRecord, com.oracle.truffle.api.strings.TruffleString>> resolveSet) - Specified by:
resolveExportin classAbstractModuleRecord
-
initializeEnvironment
Description copied from class:CyclicModuleRecordInitialize the Environment Record of the module, including resolving all imported bindings, and create the module's execution context.- Specified by:
initializeEnvironmentin classCyclicModuleRecord
-
executeModule
Description copied from class:CyclicModuleRecordEvaluate the module's code within its execution context. If this module has true in [[HasTLA]], then a PromiseCapability Record is passed as an argument, and the method is expected to resolve or reject the given capability. In this case, the method must not throw an exception, but instead reject the PromiseCapability Record if necessary.- Specified by:
executeModulein classCyclicModuleRecord
-
toString
-