class AlmostFinalValue extends AnyRef
Represents a value that is wrapped with JVM machinery to allow the JVM to speculate on its content and effectively optimize it as if it was final.
This file has been drawn from JSR292 cookbook created by Rémi Forax. https://code.google.com/archive/p/jsr292-cookbook/. The explanation of the strategy can be found in https://community.oracle.com/blogs/forax/2011/12/17/jsr-292-goodness-almost-static-final-field.
Before copying this file to the repository, I tried to adapt the most important
parts of this implementation and special case it for Statistics
, but that
caused an important performance penalty (~10%). This performance penalty is
due to the fact that using static
s for the method handles and all the other
fields is extremely important for the JVM to correctly optimize the code, and
we cannot do that if we make Statistics
an object extending MutableCallSite
in Scala. We instead rely on the Java implementation that uses a boxed representation.
- Alphabetic
- By Inheritance
- AlmostFinalValue
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AlmostFinalValue()
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def createGetter(): MethodHandle
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
initialValue(): Boolean
- Attributes
- protected[scala.reflect.internal.util]
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
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()
- def setValue(value: Boolean): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )