org.jetbrains.jet.codegen.inline
Class InlineCodegen

java.lang.Object
  extended by org.jetbrains.jet.codegen.inline.InlineCodegen
All Implemented Interfaces:
CallGenerator

public class InlineCodegen
extends java.lang.Object
implements CallGenerator


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jetbrains.jet.codegen.CallGenerator
CallGenerator.DefaultCallGenerator
 
Field Summary
protected  java.util.List<org.jetbrains.jet.codegen.inline.ParameterInfo> actualParameters
           
protected  java.util.Map<java.lang.Integer,LambdaInfo> expressionMap
           
 
Constructor Summary
InlineCodegen(ExpressionCodegen codegen, GenerationState state, SimpleFunctionDescriptor functionDescriptor, JetElement callElement)
           
 
Method Summary
 void afterParameterPut(org.jetbrains.org.objectweb.asm.Type type, StackValue stackValue, ValueParameterDescriptor valueParameterDescriptor)
           
 void genCall(CallableMethod callableMethod, ResolvedCall<?> resolvedCall, boolean callDefault, ExpressionCodegen codegen)
           
 void genCallWithoutAssertions(CallableMethod callableMethod, ExpressionCodegen codegen)
           
 void genValueAndPut(ValueParameterDescriptor valueParameterDescriptor, JetExpression argumentExpression, org.jetbrains.org.objectweb.asm.Type parameterType)
           
static CodegenContext getContext(DeclarationDescriptor descriptor, GenerationState state)
           
static java.lang.String getNodeText(org.jetbrains.org.objectweb.asm.tree.MethodNode node)
           
static boolean isInliningClosure(JetExpression expression, ValueParameterDescriptor valueParameterDescriptora)
           
 void leaveTemps()
           
 void putCapturedValueOnStack(StackValue stackValue, org.jetbrains.org.objectweb.asm.Type valueType, int paramIndex)
           
 void putHiddenParams()
           
 void putValueIfNeeded(ValueParameterDescriptor valueParameterDescriptor, org.jetbrains.org.objectweb.asm.Type parameterType, StackValue value)
           
 void rememberClosure(JetFunctionLiteralExpression expression, org.jetbrains.org.objectweb.asm.Type type)
           
 boolean shouldPutValue(org.jetbrains.org.objectweb.asm.Type type, StackValue stackValue, ValueParameterDescriptor descriptor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actualParameters

protected final java.util.List<org.jetbrains.jet.codegen.inline.ParameterInfo> actualParameters

expressionMap

protected final java.util.Map<java.lang.Integer,LambdaInfo> expressionMap
Constructor Detail

InlineCodegen

public InlineCodegen(@NotNull
                     ExpressionCodegen codegen,
                     @NotNull
                     GenerationState state,
                     @NotNull
                     SimpleFunctionDescriptor functionDescriptor,
                     @NotNull
                     JetElement callElement)
Method Detail

genCallWithoutAssertions

public void genCallWithoutAssertions(@NotNull
                                     CallableMethod callableMethod,
                                     @NotNull
                                     ExpressionCodegen codegen)
Specified by:
genCallWithoutAssertions in interface CallGenerator

genCall

public void genCall(@NotNull
                    CallableMethod callableMethod,
                    @Nullable
                    ResolvedCall<?> resolvedCall,
                    boolean callDefault,
                    @NotNull
                    ExpressionCodegen codegen)
Specified by:
genCall in interface CallGenerator

afterParameterPut

public void afterParameterPut(@NotNull
                              org.jetbrains.org.objectweb.asm.Type type,
                              @Nullable
                              StackValue stackValue,
                              @Nullable
                              ValueParameterDescriptor valueParameterDescriptor)
Specified by:
afterParameterPut in interface CallGenerator

shouldPutValue

public boolean shouldPutValue(@NotNull
                              org.jetbrains.org.objectweb.asm.Type type,
                              @Nullable
                              StackValue stackValue,
                              @Nullable
                              ValueParameterDescriptor descriptor)

putHiddenParams

public void putHiddenParams()
Specified by:
putHiddenParams in interface CallGenerator

leaveTemps

public void leaveTemps()

isInliningClosure

public static boolean isInliningClosure(JetExpression expression,
                                        ValueParameterDescriptor valueParameterDescriptora)

rememberClosure

public void rememberClosure(JetFunctionLiteralExpression expression,
                            org.jetbrains.org.objectweb.asm.Type type)

getContext

public static CodegenContext getContext(DeclarationDescriptor descriptor,
                                        GenerationState state)

getNodeText

@NotNull
public static java.lang.String getNodeText(@Nullable
                                                   org.jetbrains.org.objectweb.asm.tree.MethodNode node)

genValueAndPut

public void genValueAndPut(@NotNull
                           ValueParameterDescriptor valueParameterDescriptor,
                           @NotNull
                           JetExpression argumentExpression,
                           @NotNull
                           org.jetbrains.org.objectweb.asm.Type parameterType)
Specified by:
genValueAndPut in interface CallGenerator

putValueIfNeeded

public void putValueIfNeeded(@Nullable
                             ValueParameterDescriptor valueParameterDescriptor,
                             @NotNull
                             org.jetbrains.org.objectweb.asm.Type parameterType,
                             @NotNull
                             StackValue value)
Specified by:
putValueIfNeeded in interface CallGenerator

putCapturedValueOnStack

public void putCapturedValueOnStack(@NotNull
                                    StackValue stackValue,
                                    @NotNull
                                    org.jetbrains.org.objectweb.asm.Type valueType,
                                    int paramIndex)
Specified by:
putCapturedValueOnStack in interface CallGenerator