org.jetbrains.kotlin.codegen.inline
Class InlineCodegenUtil

java.lang.Object
  extended by org.jetbrains.kotlin.codegen.inline.InlineCodegenUtil

public class InlineCodegenUtil
extends java.lang.Object


Field Summary
static int API
           
static java.lang.String FIRST_FUN_LABEL
           
static boolean GENERATE_SMAP
           
static java.lang.String INLINE_CALL_TRANSFORMATION_SUFFIX
           
static java.lang.String INLINE_FUN_THIS_0_SUFFIX
           
static java.lang.String INLINE_FUN_VAR_SUFFIX
           
static java.lang.String INLINE_TRANSFORMATION_SUFFIX
           
static java.lang.String NUMBERED_FUNCTION_PREFIX
           
static java.lang.String SPECIAL_TRANSFORMATION_NAME
           
static java.lang.String THIS
           
static java.lang.String THIS$0
           
 
Constructor Summary
InlineCodegenUtil()
           
 
Method Summary
static void addInlineMarker(org.jetbrains.org.objectweb.asm.commons.InstructionAdapter v, boolean isStartNotEnd)
           
static void assertVersionNotGreaterThanGeneratedOne(int version, java.lang.String internalName, GenerationState state)
           
static int calcMarkerShift(Parameters parameters, org.jetbrains.org.objectweb.asm.tree.MethodNode node)
           
static org.jetbrains.org.objectweb.asm.tree.MethodNode createEmptyMethodNode()
           
static org.jetbrains.org.objectweb.asm.tree.MethodNode createSpecialEnumMethodBody(ExpressionCodegen codegen, java.lang.String name, KotlinType type, KotlinTypeMapper typeMapper)
           
static com.intellij.openapi.vfs.VirtualFile findVirtualFile(GenerationState state, ClassId classId)
           
static org.jetbrains.org.objectweb.asm.tree.LabelNode firstLabelInChain(org.jetbrains.org.objectweb.asm.tree.LabelNode node)
           
static void generateFinallyMarker(org.jetbrains.org.objectweb.asm.commons.InstructionAdapter v, int depth, boolean start)
           
static void generateGlobalReturnFlag(org.jetbrains.org.objectweb.asm.commons.InstructionAdapter iv, java.lang.String labelName)
           
static int getConstant(org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode ins)
           
static java.lang.String getInlineName(CodegenContext codegenContext, KotlinTypeMapper typeMapper, JvmFileClassesProvider fileClassesManager)
           
static java.lang.String getInsnText(org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode node)
           
static int getLoadStoreArgSize(int opcode)
           
static java.lang.String getMarkedReturnLabelOrNull(org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode returnInsn)
           
static SMAPAndMethodNode getMethodNode(byte[] classData, java.lang.String methodName, java.lang.String methodDescriptor, ClassId classId, GenerationState state)
           
static java.lang.String getNodeText(org.jetbrains.org.objectweb.asm.tree.MethodNode node)
           
static org.jetbrains.org.objectweb.asm.Type getReturnType(int opcode)
           
static java.lang.String getSpecialEnumFunDescriptor(org.jetbrains.org.objectweb.asm.Type type, boolean isValueOf)
           
static void initDefaultSourceMappingIfNeeded(CodegenContext context, MemberCodegen codegen, GenerationState state)
           
static void insertNodeBefore(org.jetbrains.org.objectweb.asm.tree.MethodNode from, org.jetbrains.org.objectweb.asm.tree.MethodNode to, org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode beforeNode)
           
static boolean isAfterInlineMarker(org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode insn)
           
static boolean isAnonymousClass(java.lang.String internalName)
           
static boolean isAnonymousConstructorCall(java.lang.String internalName, java.lang.String methodName)
           
static boolean isAnonymousSingletonLoad(java.lang.String internalName, java.lang.String fieldName)
           
static boolean isBeforeInlineMarker(org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode insn)
           
static boolean isCapturedFieldName(java.lang.String fieldName)
           
static boolean isFakeLocalVariableForInline(java.lang.String name)
           
static boolean isFinallyEnd(org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode node)
           
static boolean isFinallyMarker(org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode node)
           
static boolean isFinallyMarkerRequired(MethodContext context)
           
static boolean isFinallyStart(org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode node)
           
static boolean isInlineMarker(org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode insn)
           
