Minor. Annotated with @Nullable/@NotNull.
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.jetbrains.jet.codegen.context;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.codegen.OwnerKind;
|
||||
import org.jetbrains.jet.codegen.state.JetTypeMapper;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
@@ -24,17 +26,15 @@ import static org.jetbrains.jet.codegen.binding.CodegenBinding.CLOSURE;
|
||||
|
||||
public class AnonymousClassContext extends CodegenContext {
|
||||
public AnonymousClassContext(
|
||||
JetTypeMapper typeMapper,
|
||||
ClassDescriptor contextDescriptor,
|
||||
OwnerKind contextKind,
|
||||
CodegenContext parentContext,
|
||||
LocalLookup localLookup
|
||||
@NotNull JetTypeMapper typeMapper,
|
||||
@NotNull ClassDescriptor contextDescriptor,
|
||||
@NotNull OwnerKind contextKind,
|
||||
@Nullable CodegenContext parentContext,
|
||||
@Nullable LocalLookup localLookup
|
||||
) {
|
||||
//noinspection SuspiciousMethodCalls
|
||||
super(contextDescriptor, contextKind, parentContext, typeMapper.getBindingContext().get(CLOSURE,
|
||||
contextDescriptor),
|
||||
contextDescriptor,
|
||||
localLookup);
|
||||
super(contextDescriptor, contextKind, parentContext, typeMapper.getBindingContext().get(CLOSURE, contextDescriptor),
|
||||
contextDescriptor, localLookup);
|
||||
initOuterExpression(typeMapper, contextDescriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
package org.jetbrains.jet.codegen.context;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.codegen.OwnerKind;
|
||||
import org.jetbrains.jet.codegen.state.JetTypeMapper;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
@@ -24,17 +26,15 @@ import static org.jetbrains.jet.codegen.binding.CodegenBinding.CLOSURE;
|
||||
|
||||
public class ClassContext extends CodegenContext {
|
||||
public ClassContext(
|
||||
JetTypeMapper typeMapper,
|
||||
ClassDescriptor contextDescriptor,
|
||||
OwnerKind contextKind,
|
||||
CodegenContext parentContext,
|
||||
LocalLookup localLookup
|
||||
@NotNull JetTypeMapper typeMapper,
|
||||
@NotNull ClassDescriptor contextDescriptor,
|
||||
@NotNull OwnerKind contextKind,
|
||||
@Nullable CodegenContext parentContext,
|
||||
@Nullable LocalLookup localLookup
|
||||
) {
|
||||
//noinspection SuspiciousMethodCalls
|
||||
super(contextDescriptor, contextKind, parentContext, typeMapper.getBindingContext().get(CLOSURE,
|
||||
contextDescriptor),
|
||||
contextDescriptor,
|
||||
localLookup);
|
||||
super(contextDescriptor, contextKind, parentContext, typeMapper.getBindingContext().get(CLOSURE, contextDescriptor),
|
||||
contextDescriptor, localLookup);
|
||||
initOuterExpression(typeMapper, contextDescriptor);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.jetbrains.jet.codegen.context;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.codegen.OwnerKind;
|
||||
import org.jetbrains.jet.codegen.state.JetTypeMapper;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
@@ -29,11 +30,11 @@ class ClosureContext extends CodegenContext {
|
||||
private final ClassDescriptor classDescriptor;
|
||||
|
||||
public ClosureContext(
|
||||
JetTypeMapper typeMapper,
|
||||
FunctionDescriptor contextDescriptor,
|
||||
ClassDescriptor classDescriptor,
|
||||
CodegenContext parentContext,
|
||||
LocalLookup localLookup
|
||||
@NotNull JetTypeMapper typeMapper,
|
||||
@NotNull FunctionDescriptor contextDescriptor,
|
||||
@NotNull ClassDescriptor classDescriptor,
|
||||
@Nullable CodegenContext parentContext,
|
||||
@Nullable LocalLookup localLookup
|
||||
) {
|
||||
//noinspection SuspiciousMethodCalls
|
||||
super(contextDescriptor, OwnerKind.IMPLEMENTATION, parentContext,
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.jetbrains.jet.codegen.context;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.codegen.OwnerKind;
|
||||
import org.jetbrains.jet.codegen.StackValue;
|
||||
import org.jetbrains.jet.lang.descriptors.ClassDescriptor;
|
||||
@@ -29,8 +28,8 @@ public class ConstructorContext extends MethodContext {
|
||||
private static final StackValue local1 = StackValue.local(1, OBJECT_TYPE);
|
||||
|
||||
public ConstructorContext(
|
||||
ConstructorDescriptor contextDescriptor,
|
||||
OwnerKind kind,
|
||||
@NotNull ConstructorDescriptor contextDescriptor,
|
||||
@NotNull OwnerKind kind,
|
||||
@NotNull CodegenContext parent
|
||||
) {
|
||||
super(contextDescriptor, kind, parent);
|
||||
|
||||
@@ -29,8 +29,8 @@ import org.jetbrains.jet.lang.descriptors.PropertyAccessorDescriptor;
|
||||
public class MethodContext extends CodegenContext {
|
||||
public MethodContext(
|
||||
@NotNull FunctionDescriptor contextType,
|
||||
OwnerKind contextKind,
|
||||
CodegenContext parentContext
|
||||
@NotNull OwnerKind contextKind,
|
||||
@NotNull CodegenContext parentContext
|
||||
) {
|
||||
super(contextType instanceof PropertyAccessorDescriptor
|
||||
? ((PropertyAccessorDescriptor) contextType).getCorrespondingProperty()
|
||||
|
||||
@@ -17,11 +17,12 @@
|
||||
package org.jetbrains.jet.codegen.context;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.codegen.OwnerKind;
|
||||
import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
|
||||
|
||||
public class NamespaceContext extends CodegenContext {
|
||||
public NamespaceContext(@NotNull NamespaceDescriptor contextDescriptor, CodegenContext parent, @NotNull OwnerKind kind) {
|
||||
public NamespaceContext(@NotNull NamespaceDescriptor contextDescriptor, @Nullable CodegenContext parent, @NotNull OwnerKind kind) {
|
||||
super(contextDescriptor, kind, parent, null, null, null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user