Location.NOWHERE -> UsageLocation.NO_LOCATION
This commit is contained in:
@@ -36,7 +36,7 @@ import org.jetbrains.kotlin.load.kotlin.PackageClassUtils;
|
||||
import org.jetbrains.kotlin.psi.JetElement;
|
||||
import org.jetbrains.kotlin.resolve.BindingContext;
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils;
|
||||
import org.jetbrains.kotlin.resolve.scopes.Location;
|
||||
import org.jetbrains.kotlin.resolve.scopes.UsageLocation;
|
||||
import org.jetbrains.kotlin.types.JetType;
|
||||
import org.jetbrains.kotlin.types.expressions.OperatorConventions;
|
||||
import org.jetbrains.kotlin.utils.UtilsPackage;
|
||||
@@ -453,6 +453,6 @@ public class ClosureCodegen extends MemberCodegen<JetElement> {
|
||||
ClassDescriptor elementClass = elementDescriptor.getExtensionReceiverParameter() == null
|
||||
? getBuiltIns(elementDescriptor).getFunction(arity)
|
||||
: getBuiltIns(elementDescriptor).getExtensionFunction(arity);
|
||||
return elementClass.getDefaultType().getMemberScope().getFunctions(OperatorConventions.INVOKE, Location.NOWHERE).iterator().next();
|
||||
return elementClass.getDefaultType().getMemberScope().getFunctions(OperatorConventions.INVOKE, UsageLocation.NO_LOCATION).iterator().next();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ import org.jetbrains.kotlin.resolve.inline.InlineUtil;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterKind;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterSignature;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature;
|
||||
import org.jetbrains.kotlin.resolve.scopes.Location;
|
||||
import org.jetbrains.kotlin.resolve.scopes.UsageLocation;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.*;
|
||||
import org.jetbrains.kotlin.synthetic.SyntheticJavaPropertyDescriptor;
|
||||
import org.jetbrains.kotlin.types.JetType;
|
||||
@@ -1076,7 +1076,7 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
|
||||
Type asmLoopRangeType = asmType(loopRangeType);
|
||||
|
||||
Collection<VariableDescriptor> incrementProp =
|
||||
loopRangeType.getMemberScope().getProperties(Name.identifier("increment"), Location.NOWHERE);
|
||||
loopRangeType.getMemberScope().getProperties(Name.identifier("increment"), UsageLocation.NO_LOCATION);
|
||||
assert incrementProp.size() == 1 : loopRangeType + " " + incrementProp.size();
|
||||
incrementType = asmType(incrementProp.iterator().next().getType());
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmClassSignature;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterKind;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterSignature;
|
||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature;
|
||||
import org.jetbrains.kotlin.resolve.scopes.Location;
|
||||
import org.jetbrains.kotlin.resolve.scopes.UsageLocation;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ExtensionReceiver;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue;
|
||||
import org.jetbrains.kotlin.resolve.scopes.receivers.ThisReceiver;
|
||||
@@ -403,7 +403,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
|
||||
private boolean isGenericToArrayPresent() {
|
||||
Collection<FunctionDescriptor> functions =
|
||||
descriptor.getDefaultType().getMemberScope().getFunctions(Name.identifier("toArray"), Location.NOWHERE);
|
||||
descriptor.getDefaultType().getMemberScope().getFunctions(Name.identifier("toArray"), UsageLocation.NO_LOCATION);
|
||||
for (FunctionDescriptor function : functions) {
|
||||
if (CallResolverUtilPackage.isOrOverridesSynthesized(function)) {
|
||||
continue;
|
||||
@@ -817,7 +817,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
Type type = typeMapper.mapType(getBuiltIns(descriptor).getArrayType(INVARIANT, descriptor.getDefaultType()));
|
||||
|
||||
FunctionDescriptor valuesFunction =
|
||||
KotlinPackage.single(descriptor.getStaticScope().getFunctions(ENUM_VALUES, Location.NOWHERE), new Function1<FunctionDescriptor, Boolean>() {
|
||||
KotlinPackage.single(descriptor.getStaticScope().getFunctions(ENUM_VALUES, UsageLocation.NO_LOCATION), new Function1<FunctionDescriptor, Boolean>() {
|
||||
@Override
|
||||
public Boolean invoke(FunctionDescriptor descriptor) {
|
||||
return CodegenUtil.isEnumValuesMethod(descriptor);
|
||||
@@ -837,7 +837,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
|
||||
private void generateEnumValueOfMethod() {
|
||||
FunctionDescriptor valueOfFunction =
|
||||
KotlinPackage.single(descriptor.getStaticScope().getFunctions(ENUM_VALUE_OF, Location.NOWHERE), new Function1<FunctionDescriptor, Boolean>() {
|
||||
KotlinPackage.single(descriptor.getStaticScope().getFunctions(ENUM_VALUE_OF, UsageLocation.NO_LOCATION), new Function1<FunctionDescriptor, Boolean>() {
|
||||
@Override
|
||||
public Boolean invoke(FunctionDescriptor descriptor) {
|
||||
return CodegenUtil.isEnumValueOfMethod(descriptor);
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.name.FqName;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
import org.jetbrains.kotlin.psi.JetFile;
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils;
|
||||
import org.jetbrains.kotlin.resolve.scopes.Location;
|
||||
import org.jetbrains.kotlin.resolve.scopes.UsageLocation;
|
||||
import org.jetbrains.kotlin.types.JetType;
|
||||
import org.jetbrains.kotlin.types.expressions.OperatorConventions;
|
||||
import org.jetbrains.org.objectweb.asm.MethodVisitor;
|
||||
@@ -149,7 +149,7 @@ public class SamWrapperCodegen {
|
||||
(ClassDescriptor) erasedInterfaceFunction.getContainingDeclaration(), OwnerKind.IMPLEMENTATION, state), cv, state, parentCodegen);
|
||||
|
||||
FunctionDescriptor invokeFunction =
|
||||
functionJetType.getMemberScope().getFunctions(OperatorConventions.INVOKE, Location.NOWHERE).iterator().next().getOriginal();
|
||||
functionJetType.getMemberScope().getFunctions(OperatorConventions.INVOKE, UsageLocation.NO_LOCATION).iterator().next().getOriginal();
|
||||
StackValue functionField = StackValue.field(functionType, ownerType, FUNCTION_FIELD_NAME, false, StackValue.none());
|
||||
codegen.genDelegate(erasedInterfaceFunction, invokeFunction, functionField);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user