Rename JvmFunctionImplTypes -> JvmRuntimeTypes

Will be used for other JVM runtime types as well
This commit is contained in:
Alexander Udalov
2014-06-17 15:59:59 +04:00
parent ac8eb0f5e8
commit 544cf4f28d
3 changed files with 13 additions and 13 deletions
@@ -33,7 +33,7 @@ import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
import java.util.*;
public class JvmFunctionImplTypes {
public class JvmRuntimeTypes {
private final ReflectionTypes reflectionTypes;
private final ClassDescriptor functionImpl;
@@ -42,7 +42,7 @@ public class JvmFunctionImplTypes {
private final ClassDescriptor kMemberFunctionImpl;
private final ClassDescriptor kExtensionFunctionImpl;
public JvmFunctionImplTypes(@NotNull ReflectionTypes reflectionTypes) {
public JvmRuntimeTypes(@NotNull ReflectionTypes reflectionTypes) {
this.reflectionTypes = reflectionTypes;
ModuleDescriptor fakeModule = new ModuleDescriptorImpl(Name.special("<fake module for functions impl>"),
@@ -125,7 +125,7 @@ public class JvmFunctionImplTypes {
}
@NotNull
public Collection<JetType> getSupertypesForCallableReference(@NotNull FunctionDescriptor descriptor) {
public Collection<JetType> getSupertypesForFunctionReference(@NotNull FunctionDescriptor descriptor) {
ReceiverParameterDescriptor receiverParameter = descriptor.getReceiverParameter();
ReceiverParameterDescriptor expectedThisObject = descriptor.getExpectedThisObject();
@@ -23,7 +23,7 @@ import com.intellij.util.containers.Stack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.codegen.AsmUtil;
import org.jetbrains.jet.codegen.JvmFunctionImplTypes;
import org.jetbrains.jet.codegen.JvmRuntimeTypes;
import org.jetbrains.jet.codegen.SamCodegenUtil;
import org.jetbrains.jet.codegen.SamType;
import org.jetbrains.jet.codegen.state.GenerationState;
@@ -88,13 +88,13 @@ class CodegenAnnotatingVisitor extends JetVisitorVoid {
private final BindingTrace bindingTrace;
private final BindingContext bindingContext;
private final GenerationState.GenerateClassFilter filter;
private final JvmFunctionImplTypes functionImplTypes;
private final JvmRuntimeTypes runtimeTypes;
public CodegenAnnotatingVisitor(@NotNull GenerationState state) {
this.bindingTrace = state.getBindingTrace();
this.bindingContext = state.getBindingContext();
this.filter = state.getGenerateDeclaredClassFilter();
this.functionImplTypes = state.getJvmFunctionImplTypes();
this.runtimeTypes = state.getJvmRuntimeTypes();
}
@NotNull
@@ -264,7 +264,7 @@ class CodegenAnnotatingVisitor extends JetVisitorVoid {
if (functionDescriptor == null) return;
String name = inventAnonymousClassName(expression);
Collection<JetType> supertypes = functionImplTypes.getSupertypesForClosure(functionDescriptor);
Collection<JetType> supertypes = runtimeTypes.getSupertypesForClosure(functionDescriptor);
ClassDescriptor classDescriptor = recordClassForFunction(functionDescriptor, supertypes);
recordClosure(functionLiteral, classDescriptor, name);
@@ -313,7 +313,7 @@ class CodegenAnnotatingVisitor extends JetVisitorVoid {
ResolvedCall<?> referencedFunction = bindingContext.get(RESOLVED_CALL, expression.getCallableReference());
if (referencedFunction == null) return;
Collection<JetType> supertypes =
functionImplTypes.getSupertypesForCallableReference((FunctionDescriptor) referencedFunction.getResultingDescriptor());
runtimeTypes.getSupertypesForFunctionReference((FunctionDescriptor) referencedFunction.getResultingDescriptor());
String name = inventAnonymousClassName(expression);
ClassDescriptor classDescriptor = recordClassForFunction(functionDescriptor, supertypes);
@@ -366,7 +366,7 @@ class CodegenAnnotatingVisitor extends JetVisitorVoid {
}
else {
String name = inventAnonymousClassName(function);
Collection<JetType> supertypes = functionImplTypes.getSupertypesForClosure(functionDescriptor);
Collection<JetType> supertypes = runtimeTypes.getSupertypesForClosure(functionDescriptor);
ClassDescriptor classDescriptor = recordClassForFunction(functionDescriptor, supertypes);
recordClosure(function, classDescriptor, name);
@@ -93,7 +93,7 @@ public class GenerationState {
@Nullable
private List<ScriptDescriptor> earlierScriptsForReplInterpreter;
private final JvmFunctionImplTypes functionImplTypes;
private final JvmRuntimeTypes runtimeTypes;
@NotNull
private final ModuleDescriptor module;
@@ -153,7 +153,7 @@ public class GenerationState {
this.generateClassFilter = generateClassFilter;
ReflectionTypes reflectionTypes = new ReflectionTypes(module);
this.functionImplTypes = new JvmFunctionImplTypes(reflectionTypes);
this.runtimeTypes = new JvmRuntimeTypes(reflectionTypes);
}
@NotNull
@@ -220,8 +220,8 @@ public class GenerationState {
}
@NotNull
public JvmFunctionImplTypes getJvmFunctionImplTypes() {
return functionImplTypes;
public JvmRuntimeTypes getJvmRuntimeTypes() {
return runtimeTypes;
}
public boolean isInlineEnabled() {