"builtins/stubs" mode removed from backend
This commit is contained in:
@@ -78,9 +78,6 @@ public class AsmUtil {
|
||||
public static final String CAPTURED_RECEIVER_FIELD = "receiver$0";
|
||||
public static final String CAPTURED_THIS_FIELD = "this$0";
|
||||
|
||||
private static final String STUB_EXCEPTION = "java/lang/RuntimeException";
|
||||
private static final String STUB_EXCEPTION_MESSAGE = "Stubs are for compiler only, do not add them to runtime classpath";
|
||||
|
||||
private static final ImmutableMap<Integer, JvmPrimitiveType> primitiveTypeByAsmSort;
|
||||
private static final ImmutableMap<Type, Type> primitiveTypeByBoxedType;
|
||||
|
||||
@@ -469,10 +466,6 @@ public class AsmUtil {
|
||||
return expectedType;
|
||||
}
|
||||
|
||||
public static void genStubCode(MethodVisitor mv) {
|
||||
genMethodThrow(mv, STUB_EXCEPTION, STUB_EXCEPTION_MESSAGE);
|
||||
}
|
||||
|
||||
public static void swap(InstructionAdapter v, Type stackTop, Type afterTop) {
|
||||
if (stackTop.getSize() == 1) {
|
||||
if (afterTop.getSize() == 1) {
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.codegen;
|
||||
|
||||
/**
|
||||
* Marks if backend's JetTypeMapper should map built-in types to Java types (e.g., jet.String into java.lang.String).
|
||||
* Disabling is needed for compiling builtins: we want types to be jet.* instead of java.util* to make it possible to load
|
||||
* builtins without JDK.
|
||||
*/
|
||||
public enum BuiltinToJavaTypesMapping {
|
||||
ENABLED,
|
||||
DISABLED
|
||||
}
|
||||
@@ -25,8 +25,4 @@ public enum ClassBuilderMode {
|
||||
* Only function signatures
|
||||
*/
|
||||
SIGNATURES,
|
||||
/**
|
||||
* Function with stub bodies: just throw exception
|
||||
*/
|
||||
STUBS,
|
||||
}
|
||||
|
||||
@@ -160,10 +160,7 @@ public class ClosureCodegen extends GenerationStateAware {
|
||||
|
||||
cv.newField(fun, ACC_STATIC | ACC_FINAL, JvmAbi.INSTANCE_FIELD, asmType.getDescriptor(), null, null);
|
||||
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) {
|
||||
genStubCode(mv);
|
||||
}
|
||||
else if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
mv.visitCode();
|
||||
genInitSingletonField(asmType, iv);
|
||||
mv.visitInsn(RETURN);
|
||||
@@ -182,9 +179,6 @@ public class ClosureCodegen extends GenerationStateAware {
|
||||
|
||||
MethodVisitor mv = cv.newMethod(fun, ACC_PUBLIC | ACC_BRIDGE, interfaceFunction.getName().asString(),
|
||||
bridge.getDescriptor(), null, ArrayUtil.EMPTY_STRING_ARRAY);
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) {
|
||||
genStubCode(mv);
|
||||
}
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
mv.visitCode();
|
||||
|
||||
@@ -223,10 +217,7 @@ public class ClosureCodegen extends GenerationStateAware {
|
||||
Method constructor = new Method("<init>", Type.VOID_TYPE, argTypes);
|
||||
MethodVisitor mv = cv.newMethod(fun, NO_FLAG_PACKAGE_PRIVATE, "<init>", constructor.getDescriptor(), null,
|
||||
ArrayUtil.EMPTY_STRING_ARRAY);
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) {
|
||||
genStubCode(mv);
|
||||
}
|
||||
else if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
mv.visitCode();
|
||||
InstructionAdapter iv = new InstructionAdapter(mv);
|
||||
|
||||
|
||||
@@ -127,11 +127,6 @@ public class FunctionCodegen extends GenerationStateAware {
|
||||
|
||||
if (isAbstractMethod(functionDescriptor, methodContext.getContextKind())) return;
|
||||
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) {
|
||||
genStubCode(mv);
|
||||
return;
|
||||
}
|
||||
|
||||
generateMethodBody(mv, functionDescriptor, methodContext, jvmSignature, strategy);
|
||||
|
||||
endVisit(mv, null, origin);
|
||||
@@ -501,9 +496,6 @@ public class FunctionCodegen extends GenerationStateAware {
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.SIGNATURES) {
|
||||
return;
|
||||
}
|
||||
else if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) {
|
||||
genStubCode(mv);
|
||||
}
|
||||
else if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
InstructionAdapter v = new InstructionAdapter(mv);
|
||||
mv.visitCode();
|
||||
@@ -576,10 +568,7 @@ public class FunctionCodegen extends GenerationStateAware {
|
||||
isConstructor ? "<init>" : jvmSignature.getName() + JvmAbi.DEFAULT_PARAMS_IMPL_SUFFIX,
|
||||
descriptor, null, null);
|
||||
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) {
|
||||
genStubCode(mv);
|
||||
}
|
||||
else if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
generateDefaultImpl(owner, state, signature, functionDescriptor, isStatic, mv, loadStrategy);
|
||||
}
|
||||
}
|
||||
@@ -749,10 +738,7 @@ public class FunctionCodegen extends GenerationStateAware {
|
||||
int flags = ACC_PUBLIC | ACC_BRIDGE | ACC_SYNTHETIC; // TODO.
|
||||
|
||||
MethodVisitor mv = v.newMethod(null, flags, jvmSignature.getName(), overridden.getDescriptor(), null, null);
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) {
|
||||
genStubCode(mv);
|
||||
}
|
||||
else if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
mv.visitCode();
|
||||
|
||||
Type[] argTypes = overridden.getArgumentTypes();
|
||||
@@ -795,10 +781,7 @@ public class FunctionCodegen extends GenerationStateAware {
|
||||
int flags = ACC_PUBLIC | ACC_SYNTHETIC; // TODO.
|
||||
|
||||
MethodVisitor mv = v.newMethod(null, flags, delegateMethod.getName(), delegateMethod.getDescriptor(), null, null);
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) {
|
||||
genStubCode(mv);
|
||||
}
|
||||
else if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
mv.visitCode();
|
||||
|
||||
Type[] argTypes = delegateMethod.getArgumentTypes();
|
||||
|
||||
@@ -1478,10 +1478,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
MethodVisitor mv = v.newMethod(origin, flags, methodToGenerate.getName(), methodToGenerate.getDescriptor(), null, null);
|
||||
AnnotationCodegen.forMethod(mv, typeMapper).genAnnotations(fun);
|
||||
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) {
|
||||
genStubCode(mv);
|
||||
}
|
||||
else if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
Type returnType = methodToGenerate.getReturnType();
|
||||
|
||||
mv.visitCode();
|
||||
|
||||
@@ -40,7 +40,6 @@ import org.jetbrains.jet.lang.types.JetType;
|
||||
|
||||
import static org.jetbrains.asm4.Opcodes.*;
|
||||
import static org.jetbrains.jet.codegen.AsmUtil.NO_FLAG_PACKAGE_PRIVATE;
|
||||
import static org.jetbrains.jet.codegen.AsmUtil.genStubCode;
|
||||
import static org.jetbrains.jet.lang.resolve.java.AsmTypeConstants.OBJECT_TYPE;
|
||||
|
||||
public class SamWrapperCodegen extends GenerationStateAware {
|
||||
@@ -95,10 +94,7 @@ public class SamWrapperCodegen extends GenerationStateAware {
|
||||
private void generateConstructor(Type ownerType, Type functionType, ClassBuilder cv) {
|
||||
MethodVisitor mv = cv.newMethod(null, NO_FLAG_PACKAGE_PRIVATE, "<init>", Type.getMethodDescriptor(Type.VOID_TYPE, functionType), null, null);
|
||||
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.STUBS) {
|
||||
genStubCode(mv);
|
||||
}
|
||||
else if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||
mv.visitCode();
|
||||
InstructionAdapter iv = new InstructionAdapter(mv);
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ public class GenerationState {
|
||||
private final boolean generateDeclaredClasses;
|
||||
|
||||
public GenerationState(Project project, ClassBuilderFactory builderFactory, BindingContext bindingContext, List<JetFile> files) {
|
||||
this(project, builderFactory, Progress.DEAF, bindingContext, files, BuiltinToJavaTypesMapping.ENABLED, true, false, true);
|
||||
this(project, builderFactory, Progress.DEAF, bindingContext, files, true, false, true);
|
||||
}
|
||||
|
||||
public GenerationState(
|
||||
@@ -81,7 +81,6 @@ public class GenerationState {
|
||||
@NotNull Progress progress,
|
||||
@NotNull BindingContext bindingContext,
|
||||
@NotNull List<JetFile> files,
|
||||
@NotNull BuiltinToJavaTypesMapping builtinToJavaTypesMapping,
|
||||
boolean generateNotNullAssertions,
|
||||
boolean generateNotNullParamAssertions,
|
||||
boolean generateDeclaredClasses
|
||||
@@ -94,7 +93,7 @@ public class GenerationState {
|
||||
bindingTrace = new DelegatingBindingTrace(bindingContext, "trace in GenerationState");
|
||||
this.bindingContext = bindingTrace.getBindingContext();
|
||||
|
||||
this.typeMapper = new JetTypeMapper(bindingTrace, builtinToJavaTypesMapping == BuiltinToJavaTypesMapping.ENABLED, classBuilderMode);
|
||||
this.typeMapper = new JetTypeMapper(bindingTrace, classBuilderMode);
|
||||
|
||||
InjectorForJvmCodegen injector = new InjectorForJvmCodegen(typeMapper, this, builderFactory, project);
|
||||
|
||||
|
||||
@@ -58,12 +58,10 @@ import static org.jetbrains.jet.codegen.binding.CodegenBinding.*;
|
||||
|
||||
public class JetTypeMapper extends BindingTraceAware {
|
||||
|
||||
private final boolean mapBuiltinsToJava;
|
||||
private final ClassBuilderMode classBuilderMode;
|
||||
|
||||
public JetTypeMapper(BindingTrace bindingTrace, boolean mapBuiltinsToJava, ClassBuilderMode mode) {
|
||||
public JetTypeMapper(BindingTrace bindingTrace, ClassBuilderMode mode) {
|
||||
super(bindingTrace);
|
||||
this.mapBuiltinsToJava = mapBuiltinsToJava;
|
||||
classBuilderMode = mode;
|
||||
}
|
||||
|
||||
@@ -260,7 +258,7 @@ public class JetTypeMapper extends BindingTraceAware {
|
||||
Type known = null;
|
||||
DeclarationDescriptor descriptor = jetType.getConstructor().getDeclarationDescriptor();
|
||||
|
||||
if (mapBuiltinsToJava && descriptor instanceof ClassDescriptor) {
|
||||
if (descriptor instanceof ClassDescriptor) {
|
||||
FqNameUnsafe className = DescriptorUtils.getFQName(descriptor);
|
||||
if (className.isSafe()) {
|
||||
known = KotlinToJavaTypesMap.getInstance().getJavaAnalog(className.toSafe(), jetType.isNullable());
|
||||
@@ -279,11 +277,8 @@ public class JetTypeMapper extends BindingTraceAware {
|
||||
throw new IllegalStateException("TRAIT_IMPL is not possible for " + jetType);
|
||||
}
|
||||
else if (kind == JetTypeMapperMode.IMPL) {
|
||||
//noinspection ConstantConditions
|
||||
if (mapBuiltinsToJava) {
|
||||
// TODO: enable and fix tests
|
||||
//throw new IllegalStateException("must not map known type to IMPL when not compiling builtins: " + jetType);
|
||||
}
|
||||
// TODO: enable and fix tests
|
||||
//throw new IllegalStateException("must not map known type to IMPL when not compiling builtins: " + jetType);
|
||||
return mapKnownAsmType(jetType, known, signatureVisitor, howThisTypeIsUsed);
|
||||
}
|
||||
else {
|
||||
@@ -308,11 +303,10 @@ public class JetTypeMapper extends BindingTraceAware {
|
||||
if (signatureVisitor != null) {
|
||||
signatureVisitor.writeAsmType(asmType);
|
||||
}
|
||||
checkValidType(asmType);
|
||||
return asmType;
|
||||
}
|
||||
|
||||
if (mapBuiltinsToJava && descriptor instanceof ClassDescriptor && KotlinBuiltIns.getInstance().isArray(jetType)) {
|
||||
if (descriptor instanceof ClassDescriptor && KotlinBuiltIns.getInstance().isArray(jetType)) {
|
||||
if (jetType.getArguments().size() != 1) {
|
||||
throw new UnsupportedOperationException("arrays must have one type argument");
|
||||
}
|
||||
@@ -332,7 +326,6 @@ public class JetTypeMapper extends BindingTraceAware {
|
||||
else {
|
||||
r = AsmTypeConstants.JAVA_ARRAY_GENERIC_TYPE;
|
||||
}
|
||||
checkValidType(r);
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -348,7 +341,6 @@ public class JetTypeMapper extends BindingTraceAware {
|
||||
|
||||
writeGenericType(signatureVisitor, asmType, jetType, howThisTypeIsUsed, projectionsAllowed);
|
||||
|
||||
checkValidType(asmType);
|
||||
return asmType;
|
||||
}
|
||||
|
||||
@@ -358,7 +350,6 @@ public class JetTypeMapper extends BindingTraceAware {
|
||||
if (signatureVisitor != null) {
|
||||
signatureVisitor.writeTypeVariable(typeParameterDescriptor.getName(), type);
|
||||
}
|
||||
checkValidType(type);
|
||||
return type;
|
||||
}
|
||||
|
||||
@@ -460,21 +451,9 @@ public class JetTypeMapper extends BindingTraceAware {
|
||||
writeGenericType(signatureVisitor, asmType, jetType, howThisTypeIsUsed, allowProjections);
|
||||
}
|
||||
}
|
||||
checkValidType(asmType);
|
||||
return asmType;
|
||||
}
|
||||
|
||||
private void checkValidType(@NotNull Type type) {
|
||||
if (!mapBuiltinsToJava) {
|
||||
String descriptor = type.getDescriptor();
|
||||
if (!descriptor.equals("Ljava/lang/Object;")) {
|
||||
if (descriptor.startsWith("Ljava/")) {
|
||||
throw new IllegalStateException("builtins must not reference java.* classes: " + descriptor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public CallableMethod mapToCallableMethod(
|
||||
@NotNull FunctionDescriptor functionDescriptor,
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.jetbrains.jet.cli.jvm;
|
||||
|
||||
import org.jetbrains.jet.codegen.BuiltinToJavaTypesMapping;
|
||||
import org.jetbrains.jet.config.CompilerConfigurationKey;
|
||||
import org.jetbrains.jet.lang.resolve.AnalyzerScriptParameter;
|
||||
|
||||
@@ -31,8 +30,6 @@ public class JVMConfigurationKeys {
|
||||
public static final CompilerConfigurationKey<List<File>> ANNOTATIONS_PATH_KEY = CompilerConfigurationKey.create("annotations path");
|
||||
|
||||
public static final CompilerConfigurationKey<List<AnalyzerScriptParameter>> SCRIPT_PARAMETERS = CompilerConfigurationKey.create("script");
|
||||
public static final CompilerConfigurationKey<BuiltinToJavaTypesMapping> BUILTIN_TO_JAVA_TYPES_MAPPING_KEY =
|
||||
CompilerConfigurationKey.create("builtin to java types mapping");
|
||||
|
||||
public static final CompilerConfigurationKey<Boolean> GENERATE_NOT_NULL_ASSERTIONS =
|
||||
CompilerConfigurationKey.create("generate not-null assertions");
|
||||
|
||||
@@ -31,7 +31,6 @@ import org.jetbrains.jet.cli.jvm.compiler.CompileEnvironmentUtil;
|
||||
import org.jetbrains.jet.cli.jvm.compiler.JetCoreEnvironment;
|
||||
import org.jetbrains.jet.cli.jvm.compiler.KotlinToJVMBytecodeCompiler;
|
||||
import org.jetbrains.jet.cli.jvm.repl.ReplFromTerminal;
|
||||
import org.jetbrains.jet.codegen.BuiltinToJavaTypesMapping;
|
||||
import org.jetbrains.jet.codegen.CompilationException;
|
||||
import org.jetbrains.jet.config.CommonConfigurationKeys;
|
||||
import org.jetbrains.jet.config.CompilerConfiguration;
|
||||
@@ -115,7 +114,6 @@ public class K2JVMCompiler extends CLICompiler<K2JVMCompilerArguments> {
|
||||
configuration.put(JVMConfigurationKeys.SCRIPT_PARAMETERS, arguments.script
|
||||
? CommandLineScriptUtils.scriptParameters()
|
||||
: Collections.<AnalyzerScriptParameter>emptyList());
|
||||
configuration.put(JVMConfigurationKeys.BUILTIN_TO_JAVA_TYPES_MAPPING_KEY, BuiltinToJavaTypesMapping.ENABLED);
|
||||
|
||||
configuration.put(JVMConfigurationKeys.GENERATE_NOT_NULL_ASSERTIONS, arguments.notNullAssertions);
|
||||
configuration.put(JVMConfigurationKeys.GENERATE_NOT_NULL_PARAMETER_ASSERTIONS, arguments.notNullParamAssertions);
|
||||
|
||||
@@ -340,7 +340,6 @@ public class KotlinToJVMBytecodeCompiler {
|
||||
};
|
||||
GenerationState generationState = new GenerationState(
|
||||
project, ClassBuilderFactories.BINARIES, backendProgress, exhaust.getBindingContext(), environment.getSourceFiles(),
|
||||
configuration.get(JVMConfigurationKeys.BUILTIN_TO_JAVA_TYPES_MAPPING_KEY, BuiltinToJavaTypesMapping.ENABLED),
|
||||
configuration.get(JVMConfigurationKeys.GENERATE_NOT_NULL_ASSERTIONS, false),
|
||||
configuration.get(JVMConfigurationKeys.GENERATE_NOT_NULL_PARAMETER_ASSERTIONS, false),
|
||||
/*generateDeclaredClasses = */true
|
||||
|
||||
@@ -37,7 +37,6 @@ import com.intellij.testFramework.LightVirtualFile;
|
||||
import com.intellij.util.containers.Stack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.codegen.BuiltinToJavaTypesMapping;
|
||||
import org.jetbrains.jet.codegen.CompilationErrorHandler;
|
||||
import org.jetbrains.jet.codegen.NamespaceCodegen;
|
||||
import org.jetbrains.jet.codegen.state.GenerationState;
|
||||
@@ -152,7 +151,6 @@ public class KotlinJavaFileStubProvider implements CachedValueProvider<PsiJavaFi
|
||||
Progress.DEAF,
|
||||
context.getBindingContext(),
|
||||
Lists.newArrayList(files),
|
||||
BuiltinToJavaTypesMapping.ENABLED,
|
||||
/*not-null assertions*/false, false,
|
||||
/*generateDeclaredClasses=*/stubGenerationStrategy.generateDeclaredClasses());
|
||||
state.beforeCompile();
|
||||
|
||||
@@ -58,7 +58,6 @@ public class CodegenTestUtil {
|
||||
CompilerConfiguration configuration = environment.getConfiguration();
|
||||
GenerationState state = new GenerationState(
|
||||
environment.getProject(), ClassBuilderFactories.TEST, Progress.DEAF, analyzeExhaust.getBindingContext(), files.getPsiFiles(),
|
||||
configuration.get(JVMConfigurationKeys.BUILTIN_TO_JAVA_TYPES_MAPPING_KEY, BuiltinToJavaTypesMapping.ENABLED),
|
||||
configuration.get(JVMConfigurationKeys.GENERATE_NOT_NULL_ASSERTIONS, true),
|
||||
configuration.get(JVMConfigurationKeys.GENERATE_NOT_NULL_PARAMETER_ASSERTIONS, true),
|
||||
/*generateDeclaredClasses = */true
|
||||
|
||||
@@ -192,7 +192,7 @@ public class JetPositionManager implements PositionManager {
|
||||
Collection<JetFile> namespaceFiles = JetFilesProvider.getInstance(file.getProject()).allNamespaceFiles().fun(file);
|
||||
|
||||
DelegatingBindingTrace bindingTrace = new DelegatingBindingTrace(analyzeExhaust.getBindingContext(), "trace created in JetPositionManager");
|
||||
JetTypeMapper typeMapper = new JetTypeMapper(bindingTrace, true, ClassBuilderMode.FULL);
|
||||
JetTypeMapper typeMapper = new JetTypeMapper(bindingTrace, ClassBuilderMode.FULL);
|
||||
//noinspection unchecked
|
||||
CodegenBinding.initTrace(bindingTrace, namespaceFiles);
|
||||
return new Result<JetTypeMapper>(typeMapper, PsiModificationTracker.MODIFICATION_COUNT);
|
||||
|
||||
@@ -93,7 +93,7 @@ public class BytecodeToolwindow extends JPanel implements Disposable {
|
||||
return printStackTraceToString(exhaust.getError());
|
||||
}
|
||||
state = new GenerationState(jetFile.getProject(), ClassBuilderFactories.TEXT, Progress.DEAF, exhaust.getBindingContext(),
|
||||
Collections.singletonList(jetFile), BuiltinToJavaTypesMapping.ENABLED, true, true, true);
|
||||
Collections.singletonList(jetFile), true, true, true);
|
||||
KotlinCodegenFacade.compileCorrectFiles(state, CompilationErrorHandler.THROW_EXCEPTION);
|
||||
}
|
||||
catch (ProcessCanceledException e) {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class JetPositionManagerTest extends PositionManagerTestCase {
|
||||
assertNotNull(positionManager);
|
||||
|
||||
DelegatingBindingTrace bindingTrace = new DelegatingBindingTrace(state.getBindingContext(), "trace created in JetPositionManagerTest");
|
||||
JetTypeMapper typeMapper = new JetTypeMapper(bindingTrace, true, ClassBuilderMode.FULL);
|
||||
JetTypeMapper typeMapper = new JetTypeMapper(bindingTrace, ClassBuilderMode.FULL);
|
||||
//noinspection unchecked
|
||||
CodegenBinding.initTrace(bindingTrace, files);
|
||||
for (JetFile file : files) {
|
||||
|
||||
Reference in New Issue
Block a user