OwnerKind.NAMESPACE → OwnerKind.PACKAGE
This commit is contained in:
@@ -150,7 +150,7 @@ public class AsmUtil {
|
||||
}
|
||||
|
||||
public static boolean isStatic(OwnerKind kind) {
|
||||
return kind == OwnerKind.NAMESPACE || kind == OwnerKind.TRAIT_IMPL;
|
||||
return kind == OwnerKind.PACKAGE || kind == OwnerKind.TRAIT_IMPL;
|
||||
}
|
||||
|
||||
public static int getMethodAsmFlags(FunctionDescriptor functionDescriptor, OwnerKind kind) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package org.jetbrains.jet.codegen;
|
||||
|
||||
public enum OwnerKind {
|
||||
NAMESPACE,
|
||||
PACKAGE,
|
||||
|
||||
IMPLEMENTATION,
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class PropertyCodegen extends GenerationStateAware {
|
||||
assert variableDescriptor instanceof PropertyDescriptor : "Property should have a property descriptor: " + variableDescriptor;
|
||||
|
||||
PropertyDescriptor propertyDescriptor = (PropertyDescriptor) variableDescriptor;
|
||||
assert kind == OwnerKind.NAMESPACE || kind == OwnerKind.IMPLEMENTATION || kind == OwnerKind.TRAIT_IMPL
|
||||
assert kind == OwnerKind.PACKAGE || kind == OwnerKind.IMPLEMENTATION || kind == OwnerKind.TRAIT_IMPL
|
||||
: "Generating property with a wrong kind (" + kind + "): " + propertyDescriptor;
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ public class PropertyCodegen extends GenerationStateAware {
|
||||
modifiers |= ACC_VOLATILE;
|
||||
}
|
||||
|
||||
if (kind == OwnerKind.NAMESPACE) {
|
||||
if (kind == OwnerKind.PACKAGE) {
|
||||
modifiers |= ACC_STATIC;
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ public class PropertyCodegen extends GenerationStateAware {
|
||||
backingFieldContext = codegen.context;
|
||||
v.getSerializationBindings().put(STATIC_FIELD_IN_OUTER_CLASS, propertyDescriptor);
|
||||
} else {
|
||||
if (kind != OwnerKind.NAMESPACE || isDelegate) {
|
||||
if (kind != OwnerKind.PACKAGE || isDelegate) {
|
||||
modifiers |= ACC_PRIVATE;
|
||||
}
|
||||
}
|
||||
@@ -318,7 +318,7 @@ public class PropertyCodegen extends GenerationStateAware {
|
||||
PropertyDescriptor propertyDescriptor = callableDescriptor.getCorrespondingProperty();
|
||||
|
||||
int paramCode = 0;
|
||||
if (codegen.context.getContextKind() != OwnerKind.NAMESPACE) {
|
||||
if (codegen.context.getContextKind() != OwnerKind.PACKAGE) {
|
||||
v.load(0, OBJECT_TYPE);
|
||||
paramCode = 1;
|
||||
}
|
||||
@@ -361,7 +361,7 @@ public class PropertyCodegen extends GenerationStateAware {
|
||||
Call call = bindingContext.get(BindingContext.DELEGATED_PROPERTY_CALL, callableDescriptor);
|
||||
assert call != null : "Call should be recorded for delegate call " + signature.toString();
|
||||
|
||||
if (codegen.context.getContextKind() != OwnerKind.NAMESPACE) {
|
||||
if (codegen.context.getContextKind() != OwnerKind.PACKAGE) {
|
||||
v.load(0, OBJECT_TYPE);
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ public abstract class CodegenContext<T extends DeclarationDescriptor> {
|
||||
public FrameMap prepareFrame(JetTypeMapper mapper) {
|
||||
FrameMap frameMap = new FrameMap();
|
||||
|
||||
if (getContextKind() != OwnerKind.NAMESPACE) {
|
||||
if (getContextKind() != OwnerKind.PACKAGE) {
|
||||
frameMap.enterTemp(OBJECT_TYPE); // 0 slot for this
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.jetbrains.jet.lang.descriptors.PackageFragmentDescriptor;
|
||||
public class PackageContext extends FieldOwnerContext<PackageFragmentDescriptor> {
|
||||
|
||||
public PackageContext(@NotNull PackageFragmentDescriptor contextDescriptor, @Nullable CodegenContext parent) {
|
||||
super(contextDescriptor, OwnerKind.NAMESPACE, parent, null, null, null);
|
||||
super(contextDescriptor, OwnerKind.PACKAGE, parent, null, null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.List;
|
||||
|
||||
class RootContext extends CodegenContext {
|
||||
public RootContext() {
|
||||
super(new FakeDescriptor(), OwnerKind.NAMESPACE, null, null, null, null);
|
||||
super(new FakeDescriptor(), OwnerKind.PACKAGE, null, null, null, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user