case class SimpleVar(id: Int, cTpe: ComputationalType) extends IdBasedVar with Product with Serializable
The id determines the name of the local variable and is equivalent to "the position of the value on the operand stack" or "-1-(the accessed register)". If the id is Int.MinValue then the variable is an intermediate variable that was artificially generated.
- Source
- IdBasedVar.scala
- Alphabetic
- By Inheritance
- SimpleVar
- Serializable
- Product
- Equals
- IdBasedVar
- Var
- ValueExpr
- Expr
- ASTNode
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SimpleVar(id: Int, cTpe: ComputationalType)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def asArrayLength: ArrayLength[IdBasedVar]
- Definition Classes
- Expr
- def asArrayLoad: ArrayLoad[IdBasedVar]
- Definition Classes
- Expr
- def asBinaryExpr: BinaryExpr[IdBasedVar]
- Definition Classes
- Expr
- def asClassConst: ClassConst
- Definition Classes
- Expr
- def asCompare: Compare[IdBasedVar]
- Definition Classes
- Expr
- def asDoubleConst: DoubleConst
- Definition Classes
- Expr
- def asDynamicConst: DynamicConst
- Definition Classes
- Expr
- def asFieldRead: FieldRead[IdBasedVar]
- Definition Classes
- Expr
- def asFloatConst: FloatConst
- Definition Classes
- Expr
- def asFunctionCall: FunctionCall[IdBasedVar]
- Definition Classes
- Expr
- def asGetField: GetField[IdBasedVar]
- Definition Classes
- Expr
- def asGetStatic: GetStatic
- Definition Classes
- Expr
- def asInstanceFunctionCall: InstanceFunctionCall[IdBasedVar]
- Definition Classes
- Expr
- def asInstanceOf: InstanceOf[IdBasedVar]
- Definition Classes
- Expr
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asIntConst: IntConst
- Definition Classes
- Expr
- def asInvokedynamicFunctionCall: InvokedynamicFunctionCall[IdBasedVar]
- Definition Classes
- Expr
- def asLongConst: LongConst
- Definition Classes
- Expr
- def asMethodHandleConst: MethodHandleConst
- Definition Classes
- Expr
- def asMethodTypeConst: MethodTypeConst
- Definition Classes
- Expr
- def asNew: New
- Definition Classes
- Expr
- def asNewArray: NewArray[IdBasedVar]
- Definition Classes
- Expr
- def asNonVirtualFunctionCall: NonVirtualFunctionCall[IdBasedVar]
- Definition Classes
- Expr
- def asNullExpr: NullExpr
- Definition Classes
- Expr
- def asParam: Param
- Definition Classes
- Expr
- def asPrefixExpr: PrefixExpr[IdBasedVar]
- Definition Classes
- Expr
- def asPrimitiveTypeCastExpr: PrimitiveTypecastExpr[IdBasedVar]
- Definition Classes
- Expr
- def asStaticFunctionCall: StaticFunctionCall[IdBasedVar]
- Definition Classes
- Expr
- def asStringConst: StringConst
- Definition Classes
- Expr
- final def asVar: IdBasedVar
- def asVirtualFunctionCall: VirtualFunctionCall[IdBasedVar]
- Definition Classes
- Expr
- final def astID: Int
Each type of node is assigned a different
id
to make it easily possible to do a switch over all nodes. - val cTpe: ComputationalType
The computational type of the underlying value.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def forallSubExpressions[W >: IdBasedVar <: Var[W]](p: (Expr[W]) => Boolean): Boolean
Returns
true
if the given predicate evaluates totrue
for all direct subexpressions of this expression; if the evaluation should perform a recursive decent then it needs to be done by the predicate! - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def hasSameLocation(that: IdBasedVar): Boolean
- returns
true
if this variable and the given variable use the same location. Compared toequals
this test does not consider the computational type.
- Definition Classes
- IdBasedVar
- val id: Int
- Definition Classes
- SimpleVar → IdBasedVar
- def isArrayLoad: Boolean
- Definition Classes
- Expr
- def isClassConst: Boolean
- Definition Classes
- Expr
- def isCompare: Boolean
- Definition Classes
- Expr
- def isConst: Boolean
- Definition Classes
- Expr
- def isDoubleConst: Boolean
- Definition Classes
- Expr
- def isDynamicConst: Boolean
- Definition Classes
- Expr
- def isFieldRead: Boolean
- Definition Classes
- Expr
- def isFloatConst: Boolean
- Definition Classes
- Expr
- def isFunctionCall: Boolean
- Definition Classes
- Expr
- def isGetField: Boolean
- Definition Classes
- Expr
- def isGetStatic: Boolean
- Definition Classes
- Expr
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isIntConst: Boolean
- Definition Classes
- Expr
- def isLongConst: Boolean
- Definition Classes
- Expr
- def isMethodHandleConst: Boolean
- Definition Classes
- Expr
- def isMethodTypeConst: Boolean
- Definition Classes
- Expr
- def isNew: Boolean
- Definition Classes
- Expr
- def isNewArray: Boolean
- Definition Classes
- Expr
- def isNullExpr: Boolean
- Definition Classes
- Expr
- final def isSideEffectFree: Boolean
true
if the statement/expression is GUARANTEED to have no externally observable effect if it is not executed.true
if the statement/expression is GUARANTEED to have no externally observable effect if it is not executed. Sideeffect free instructions can be removed if the result of the evaluation of the expression/statement is not used. For those instructions, which may result in an exception, it has to be guaranteed that the exception is NEVER thrown. For example, a div instruction is sideeffect free if it is (statically) known that the divisor is always not equal to zero; otherwise, even if the result value is not used, the expression is not (potentially) side effect free. An array load is only side effect free if the array reference is non-null and if the index is valid.- returns
true
if the expression is GUARENTEED to have no side effect other than wasting some CPU cycles if it is not executed.
- Definition Classes
- IdBasedVar → ASTNode
- Note
Deeply nested expressions are not supported; i.e. an expression's sub-expressions have to be Var or Const expressions. Generally, a statements expressions have to to simple expressions too - except of the Assignment statement; in the latter case the right-expression can have references to simple expressions. Hence, in case of Assignment statements the side-effect freenes is determined by the referenced expression; in all other cases the side-effect freeness is determined directly by the statement/expression.
- def isStaticFunctionCall: Boolean
- Definition Classes
- Expr
- def isStringConst: Boolean
- Definition Classes
- Expr
- final def isValueExpression: Boolean
true
if this expression is a Var. - final def isVar: Boolean
- def isVirtualFunctionCall: Boolean
- Definition Classes
- Expr
- def name: String
A human readable name of the local variable.
A human readable name of the local variable.
- Definition Classes
- IdBasedVar → Var
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def subExpr(index: Int): Expr[IdBasedVar]
Returns the sub expression with the given index; if the index is wrong the result is undefined!
- final def subExprCount: Int
The number of sub expression directly referenced by this expression.
The number of sub expression directly referenced by this expression. A unary expression has one sub expression (the operand), a binary expression has two and a method has as many as explicit and implicit (
this
) parameters exist. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toCanonicalForm(implicit ev: <:<[IdBasedVar, DUVar[ValueInformation]]): Nothing
See org.opalj.value.ValueInformation.toCanonicalForm for detail.
See org.opalj.value.ValueInformation.toCanonicalForm for detail.
- Definition Classes
- IdBasedVar → Expr → ASTNode
- def updated(cTpe: ComputationalType): SimpleVar
Creates a new variable that has the same identifier etc.
Creates a new variable that has the same identifier etc. but an updated computational type.
This operation is not supported for local variables!
- Definition Classes
- IdBasedVar
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated