Search in sources :

Example 11 with SourceIdentifier

use of com.github.anba.es6draft.runtime.modules.SourceIdentifier in project es6draft by anba.

the class URLModuleLoader method defineModule.

@Override
protected void defineModule(SourceTextModuleRecord module) {
    SourceIdentifier identifier = module.getSourceCodeId();
    if (modules.containsKey(identifier)) {
        throw new IllegalArgumentException();
    }
    modules.put(identifier, module);
}
Also used : SourceIdentifier(com.github.anba.es6draft.runtime.modules.SourceIdentifier)

Aggregations

SourceIdentifier (com.github.anba.es6draft.runtime.modules.SourceIdentifier)11 ModuleLoader (com.github.anba.es6draft.runtime.modules.ModuleLoader)5 ModuleRecord (com.github.anba.es6draft.runtime.modules.ModuleRecord)4 Realm (com.github.anba.es6draft.runtime.Realm)3 ModuleSource (com.github.anba.es6draft.runtime.modules.ModuleSource)3 ExecutionContext (com.github.anba.es6draft.runtime.ExecutionContext)2 Function (com.github.anba.es6draft.runtime.internal.Properties.Function)2 ScriptLoader (com.github.anba.es6draft.runtime.internal.ScriptLoader)2 SourceTextModuleRecord (com.github.anba.es6draft.runtime.modules.SourceTextModuleRecord)2 StringModuleSource (com.github.anba.es6draft.runtime.modules.loader.StringModuleSource)2 Executable (com.github.anba.es6draft.Executable)1 Script (com.github.anba.es6draft.Script)1 ParserException (com.github.anba.es6draft.parser.ParserException)1 MozShellGlobalObject (com.github.anba.es6draft.repl.global.MozShellGlobalObject)1 SharedFunctions.loadScript (com.github.anba.es6draft.repl.global.SharedFunctions.loadScript)1 SharedFunctions.relativePathToScript (com.github.anba.es6draft.repl.global.SharedFunctions.relativePathToScript)1 NodeModuleLoader (com.github.anba.es6draft.repl.loader.NodeModuleLoader)1 NodeStandardModuleLoader (com.github.anba.es6draft.repl.loader.NodeStandardModuleLoader)1 ToFlatString (com.github.anba.es6draft.runtime.AbstractOperations.ToFlatString)1 InitializeHostDefinedRealm (com.github.anba.es6draft.runtime.Realm.InitializeHostDefinedRealm)1