Unextend InlineCodegen from ParentCodegenAware

This commit is contained in:
Alexander Udalov
2014-05-08 18:40:44 +04:00
parent 13728e1598
commit 22e21b4db0
@@ -57,38 +57,26 @@ import java.util.*;
import static org.jetbrains.jet.codegen.AsmUtil.getMethodAsmFlags;
import static org.jetbrains.jet.codegen.AsmUtil.isPrimitive;
public class InlineCodegen implements ParentCodegenAware, CallGenerator {
private final JetTypeMapper typeMapper;
private final ExpressionCodegen codegen;
private final boolean asFunctionInline;
public class InlineCodegen implements CallGenerator {
private final GenerationState state;
private final Call call;
private final SimpleFunctionDescriptor functionDescriptor;
private final JetTypeMapper typeMapper;
private final BindingContext bindingContext;
private final MethodContext context;
private final FrameMap originalFunctionFrame;
private final int initialFrameSize;
private final SimpleFunctionDescriptor functionDescriptor;
private final JvmMethodSignature jvmSignature;
private final Call call;
private final MethodContext context;
private final ExpressionCodegen codegen;
private final FrameMap originalFunctionFrame;
private final boolean asFunctionInline;
private final int initialFrameSize;
private final boolean isSameModule;
private LambdaInfo activeLambda;
protected final List<ParameterInfo> actualParameters = new ArrayList<ParameterInfo>();
protected final Map<Integer, LambdaInfo> expressionMap = new HashMap<Integer, LambdaInfo>();
private LambdaInfo activeLambda;
public InlineCodegen(
@NotNull ExpressionCodegen codegen,
@NotNull GenerationState state,
@@ -190,7 +178,7 @@ public class InlineCodegen implements ParentCodegenAware, CallGenerator {
new FunctionGenerationStrategy.FunctionDefault(state,
functionDescriptor,
(JetDeclarationWithBody) element),
getParentCodegen());
codegen.getParentCodegen());
adapter.visitMaxs(-1, -1);
adapter.visitEnd();
}
@@ -408,12 +396,6 @@ public class InlineCodegen implements ParentCodegenAware, CallGenerator {
return result;
}
@Nullable
@Override
public MemberCodegen<?> getParentCodegen() {
return codegen.getParentCodegen();
}
public static CodegenContext getContext(DeclarationDescriptor descriptor, GenerationState state) {
if (descriptor instanceof PackageFragmentDescriptor) {
return new PackageContext((PackageFragmentDescriptor) descriptor, null, null);