org.jetbrains.kotlin.codegen.inline
Class InlineCodegen

java.lang.Object
  extended by CallGenerator
      extended by org.jetbrains.kotlin.codegen.inline.InlineCodegen

public class InlineCodegen
extends CallGenerator


Constructor Summary
InlineCodegen(ExpressionCodegen codegen, GenerationState state, SimpleFunctionDescriptor functionDescriptor, KtElement callElement, ReifiedTypeParameterMappings typeParameterMappings)
           
 
Method Summary
 void afterParameterPut(org.jetbrains.org.objectweb.asm.Type type, StackValue stackValue, ValueParameterDescriptor valueParameterDescriptor, int parameterIndex)
           
 void genCallInner(Callable callableMethod, ResolvedCall<?> resolvedCall, boolean callDefault, ExpressionCodegen codegen)
           
 void genCallWithoutAssertions(CallableMethod callableMethod, ExpressionCodegen codegen)
           
 void generateAndInsertFinallyBlocks(org.jetbrains.org.objectweb.asm.tree.MethodNode intoNode, java.util.List<MethodInliner.PointForExternalFinallyBlocks> insertPoints, int offsetForFinallyLocalVar)
           
protected  void generateStub(ResolvedCall<?> resolvedCall, ExpressionCodegen codegen)
           
 void genValueAndPut(ValueParameterDescriptor valueParameterDescriptor, KtExpression argumentExpression, org.jetbrains.org.objectweb.asm.Type parameterType, int parameterIndex)
           
static CodegenContext getContext(DeclarationDescriptor descriptor, GenerationState state, KtFile sourceFile)
           
protected static java.util.Set<java.lang.String> getDeclarationLabels(com.intellij.psi.PsiElement lambdaOrFun, DeclarationDescriptor descriptor)
           
protected static boolean isInlinableParameterExpression(KtExpression deparenthesized)
           
static boolean isInliningParameter(KtExpression expression, ValueParameterDescriptor valueParameterDescriptor)
           
 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(KtExpression expression, org.jetbrains.org.objectweb.asm.Type type, int parameterIndex)
           
 void removeFinallyMarkers(org.jetbrains.org.objectweb.asm.tree.MethodNode intoNode)
           
 void reorderArgumentsIfNeeded(java.util.List<? extends ArgumentAndDeclIndex> actualArgsWithDeclIndex, java.util.List<? extends org.jetbrains.org.objectweb.asm.Type> valueParameterTypes)
           
static boolean shouldPutValue(org.jetbrains.org.objectweb.asm.Type type, StackValue stackValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InlineCodegen

public InlineCodegen(@NotNull
                     ExpressionCodegen codegen,
                     @NotNull
                     GenerationState state,
                     @NotNull
                     SimpleFunctionDescriptor functionDescriptor,
                     @NotNull
                     KtElement callElement,
                     @Nullable
                     ReifiedTypeParameterMappings typeParameterMappings)
Method Detail

genCallWithoutAssertions

public void genCallWithoutAssertions(@NotNull
                                     CallableMethod callableMethod,
                                     @NotNull
                                     ExpressionCodegen codegen)

genCallInner

public void genCallInner(@NotNull
                         Callable callableMethod,
                         @Nullable
                         ResolvedCall<?> resolvedCall,
                         boolean callDefault,
                         @NotNull
                         ExpressionCodegen codegen)

generateStub

protected void generateStub(@Nullable
                            ResolvedCall<?> resolvedCall,
                            @NotNull
                            ExpressionCodegen codegen)

afterParameterPut

public void afterParameterPut(@NotNull
                              org.jetbrains.org.objectweb.asm.Type type,
                              @Nullable
                              StackValue stackValue,
                              @Nullable
                              ValueParameterDescriptor valueParameterDescriptor,
                              int parameterIndex)

shouldPutValue

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

putHiddenParams

public void putHiddenParams()

leaveTemps

public void leaveTemps()

isInliningParameter

public static boolean isInliningParameter(KtExpression expression,
                                          ValueParameterDescriptor valueParameterDescriptor)

isInlinableParameterExpression

protected static boolean isInlinableParameterExpression(KtExpression deparenthesized)

rememberClosure

public void rememberClosure(KtExpression expression,
                            org.jetbrains.org.objectweb.asm.Type type,
                            int parameterIndex)

getDeclarationLabels

@NotNull
protected static java.util.Set<java.lang.String> getDeclarationLabels(@Nullable
                                                                              com.intellij.psi.PsiElement lambdaOrFun,
                                                                              @NotNull
                                                                              DeclarationDescriptor descriptor)

getContext

public static CodegenContext getContext(@NotNull
                                        DeclarationDescriptor descriptor,
                                        @NotNull
                                        GenerationState state,
                                        @Nullable
                                        KtFile sourceFile)

genValueAndPut

public void genValueAndPut(@NotNull
                           ValueParameterDescriptor valueParameterDescriptor,
                           @NotNull
                           KtExpression argumentExpression,
                           @NotNull
                           org.jetbrains.org.objectweb.asm.Type parameterType,
                           int parameterIndex)

putValueIfNeeded

public void putValueIfNeeded(@Nullable
                             ValueParameterDescriptor valueParameterDescriptor,
                             @NotNull
                             org.jetbrains.org.objectweb.asm.Type parameterType,
                             @NotNull
                             StackValue value)

putCapturedValueOnStack

public void putCapturedValueOnStack(@NotNull
                                    StackValue stackValue,
                                    @NotNull
                                    org.jetbrains.org.objectweb.asm.Type valueType,
                                    int paramIndex)

generateAndInsertFinallyBlocks

public void generateAndInsertFinallyBlocks(@NotNull
                                           org.jetbrains.org.objectweb.asm.tree.MethodNode intoNode,
                                           @NotNull
                                           java.util.List<MethodInliner.PointForExternalFinallyBlocks> insertPoints,
                                           int offsetForFinallyLocalVar)

removeFinallyMarkers

public void removeFinallyMarkers(@NotNull
                                 org.jetbrains.org.objectweb.asm.tree.MethodNode intoNode)

reorderArgumentsIfNeeded

public void reorderArgumentsIfNeeded(@NotNull
                                     java.util.List<? extends ArgumentAndDeclIndex> actualArgsWithDeclIndex,
                                     @NotNull
                                     java.util.List<? extends org.jetbrains.org.objectweb.asm.Type> valueParameterTypes)