static boolean isInvokeOnLambda(java.lang.String owner, java.lang.String name)
           
static boolean isMarkedReturn(org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode returnIns)
           
static boolean isReturnOpcode(int opcode)
           
static boolean isSpecialEnumMethod(FunctionDescriptor functionDescriptor)
           
static boolean isStoreInstruction(int opcode)
           
static boolean isThis0(java.lang.String name)
           
static boolean isWhenMappingAccess(java.lang.String internalName, java.lang.String fieldName)
           
static org.jetbrains.org.objectweb.asm.MethodVisitor wrapWithMaxLocalCalc(org.jetbrains.org.objectweb.asm.tree.MethodNode methodNode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERATE_SMAP

public static final boolean GENERATE_SMAP
See Also:
Constant Field Values

API

public static final int API
See Also:
Constant Field Values

THIS$0

public static final java.lang.String THIS$0
See Also:
Constant Field Values

THIS

public static final java.lang.String THIS
See Also:
Constant Field Values

FIRST_FUN_LABEL

public static final java.lang.String FIRST_FUN_LABEL
See Also:
Constant Field Values

NUMBERED_FUNCTION_PREFIX

public static final java.lang.String NUMBERED_FUNCTION_PREFIX
See Also:
Constant Field Values

SPECIAL_TRANSFORMATION_NAME

public static final java.lang.String SPECIAL_TRANSFORMATION_NAME
See Also:
Constant Field Values

INLINE_TRANSFORMATION_SUFFIX

public static final java.lang.String INLINE_TRANSFORMATION_SUFFIX
See Also:
Constant Field Values

INLINE_CALL_TRANSFORMATION_SUFFIX

public static final java.lang.String INLINE_CALL_TRANSFORMATION_SUFFIX
See Also:
Constant Field Values

INLINE_FUN_THIS_0_SUFFIX

public static final java.lang.String INLINE_FUN_THIS_0_SUFFIX
See Also:
Constant Field Values

INLINE_FUN_VAR_SUFFIX

public static final java.lang.String INLINE_FUN_VAR_SUFFIX
See Also:
Constant Field Values
Constructor Detail

InlineCodegenUtil

public InlineCodegenUtil()
Method Detail

getMethodNode

@Nullable
public static SMAPAndMethodNode getMethodNode(byte[] classData,
                                                       java.lang.String methodName,
                                                       java.lang.String methodDescriptor,
                                                       ClassId classId,
                                                       @NotNull
                                                       GenerationState state)

assertVersionNotGreaterThanGeneratedOne

public static void assertVersionNotGreaterThanGeneratedOne(int version,
                                                           java.lang.String internalName,
                                                           @NotNull
                                                           GenerationState state)

initDefaultSourceMappingIfNeeded

public static void initDefaultSourceMappingIfNeeded(@NotNull
                                                    CodegenContext context,
                                                    @NotNull
                                                    MemberCodegen codegen,
                                                    @NotNull
                                                    GenerationState state)

findVirtualFile

@Nullable
public static com.intellij.openapi.vfs.VirtualFile findVirtualFile(@NotNull
                                                                            GenerationState state,
                                                                            @NotNull
                                                                            ClassId classId)

getInlineName

@NotNull
public static java.lang.String getInlineName(@NotNull
                                                     CodegenContext codegenContext,
                                                     @NotNull
                                                     KotlinTypeMapper typeMapper,
                                                     @NotNull
                                                     JvmFileClassesProvider fileClassesManager)

isInvokeOnLambda

public static boolean isInvokeOnLambda(@NotNull
                                       java.lang.String owner,
                                       @NotNull
                                       java.lang.String name)

isAnonymousConstructorCall

public static boolean isAnonymousConstructorCall(@NotNull
                                                 java.lang.String internalName,
                                                 @NotNull
                                                 java.lang.String methodName)

isWhenMappingAccess

public static boolean isWhenMappingAccess(@NotNull
                                          java.lang.String internalName,
                                          @NotNull
                                          java.lang.String fieldName)

isAnonymousSingletonLoad

public static boolean isAnonymousSingletonLoad(@NotNull
                                               java.lang.String internalName,
                                               @NotNull
                                               java.lang.String fieldName)

isAnonymousClass

public static boolean isAnonymousClass(@NotNull
                                       java.lang.String internalName)

wrapWithMaxLocalCalc

@NotNull
public static org.jetbrains.org.objectweb.asm.MethodVisitor wrapWithMaxLocalCalc(@NotNull
                                                                                         org.jetbrains.org.objectweb.asm.tree.MethodNode methodNode)

isCapturedFieldName

public static boolean isCapturedFieldName(@NotNull
                                          java.lang.String fieldName)

isReturnOpcode

public static boolean isReturnOpcode(int opcode)

isMarkedReturn

public static boolean isMarkedReturn(@NotNull
                                     org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode returnIns)

getMarkedReturnLabelOrNull

@Nullable
public static java.lang.String getMarkedReturnLabelOrNull(@NotNull
                                                                   org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode returnInsn)

generateGlobalReturnFlag

public static void generateGlobalReturnFlag(@NotNull
                                            org.jetbrains.org.objectweb.asm.commons.InstructionAdapter iv,
                                            @NotNull
                                            java.lang.String labelName)

getReturnType

@NotNull
public static org.jetbrains.org.objectweb.asm.Type getReturnType(int opcode)

insertNodeBefore

public static void insertNodeBefore(@NotNull
                                    org.jetbrains.org.objectweb.asm.tree.MethodNode from,
                                    @NotNull
                                    org.jetbrains.org.objectweb.asm.tree.MethodNode to,
                                    @NotNull
                                    org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode beforeNode)

createEmptyMethodNode

@NotNull
public static org.jetbrains.org.objectweb.asm.tree.MethodNode createEmptyMethodNode()

firstLabelInChain

@NotNull
public static org.jetbrains.org.objectweb.asm.tree.LabelNode firstLabelInChain(@NotNull
                                                                                       org.jetbrains.org.objectweb.asm.tree.LabelNode node)

getNodeText

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

getInsnText

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

generateFinallyMarker

public static void generateFinallyMarker(@NotNull
                                         org.jetbrains.org.objectweb.asm.commons.InstructionAdapter v,
                                         int depth,
                                         boolean start)

isFinallyEnd

public static boolean isFinallyEnd(@NotNull
                                   org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode node)

isFinallyStart

public static boolean isFinallyStart(@NotNull
                                     org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode node)

isFinallyMarker

public static boolean isFinallyMarker(@Nullable
                                      org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode node)

isFinallyMarkerRequired

public static boolean isFinallyMarkerRequired(@NotNull
                                              MethodContext context)

getConstant

public static int getConstant(@NotNull
                              org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode ins)

addInlineMarker

public static void addInlineMarker(@NotNull
                                   org.jetbrains.org.objectweb.asm.commons.InstructionAdapter v,
                                   boolean isStartNotEnd)

isInlineMarker

public static boolean isInlineMarker(@NotNull
                                     org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode insn)

isBeforeInlineMarker

public static boolean isBeforeInlineMarker(@NotNull
                                           org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode insn)

isAfterInlineMarker

public static boolean isAfterInlineMarker(@NotNull
                                          org.jetbrains.org.objectweb.asm.tree.AbstractInsnNode insn)

getLoadStoreArgSize

public static int getLoadStoreArgSize(int opcode)

isStoreInstruction

public static boolean isStoreInstruction(int opcode)

calcMarkerShift

public static int calcMarkerShift(@NotNull
                                  Parameters parameters,
                                  @NotNull
                                  org.jetbrains.org.objectweb.asm.tree.MethodNode node)

isFakeLocalVariableForInline

public static boolean isFakeLocalVariableForInline(@NotNull
                                                   java.lang.String name)

isThis0

public static boolean isThis0(@NotNull
                              java.lang.String name)

isSpecialEnumMethod

public static boolean isSpecialEnumMethod(@NotNull
                                          FunctionDescriptor functionDescriptor)

createSpecialEnumMethodBody

public static org.jetbrains.org.objectweb.asm.tree.MethodNode createSpecialEnumMethodBody(@NotNull
                                                                                          ExpressionCodegen codegen,
                                                                                          @NotNull
                                                                                          java.lang.String name,
                                                                                          @NotNull
                                                                                          KotlinType type,
                                                                                          @NotNull
                                                                                          KotlinTypeMapper typeMapper)

getSpecialEnumFunDescriptor

@NotNull
public static java.lang.String getSpecialEnumFunDescriptor(@NotNull
                                                                   org.jetbrains.org.objectweb.asm.Type type,
                                                                   boolean isValueOf)