sealed case class BinaryOp(op: Code, lhs: Tree, rhs: Tree)(implicit pos: Position) extends Tree with Product with Serializable
Binary operation.
All binary operations follow common evaluation steps:
- Let
lhsValuebe the result of evaluatinglhs. 2. LetrhsValuebe the result of evaluatingrhs. 3. Perform an operation that depends onop,lhsValueandrhsValue.
Unless lhsValue throws, rhsValue will therefore always be evaluated,
even if the operation op would throw based only on lhsValue.
The integer dividing operators (Int_/, Int_%, Long_/ and Long_%)
throw an ArithmeticException when their right-hand-side is 0. That
exception is not subject to undefined behavior.
String_charAt throws a StringIndexOutOfBoundsException.
The Class_x operations take a jl.Class! as lhs, i.e., a
non-nullable jl.Class. Class_isAssignableFrom also takes a
jl.Class! as rhs.
Class_isInstanceandClass_isAssignableFromare pure.Class_castthrows a CCE if its second argument is non-null and not an instance of the class represented by its first argument.Class_newArraythrows aNegativeArraySizeExceptionif its second argument is negative and anIllegalArgumentExceptionif its first argument isclassOf[Unit].
Otherwise, binary operations preserve pureness.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- BinaryOp
- Serializable
- Product
- Equals
- Tree
- TreeOrJSSpread
- IRNode
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val lhs: Tree
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val op: Code
- implicit val pos: Position
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val rhs: Tree
- def show: String
- Definition Classes
- IRNode
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val tpe: Type
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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]) @native()