package util
- Alphabetic
- By Inheritance
- util
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
AbstractFileClassLoader extends ClassLoader with ScalaClassLoader
A class loader that loads files from a scala.reflect.io.AbstractFile.
-
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.
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 usingstatic
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 makeStatistics
an object extendingMutableCallSite
in Scala. We instead rely on the Java implementation that uses a boxed representation. -
class
BatchSourceFile extends SourceFile
a file whose contents do not change over time
-
final
class
ChromeTrace extends Closeable
Allows writing a subset of of https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview# for use in Chrome's about://tracing or the tooling in https://www.google.com.au/search?q=catapult+tracing&oq=catapult+tracing+&aqs=chrome..69i57.3974j0j4&sourceid=chrome&ie=UTF-8
-
trait
Collections extends AnyRef
Profiler driven changes.
Profiler driven changes. TODO - inlining doesn't work from here because of the bug that methods in traits aren't inlined.
- sealed abstract class DefinedPosition extends Position
- case class FakePos(msg: String) extends UndefinedPosition with Product with Serializable
- class FreshNameCreator extends AnyRef
- trait HasClassPath extends AnyRef
- class HashSet[T >: Null <: AnyRef] extends Set[T] with Clearable
- sealed abstract class JavaClearable[T <: AnyRef] extends Clearable
- class OffsetPosition extends DefinedPosition
-
abstract
class
Origins extends AnyRef
A debugging class for logging from whence a method is being called.
A debugging class for logging from whence a method is being called. Say you wanted to discover who was calling phase_= in SymbolTable. You could do this:
private lazy val origins = Origins("arbitraryTag") // Commented out original enclosed for contrast // final def phase_=(p: Phase): Unit = { final def phase_=(p: Phase): Unit = origins {
And that's it. When the JVM exits it would issue a report something like this:
>> Origins tag 'arbitraryTag' logged 145585 calls from 51 distinguished sources. 71114 scala.tools.nsc.symtab.Symbols$Symbol.unsafeTypeParams(Symbols.scala:862) 16584 scala.tools.nsc.symtab.Symbols$Symbol.rawInfo(Symbols.scala:757) 15411 scala.tools.nsc.symtab.Symbols$Symbol.unsafeTypeParams(Symbols.scala:869) 11507 scala.tools.nsc.symtab.Symbols$Symbol.rawInfo(Symbols.scala:770) 10285 scala.tools.nsc.symtab.Symbols$Symbol.unsafeTypeParams(Symbols.scala:864) 6860 scala.tools.nsc.transform.SpecializeTypes.specializedTypeVars(SpecializeTypes.scala:304) ...
-
class
Position extends Attachments with api.Position with InternalPositionImpl with DeprecatedPosition
<invalid inheritdoc annotation>
- class RangePosition extends OffsetPosition
-
trait
ScalaClassLoader extends ClassLoader
A wrapper around java.lang.ClassLoader to lower the annoyance of java reflection.
- class ScriptSourceFile extends BatchSourceFile
-
abstract
class
Set[T <: AnyRef] extends AnyRef
A common class for lightweight sets.
-
abstract
class
SourceFile extends AnyRef
abstract base class of a source file used in the compiler
- abstract class Statistics extends AnyRef
-
final
class
StatisticsStatics extends AnyRef
Represents all the simulated statics for Statistics.
Represents all the simulated statics for Statistics.
Its implementation delegates to
scala.reflect.internal.util.AlmostFinalValue
, which helps performance (see docs to find out why). -
implicit
class
StringContextStripMarginOps extends StripMarginInterpolator
Adds the
sm
String interpolator to a scala.StringContext. -
trait
StringOps extends AnyRef
This object provides utility methods to extract elements from Strings.
This object provides utility methods to extract elements from Strings.
- Version
1.0
- trait StripMarginInterpolator extends AnyRef
-
class
TableDef[T] extends AnyRef
A class for representing tabular data in a way that preserves its inner beauty.
A class for representing tabular data in a way that preserves its inner beauty. One creates an instance of TableDef by defining the columns of the table, then uses that to create an instance of Table by passing in a sequence of rows.
- trait TraceSymbolActivity extends AnyRef
- class TransparentPosition extends RangePosition
-
final
class
TriState extends AnyVal
A simple true/false/unknown value, for those days when true and false don't quite partition the space.
- sealed abstract class UndefinedPosition extends Position
-
final
class
WeakHashSet[A <: AnyRef] extends Set[A] with (A) ⇒ Boolean with collection.mutable.Set[A]
A HashSet where the elements are stored weakly.
A HashSet where the elements are stored weakly. Elements in this set are eligible for GC if no other hard references are associated with them. Its primary use case is as a canonical reference identity holder (aka "hash-consing") via findEntryOrUpdate
This Set implementation cannot hold null. Any attempt to put a null in it will result in a NullPointerException
This set implementation is not in general thread safe without external concurrency control. However it behaves properly when GC concurrently collects elements in this set.
Value Members
- val ListOfNil: List[List[Nothing]]
- val SomeOfNil: Option[List[Nothing]]
- def andFalse(body: Unit): Boolean
- def shortClass(clazz: Class[_]): String
- def shortClassOfInstance(x: AnyRef): String
- object AbstractFileClassLoader
- object ChromeTrace
- object Collections extends Collections
- object FileUtils
- object HashSet
- object JavaClearable
- object NoFile extends VirtualFile
- object NoPosition extends UndefinedPosition with Product with Serializable
-
object
NoSourceFile extends SourceFile
An object representing a missing source file.
- object Origins
- object OwnerOnlyChmod
- object Position
-
object
ScalaClassLoader
Methods for obtaining various classloaders.
Methods for obtaining various classloaders. appLoader: the application classloader. (Also called the java system classloader.) extLoader: the extension classloader. bootLoader: the boot classloader. contextLoader: the context classloader.
- object ScriptSourceFile
- object StringOps extends StringOps
- object TableDef
-
object
ThreeValues
A simple three value type for booleans with an unknown value
- object TriState
-
object
WeakHashSet
Companion object for WeakHashSet