Parametrize module creation by platform with built-ins
This commit is contained in:
@@ -48,7 +48,8 @@ public final class TopDownAnalyzerFacadeForJS {
|
||||
BindingTrace trace = new BindingTraceContext();
|
||||
|
||||
MutableModuleContext newModuleContext = ContextKt.ContextForNewModule(
|
||||
config.getProject(), Name.special("<" + config.getModuleId() + ">"), JsPlatform.INSTANCE
|
||||
config.getProject(), Name.special("<" + config.getModuleId() + ">"), JsPlatform.INSTANCE,
|
||||
JsPlatform.INSTANCE.getBuiltIns()
|
||||
);
|
||||
newModuleContext.setDependencies(computeDependencies(newModuleContext.getModule(), config));
|
||||
return analyzeFilesWithGivenTrace(files, trace, newModuleContext, config);
|
||||
|
||||
@@ -19,8 +19,8 @@ package org.jetbrains.kotlin.js.config;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.util.SmartList;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -160,8 +160,8 @@ public abstract class Config {
|
||||
", but metadata.abiVersion = " + metadata.getAbiVersion();
|
||||
|
||||
ModuleDescriptorImpl moduleDescriptor = TargetPlatformKt.createModule(
|
||||
JsPlatform.INSTANCE, Name.special("<" + metadata.getModuleName() + ">"), storageManager
|
||||
);
|
||||
JsPlatform.INSTANCE, Name.special("<" + metadata.getModuleName() + ">"), storageManager,
|
||||
JsPlatform.INSTANCE.getBuiltIns());
|
||||
|
||||
PackageFragmentProvider provider =
|
||||
KotlinJavascriptSerializationUtil.createPackageFragmentProvider(moduleDescriptor, metadata.getBody(), storageManager);
|
||||
|
||||
Reference in New Issue
Block a user