public abstract class StackValue extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
StackValue.CallReceiver |
static class |
StackValue.Composed |
static class |
StackValue.Constant |
static class |
StackValue.Local |
static class |
StackValue.OnStack |
static class |
StackValue.Shared |
static class |
StackValue.StackValueWithSimpleReceiver |
Modifier and Type | Field and Description |
---|---|
org.jetbrains.asm4.Type |
type |
Modifier | Constructor and Description |
---|---|
protected |
StackValue(org.jetbrains.asm4.Type type) |
Modifier and Type | Method and Description |
---|---|
static StackValue |
arrayElement(org.jetbrains.asm4.Type type,
boolean unbox) |
static StackValue |
cmp(com.intellij.psi.tree.IElementType opToken,
org.jetbrains.asm4.Type type) |
static void |
coerce(org.jetbrains.asm4.Type fromType,
org.jetbrains.asm4.Type toType,
org.jetbrains.asm4.commons.InstructionAdapter v) |
protected void |
coerceFrom(org.jetbrains.asm4.Type topOfStackType,
org.jetbrains.asm4.commons.InstructionAdapter v) |
protected void |
coerceTo(org.jetbrains.asm4.Type toType,
org.jetbrains.asm4.commons.InstructionAdapter v) |
static StackValue |
collectionElement(org.jetbrains.asm4.Type type,
ResolvedCall<FunctionDescriptor> getter,
ResolvedCall<FunctionDescriptor> setter,
ExpressionCodegen codegen,
GenerationState state) |
static StackValue |
composed(StackValue prefix,
StackValue suffix) |
void |
condJump(org.jetbrains.asm4.Label label,
boolean jumpIfFalse,
org.jetbrains.asm4.commons.InstructionAdapter v) |
static StackValue |
constant(java.lang.Object value,
org.jetbrains.asm4.Type type) |
void |
dupReceiver(org.jetbrains.asm4.commons.InstructionAdapter v) |
static StackValue |
expression(org.jetbrains.asm4.Type type,
JetExpression expression,
ExpressionCodegen generator) |
static org.jetbrains.jet.codegen.StackValue.Field |
field(org.jetbrains.asm4.Type type,
JvmClassName owner,
java.lang.String name,
boolean isStatic) |
static StackValue |
fieldForSharedVar(org.jetbrains.asm4.Type type,
JvmClassName name,
java.lang.String fieldName) |
static StackValue.Local |
local(int index,
org.jetbrains.asm4.Type type) |
protected void |
moveToTopOfStack(org.jetbrains.asm4.Type type,
org.jetbrains.asm4.commons.InstructionAdapter v,
int depth)
This method is called to put the value on the top of the JVM stack if
depth other values have been put on the
JVM stack after this value was generated. |
static StackValue |
none() |
static StackValue |
not(StackValue stackValue) |
static StackValue |
onStack(org.jetbrains.asm4.Type type) |
static StackValue |
postIncrement(int index,
int increment) |
static StackValue |
preIncrement(int index,
int increment) |
static org.jetbrains.jet.codegen.StackValue.Property |
property(PropertyDescriptor descriptor,
JvmClassName methodOwner,
org.jetbrains.asm4.Type type,
boolean isStatic,
java.lang.String name,
CallableMethod getter,
CallableMethod setter,
GenerationState state) |
abstract void |
put(org.jetbrains.asm4.Type type,
org.jetbrains.asm4.commons.InstructionAdapter v)
Put this value to the top of the stack.
|
protected void |
putAsBoolean(org.jetbrains.asm4.commons.InstructionAdapter v) |
static void |
putUnitInstance(org.jetbrains.asm4.commons.InstructionAdapter v) |
static StackValue |
receiver(ResolvedCall<? extends CallableDescriptor> resolvedCall,
StackValue receiver,
ExpressionCodegen codegen,
CallableMethod callableMethod) |
int |
receiverSize() |
static StackValue |
receiverWithoutReceiverArgument(StackValue receiverWithParameter) |
static org.jetbrains.asm4.Type |
refType(org.jetbrains.asm4.Type type) |
static StackValue |
shared(int index,
org.jetbrains.asm4.Type type) |
static org.jetbrains.asm4.Type |
sharedTypeForType(org.jetbrains.asm4.Type type) |
static org.jetbrains.jet.codegen.StackValue.Field |
singleton(ClassDescriptor classDescriptor,
JetTypeMapper typeMapper) |
void |
store(org.jetbrains.asm4.Type topOfStackType,
org.jetbrains.asm4.commons.InstructionAdapter v)
Set this value from the top of the stack.
|
static StackValue |
thisOrOuter(ExpressionCodegen codegen,
ClassDescriptor descriptor,
boolean isSuper) |
@NotNull public final org.jetbrains.asm4.Type type
protected StackValue(@NotNull org.jetbrains.asm4.Type type)
public abstract void put(org.jetbrains.asm4.Type type, org.jetbrains.asm4.commons.InstructionAdapter v)
protected void moveToTopOfStack(org.jetbrains.asm4.Type type, org.jetbrains.asm4.commons.InstructionAdapter v, int depth)
depth
other values have been put on the
JVM stack after this value was generated.type
- the type as which the value should be putv
- the visitor used to genClassOrObject the instructionsdepth
- the number of new values put onto the stackpublic void store(org.jetbrains.asm4.Type topOfStackType, org.jetbrains.asm4.commons.InstructionAdapter v)
public void dupReceiver(org.jetbrains.asm4.commons.InstructionAdapter v)
public int receiverSize()
public void condJump(org.jetbrains.asm4.Label label, boolean jumpIfFalse, org.jetbrains.asm4.commons.InstructionAdapter v)
public static StackValue.Local local(int index, org.jetbrains.asm4.Type type)
public static StackValue shared(int index, org.jetbrains.asm4.Type type)
public static StackValue onStack(org.jetbrains.asm4.Type type)
public static StackValue constant(@Nullable java.lang.Object value, org.jetbrains.asm4.Type type)
public static StackValue cmp(com.intellij.psi.tree.IElementType opToken, org.jetbrains.asm4.Type type)
public static StackValue not(StackValue stackValue)
@NotNull public static StackValue arrayElement(org.jetbrains.asm4.Type type, boolean unbox)
@NotNull public static StackValue collectionElement(org.jetbrains.asm4.Type type, ResolvedCall<FunctionDescriptor> getter, ResolvedCall<FunctionDescriptor> setter, ExpressionCodegen codegen, GenerationState state)
@NotNull public static org.jetbrains.jet.codegen.StackValue.Field field(@NotNull org.jetbrains.asm4.Type type, @NotNull JvmClassName owner, @NotNull java.lang.String name, boolean isStatic)
@NotNull public static org.jetbrains.jet.codegen.StackValue.Property property(@NotNull PropertyDescriptor descriptor, @NotNull JvmClassName methodOwner, @NotNull org.jetbrains.asm4.Type type, boolean isStatic, @NotNull java.lang.String name, @Nullable CallableMethod getter, @Nullable CallableMethod setter, GenerationState state)
@NotNull public static StackValue expression(org.jetbrains.asm4.Type type, JetExpression expression, ExpressionCodegen generator)
protected void coerceTo(org.jetbrains.asm4.Type toType, org.jetbrains.asm4.commons.InstructionAdapter v)
protected void coerceFrom(org.jetbrains.asm4.Type topOfStackType, org.jetbrains.asm4.commons.InstructionAdapter v)
public static void coerce(org.jetbrains.asm4.Type fromType, org.jetbrains.asm4.Type toType, org.jetbrains.asm4.commons.InstructionAdapter v)
public static void putUnitInstance(org.jetbrains.asm4.commons.InstructionAdapter v)
protected void putAsBoolean(org.jetbrains.asm4.commons.InstructionAdapter v)
public static StackValue none()
public static StackValue fieldForSharedVar(org.jetbrains.asm4.Type type, JvmClassName name, java.lang.String fieldName)
public static StackValue composed(StackValue prefix, StackValue suffix)
public static StackValue thisOrOuter(ExpressionCodegen codegen, ClassDescriptor descriptor, boolean isSuper)
public static StackValue postIncrement(int index, int increment)
public static StackValue preIncrement(int index, int increment)
public static StackValue receiver(ResolvedCall<? extends CallableDescriptor> resolvedCall, StackValue receiver, ExpressionCodegen codegen, @Nullable CallableMethod callableMethod)
public static StackValue receiverWithoutReceiverArgument(StackValue receiverWithParameter)
public static org.jetbrains.jet.codegen.StackValue.Field singleton(ClassDescriptor classDescriptor, JetTypeMapper typeMapper)
public static org.jetbrains.asm4.Type sharedTypeForType(org.jetbrains.asm4.Type type)
public static org.jetbrains.asm4.Type refType(org.jetbrains.asm4.Type type)