If an implicit value of type u.
Alternatives of patterns, eliminated by explicitouter, except for occurrences in encoded Switch stmt (=remaining Match(CaseDef(.
The API that all alternatives support
An extractor class to create and pattern match with syntax Alternative(trees)
.
A tree that has an annotation attached to it.
The API that all annotateds support
An extractor class to create and pattern match with syntax Annotated(annot, arg)
.
A type carrying some annotations.
The API that all annotated types support
An extractor class to create and pattern match with syntax
AnnotatedType(annotations, underlying, selfsym)
.
An additional checker for annotations on types.
Typed information about an annotation.
A class remembering a type instantiation for some a set of overloaded polymorphic symbols.
Applied type <tpt> [ <args> ], eliminated by RefCheck
The API that all applied type trees support
An extractor class to create and pattern match with syntax AppliedTypeTree(tpt, args)
.
Precondition: zipped params/args nonEmpty.
Value application
The API that all applies support
Dynamic value application.
The API that all apply dynamics support
An extractor class to create and pattern match with syntax ApplyDynamic(qual, args)
.
An extractor class to create and pattern match with syntax Apply(fun, args)
.
Represents an array of classfile annotation arguments
Array of expressions, needs to be translated in backend.
The API that all array values support
An extractor class to create and pattern match with syntax ArrayValue(elemtpt, elems)
.
A map to compute the asSeenFrom method
Assignment
The API that all assigns support
An extractor class to create and pattern match with syntax Assign(lhs, rhs)
.
Either an assignment or a named argument.
The API that all assigns support
An extractor class to create and pattern match with syntax AssignOrNamedArg(lhs, rhs)
.
Note: constructor is protected to force everyone to use the factory method newBaseTypeSeq instead.
Bind of a variable to a rhs pattern, eliminated by explicitouter Eliminated by patmat/explicitouter.
The API that all binds support
An extractor class to create and pattern match with syntax Bind(name, body)
.
Block of expressions (semicolon separated expressions)
The API that all blocks support
An extractor class to create and pattern match with syntax Block(stats, expr)
.
BoundedWildcardTypes, used only during type inference, are created in two places that I can find:
The API that all this types support
Case clause in a pattern match, eliminated during explicitouter (except for occurrences in switch statements).
The API that all case defs support
An extractor class to create and pattern match with syntax CaseDef(pat, guard, body)
.
A class definition.
The API that all class defs support
An extractor class to create and pattern match with syntax ClassDef(mods, name, tparams, impl)
.
A class representing a class info
The API that all class info types support
An extractor class to create and pattern match with syntax ClassInfo(parents, decls, clazz)
Here, parents
is the list of parent types of the class, decls
is the scope
containing all declarations in the class, and clazz
is the symbol of the class
itself.
A mirror that reflects the instance parts of a runtime class
A class for class symbols
The API of class symbols
The base API that all class symbols support
Arguments to classfile annotations (which are written to bytecode as java annotations) are either:
A map to implement the collect
method.
A common base class for intersection types and class types
Intersection type <parent1> with .
The API that all compound type trees support
An extractor class to create and pattern match with syntax CompoundTypeTree(templ)
.
A class representing a constant type.
The API that all constant types support
An extractor class to create and pattern match with syntax ConstantType(constant)
Here, constant
is the constant value represented by the type.
A map to implement the contains
method.
A map to implement the contains
method.
An exception for cyclic references of symbol definitions
A binder defining data associated with De Bruijn indices.
A De Bruijn index referring to a previous type argument.
A method or macro definition.
The API that all def defs support
An extractor class to create and pattern match with syntax DefDef(mods, name, tparams, vparamss, tpt, rhs)
.
A tree which defines a symbol-carrying entity.
The API that all def trees support
The error scope.
Used by existentialAbstraction.
.
The API that all existential types support
An extractor class to create and pattern match with syntax
ExistentialType(quantified, underlying)
.
Document me!
The API that all existential type trees support
An extractor class to create and pattern match with syntax ExistentialTypeTree(tpt, whereClauses)
.
An expression tree tagged with its type
A mirror that reflects a field
A map to implement the filter
method.
A map to implement the filter
method.
The abstract type of free terms introduced by reification
The API of free term symbols
The base API that all free term symbols support
The abstract type of free types introduced by reification
The API of free term symbols
The base API that all free type symbols support
Anonymous function, eliminated by lambdalift
The API that all functions support
An extractor class to create and pattern match with syntax Function(vparams, body)
.
Common base class for Apply and TypeApply.
The API that all applies support
Precondition: params.
Identifier <name>
The API that all idents support
The extended API of idents that's supported in macro context universes
An extractor class to create and pattern match with syntax Ident(qual, name)
.
Conditional expression
The API that all ifs support
An extractor class to create and pattern match with syntax If(cond, thenp, elsep)
.
A common base class for class and object definitions.
The API that all impl defs support
Import clause
The API that all imports support
An extractor class to create and pattern match with syntax Import(expr, selectors)
.
Import selector
The API that all import selectors support
An extractor class to create and pattern match with syntax ImportSelector(name:, namePos, rename, renamePos)
.
A mirror that reflects a runtime value
The API of a mirror for a reflective universe
This should be the first trait in the linearization.
A labelled expression.
The API that all label defs support
An extractor class to create and pattern match with syntax LabelDef(name, params, rhs)
.
Symbol annotations parsed in Namer
(typeCompleter of
definitions) have to be lazy (#1782)
The type completer for packages.
A class representing an as-yet unevaluated type.
Literal
Represents a compile-time Constant (Boolean
, Byte
, Short
,
Char
, Int
, Long
, Float
, Double
, String
, java.lang.Class
or
an instance of a Java enumeration value).
The API that all literals support
An extractor class to create and pattern match with syntax Literal(value)
.
A throwable signalling a malformed type
- Pattern matching expression (before explicitouter)
The API that all matches support
An extractor class to create and pattern match with syntax Match(selector, cases)
.
Common base class for all member definitions: types, classes, objects, packages, vals and vars, defs.
The API that all member defs support
A mirror that reflects a method handle
A class for method symbols
The API of method symbols
The API of method symbols
The base API that all method symbols support
A class representing a method type with parameters.
The API that all method types support
An extractor class to create and pattern match with syntax MethodType(params, respte)
Here, params
is a potentially empty list of parameter symbols of the method,
and restpe
is the result type of the method.
.
..
.
A class for module class symbols Note: Not all module classes are of this type; when unpickled, we get plain class symbols!
An object definition, e.
The API that all module defs support
An extractor class to create and pattern match with syntax ModuleDef(mods, name, impl)
.
A mirror that reflects a Scala object definition or the static parts of a runtime class
A class for module symbols
The API of module symbols
The API of module symbols
The base API that all module symbols support
The name class.
The extended API of names that's supported on reflect mirror via an implicit conversion in reflect.
The base API that all names support
A tree with a name - effectively, a DefTree or RefTree.
The API that all name trees support
A class representing types with a name.
Represents a nested classfile annotation
Object instantiation One should always use factory method below to build a user level new.
The API that all news support
An extractor class to create and pattern match with syntax New(tpt)
.
An object representing a missing symbol
.
The API that all nullary method types support
An extractor class to create and pattern match with syntax NullaryMethodType(resultType)
.
A class containing the alternatives and type prefix of an overloaded symbol.
A packaging, such as package pid { stats }
The API that all package defs support
An extractor class to create and pattern match with syntax PackageDef(pid, stats)
.
A period is an ordinal number for a phase in a run.
A period is an ordinal number for a phase in a run. Phases in later runs have higher periods than phases in earlier runs. Later phases have higher periods than earlier phases in the same run.
A type function or the type of a polymorphic value (and thus of kind *).
The API that all polymorphic types support
An extractor class to create and pattern match with syntax PolyType(typeParams, resultType)
.
.
..
An exception for cyclic references from which we can recover
A tree which references a symbol-carrying entity.
The API that all ref trees support
Marks underlying reference to id as boxed.
The API that all references support
An extractor class to create and pattern match with syntax ReferenceToBoxed(ident)
.
A class representing intersection types with refinements of the form
<parents_0> with ... with <parents_n> { decls }
Cannot be created directly;
one should always use refinedType
for creation.
The API that all refined types support
An extractor class to create and pattern match with syntax RefinedType(parents, decls)
Here, parents
is the list of parent types of the class, and decls
is the scope
containing all declarations in the class.
A mirror that reflects instances and static classes
Return expression
The API that all returns support
An extractor class to create and pattern match with syntax Return(expr)
.
A proxy for a type (identified by field underlying
) that forwards most
operations to it.
An ordinal number for compiler runs.
An ordinal number for compiler runs. First run has number 1.
The API of a mirror for a reflective universe
A specific annotation argument that encodes an array of bytes as an
array of Long
.
Note: constructor is protected to force everyone to use the factory methods newScope or newNestedScope instead.
Designator <qualifier> .
The API that all selects support
An extractor class to create and pattern match with syntax Select(qual, name)
.
Type selection <qualifier> # <name>, eliminated by RefCheck
The API that all selects from type trees support
An extractor class to create and pattern match with syntax SelectFromTypeTree(qualifier, name)
.
A proxy for a type (identified by field underlying
) that forwards most
operations to it (for exceptions, see WrappingProxy, which forwards even more operations).
A class for singleton types of the form <prefix>.<sym.name>.type
.
The API that all single types support
An extractor class to create and pattern match with syntax SingleType(pre, sym)
Here, pre
is the prefix of the single-type, and sym
is the stable value symbol
referred to by the single-type.
A base class for types that represent a single value (single-types and this-types).
Singleton type, eliminated by RefCheck
The API that all singleton type trees support
An extractor class to create and pattern match with syntax SingletonTypeTree(ref)
.
Repetition of pattern.
The API that all stars support
An extractor class to create and pattern match with syntax Star(elem)
.
A base class for types that defer some operations to their immediate supertype.
A base class to compute all substitutions
A map to implement the substSym
method.
A map to implement the substThis
method.
A map to implement the subst
method.
Super reference, qual = corresponding this reference A super reference C.
The API that all supers support
An extractor class to create and pattern match with syntax Super(qual, mix)
.
.
The API that all super types support
An extractor class to create and pattern match with syntax SingleType(thistpe, supertpe)
A tree with a mutable symbol field, initialized to NoSymbol.
The API that all sym trees support
The extended API of sym trees that's supported in macro context universes
The class for all symbols
The API of symbols
The base API that all symbols support
The extended API of symbols that's supported in macro context universes
Instantiation template of a class or trait
The API that all templates support
An extractor class to create and pattern match with syntax Template(parents, self, body)
.
A mirror that reflects the instance or static parts of a runtime class
The abstract type of names representing types
A class for term symbols
The API of term symbols
The base API that all term symbols support
A tree for a term.
The API that all term trees support
Self reference
The API that all thises support
An extractor class to create and pattern match with syntax This(qual)
.
Substitute clazz.
A class for this-types of the form <sym>.
The API that all this types support
An extractor class to create and pattern match with syntax ThisType(sym)
where sym
is the class prefix of the this type.
Throw expression
The API that all tries support
An extractor class to create and pattern match with syntax Throw(expr)
.
The standard completer for top-level classes
Tree is the basis for scala's abstract syntax.
.
The base API that all trees support
The extended API of trees that's supported in macro context universes
The standard (lazy) tree copier
The standard (lazy) tree copier
The API of a tree copier tree copiers are made available by an implicit conversion in reflect.
Substitute symbols in from
with symbols in to
.
[Eugene++] comment me!
The API that all tries support
An extractor class to create and pattern match with syntax Try(block, catches, finalizer)
.
A tree for a type.
The API that all typ trees support
The base class for all types
The extended API of types
Explicit type application.
The API that all type applies support
An extractor class to create and pattern match with syntax TypeApply(fun, args)
.
The base API that all types support
A class for the bounds of abstract types and type parameters
The API that all type bounds support
An extractor class to create and pattern match with syntax TypeBound(lower, upper)
Here, lower
is the lower bound of the TypeBounds
pair, and upper
is
the upper bound.
Document me!
The API that all type bound trees support
An extractor class to create and pattern match with syntax TypeBoundsTree(lo, hi)
.
A class expressing upper and lower bounds constraints of type variables, as well as their instantiations.
An abstract type, a type parameter, or a type alias.
The API that all type defs support
An extractor class to create and pattern match with syntax TypeDef(mods, name, tparams, rhs)
.
A throwable signalling a type error
A prototype for mapping a function over all possible types
The abstract type of names representing terms
A class for named types of the form
<prefix>.<sym.name>[args]
Cannot be created directly; one should always use typeRef
for creation.
The API that all type refs support
An extractor class to create and pattern match with syntax TypeRef(pre, sym, args)
Here, pre
is the prefix of the type reference, sym
is the symbol
referred to by the type reference, and args
is a possible empty list of
type argumenrts.
A class for type parameters viewed from inside their scopes
A class of type symbols.
The API of type symbols
The base API that all type symbols support
If an implicit value of type u.
A synthetic tree holding an arbitrary type.
The API that all type trees support
The extended API of sym trees that's supported in macro context universes
An extractor class to create and pattern match with syntax TypeTree()
.
A class representing a type variable: not used after phase typer
.
Type annotation, eliminated by cleanup
The API that all typeds support
An extractor class to create and pattern match with syntax Typed(expr, tpt)
.
Noone knows what this is.
The API that all unapplies support
An extractor class to create and pattern match with syntax UnApply(fun, args)
.
Broadly speaking, a value definition.
The API that all val defs support
An extractor class to create and pattern match with syntax ValDef(mods, name, tpt, rhs)
.
A common base class for ValDefs and DefDefs.
The API that all val defs and def defs support
Test two objects for inequality.
Test two objects for inequality.
true
if !(this == that), false otherwise.
Equivalent to x.hashCode
except for boxed numeric types and null
.
Equivalent to x.hashCode
except for boxed numeric types and null
.
For numerics, it returns a hash value which is consistent
with value equality: if two value type instances compare
as true, then ## will produce the same hash value for each
of them.
For null
returns a hashcode where null.hashCode
throws a
NullPointerException
.
a hash value consistent with ==
Test two objects for equality.
Test two objects for equality.
The expression x == that
is equivalent to if (x eq null) that eq null else x.equals(that)
.
true
if the receiver object is equivalent to the argument; false
otherwise.
The constructor/deconstructor for Alternative
instances.
A tag that preserves the identity of the Alternative
abstract type from erasure.
The constructor/deconstructor for Annotated
instances.
A tag that preserves the identity of the Annotated
abstract type from erasure.
The constructor/deconstructor for AnnotatedType
instances.
A tag that preserves the identity of the AnnotatedType
abstract type from erasure.
The constructor/deconstructor for AppliedTypeTree
instances.
A tag that preserves the identity of the AppliedTypeTree
abstract type from erasure.
The constructor/deconstructor for Apply
instances.
The constructor/deconstructor for ApplyDynamic
instances.
A tag that preserves the identity of the ApplyDynamic
abstract type from erasure.
A tag that preserves the identity of the Apply
abstract type from erasure.
The constructor/deconstructor for ArrayValue
instances.
A tag that preserves the identity of the ArrayValue
abstract type from erasure.
The constructor/deconstructor for Assign
instances.
The constructor/deconstructor for AssignOrNamedArg
instances.
A tag that preserves the identity of the AssignOrNamedArg
abstract type from erasure.
A tag that preserves the identity of the Assign
abstract type from erasure.
The constructor/deconstructor for Bind
instances.
A tag that preserves the identity of the Bind
abstract type from erasure.
Block factory that flattens directly nested blocks.
The constructor/deconstructor for Block
instances.
A tag that preserves the identity of the Block
abstract type from erasure.
A tag that preserves the identity of the BoundedWildcardType
abstract type from erasure.
casedef shorthand
The constructor/deconstructor for CaseDef
instances.
A tag that preserves the identity of the CaseDef
abstract type from erasure.
The constructor/deconstructor for ClassDef
instances.
A tag that preserves the identity of the ClassDef
abstract type from erasure.
The constructor/deconstructor for ClassInfoType
instances.
A tag that preserves the identity of the ClassInfoType
abstract type from erasure.
A tag that preserves the identity of the ClassSymbol
abstract type from erasure.
A tag that preserves the identity of the CompoundType
abstract type from erasure.
The constructor/deconstructor for CompoundTypeTree
instances.
A tag that preserves the identity of the CompoundTypeTree
abstract type from erasure.
A writer that writes to the current Console and is sensitive to replacement of the Console's output stream.
The constructor/deconstructor for ConstantType
instances.
A tag that preserves the identity of the ConstantType
abstract type from erasure.
The constructor/deconstructor for DefDef
instances.
A tag that preserves the identity of the DefDef
abstract type from erasure.
A tag that preserves the identity of the DefTree
abstract type from erasure.
The empty scope (immutable).
The empty tree
A map to implement the contains
method.
An object representing an erroneous type
The constructor/deconstructor for ExistentialType
instances.
A tag that preserves the identity of the ExistentialType
abstract type from erasure.
The constructor/deconstructor for ExistentialTypeTree
instances.
A tag that preserves the identity of the ExistentialTypeTree
abstract type from erasure.
A tag that preserves the identity of the FreeTermSymbol
abstract type from erasure.
A tag that preserves the identity of the FreeTypeSymbol
abstract type from erasure.
The constructor/deconstructor for Function
instances.
A tag that preserves the identity of the Function
abstract type from erasure.
A creator and extractor for type parameterizations that strips empty type parameter lists.
A tag that preserves the identity of the GenericApply
abstract type from erasure.
The constructor/deconstructor for Ident
instances.
A tag that preserves the identity of the Ident
abstract type from erasure.
The constructor/deconstructor for If
instances.
A tag that preserves the identity of the If
abstract type from erasure.
A tag that preserves the identity of the ImplDef
abstract type from erasure.
The constructor/deconstructor for Import
instances.
The constructor/deconstructor for ImportSelector
instances.
A tag that preserves the identity of the ImportSelector
abstract type from erasure.
A tag that preserves the identity of the Import
abstract type from erasure.
The canonical creator for implicit method types
The canonical creator for implicit method types
The constructor/deconstructor for LabelDef
instances.
A tag that preserves the identity of the LabelDef
abstract type from erasure.
The constructor/deconstructor for Literal
instances.
A tag that preserves the identity of the Literal
abstract type from erasure.
The constructor/deconstructor for Match
instances.
A tag that preserves the identity of the Match
abstract type from erasure.
A tag that preserves the identity of the MemberDef
abstract type from erasure.
A tag that preserves the identity of the MethodSymbol
abstract type from erasure.
The constructor/deconstructor for MethodType
instances.
A tag that preserves the identity of the MethodType
abstract type from erasure.
A tag that preserves the identity of the Modifiers
abstract type from erasure.
The constructor/deconstructor for ModuleDef
instances.
A tag that preserves the identity of the ModuleDef
abstract type from erasure.
A tag that preserves the identity of the ModuleSymbol
abstract type from erasure.
A tag that preserves the identity of the NameTree
abstract type from erasure.
0-1 argument list new, based on a type.
Factory method for object creation new tpt(args_1)...(args_n)
A New(t, as)
is expanded to: (new t).<init>(as)
The constructor/deconstructor for New
instances.
A tag that preserves the identity of the New
abstract type from erasure.
.
...
.
An object representing a non-existing prefix
An object representing a non-existing type
The constructor/deconstructor for NullaryMethodType
instances.
A tag that preserves the identity of the NullaryMethodType
abstract type from erasure.
The constructor/deconstructor for PackageDef
instances.
A tag that preserves the identity of the PackageDef
abstract type from erasure.
The constructor/deconstructor for PolyType
instances.
A tag that preserves the identity of the PolyType
abstract type from erasure.
A tag that preserves the identity of the FlagSet
abstract type from erasure.
A tag that preserves the identity of the RefTree
abstract type from erasure.
The constructor/deconstructor for ReferenceToBoxed
instances.
A tag that preserves the identity of the ReferenceToBoxed
abstract type from erasure.
The constructor/deconstructor for RefinedType
instances.
A tag that preserves the identity of the RefinedType
abstract type from erasure.
The constructor/deconstructor for Return
instances.
A tag that preserves the identity of the Return
abstract type from erasure.
A tag that preserves the identity of the Scope
abstract type from erasure.
The constructor/deconstructor for Select
instances.
The constructor/deconstructor for SelectFromTypeTree
instances.
A tag that preserves the identity of the SelectFromTypeTree
abstract type from erasure.
A tag that preserves the identity of the Select
abstract type from erasure.
The constructor/deconstructor for SingleType
instances.
A tag that preserves the identity of the SingleType
abstract type from erasure.
A tag that preserves the identity of the SingletonType
abstract type from erasure.
The constructor/deconstructor for SingletonTypeTree
instances.
A tag that preserves the identity of the SingletonTypeTree
abstract type from erasure.
The constructor/deconstructor for Star
instances.
A tag that preserves the identity of the Star
abstract type from erasure.
The constructor/deconstructor for Super
instances.
A tag that preserves the identity of the Super
abstract type from erasure.
The constructor/deconstructor for SuperType
instances.
A tag that preserves the identity of the SuperType
abstract type from erasure.
A tag that preserves the identity of the SymTree
abstract type from erasure.
A tag that preserves the identity of the Symbol
abstract type from erasure.
The constructor/deconstructor for Template
instances.
A tag that preserves the identity of the Template
abstract type from erasure.
A tag that preserves the identity of the TermSymbol
abstract type from erasure.
A tag that preserves the identity of the TermTree
abstract type from erasure.
The constructor/deconstructor for This
instances.
A tag that preserves the identity of the This
abstract type from erasure.
The constructor/deconstructor for ThisType
instances.
A tag that preserves the identity of the ThisType
abstract type from erasure.
The constructor/deconstructor for Throw
instances.
A tag that preserves the identity of the Throw
abstract type from erasure.
A tag that preserves the identity of the Tree
abstract type from erasure.
The constructor/deconstructor for Try
instances.
A tag that preserves the identity of the Try
abstract type from erasure.
A tag that preserves the identity of the TypTree
abstract type from erasure.
The constructor/deconstructor for TypeApply
instances.
A tag that preserves the identity of the TypeApply
abstract type from erasure.
The constructor/deconstructor for TypeBounds
instances.
A tag that preserves the identity of the TypeBounds
abstract type from erasure.
The constructor/deconstructor for TypeBoundsTree
instances.
A tag that preserves the identity of the TypeBoundsTree
abstract type from erasure.
A TypeDef node which defines abstract type or type parameter for given sym
A TypeDef node which defines given sym
with given tight hand side rhs
.
The constructor/deconstructor for TypeDef
instances.
A tag that preserves the identity of the TypeDef
abstract type from erasure.
The constructor/deconstructor for TypeRef
instances.
A tag that preserves the identity of the TypeRef
abstract type from erasure.
A tag that preserves the identity of the TypeSymbol
abstract type from erasure.
A tag that preserves the identity of the Type
abstract type from erasure.
The constructor/deconstructor for TypeTree
instances.
A tag that preserves the identity of the TypeTree
abstract type from erasure.
The constructor/deconstructor for Typed
instances.
A tag that preserves the identity of the Typed
abstract type from erasure.
The constructor/deconstructor for UnApply
instances.
A tag that preserves the identity of the UnApply
abstract type from erasure.
The constructor/deconstructor for ValDef
instances.
A tag that preserves the identity of the ValDef
abstract type from erasure.
A tag that preserves the identity of the ValOrDefDef
abstract type from erasure.
An object representing an unknown type, used during type inference.
Type with all top-level occurrences of abstract types replaced by their bounds
Type with all top-level occurrences of abstract types replaced by their bounds
Let registered annotation checkers adapt a tree to a given type (called by Typers.
Let registered annotation checkers adapt a tree to a given type (called by Typers.adapt). Annotation checkers that cannot do the adaption should pass the tree through unchanged.
Refine the bounds on type parameters to the given type arguments.
Refine the bounds on type parameters to the given type arguments.
Register an annotation checker.
Register an annotation checker. Typically these are added by compiler plugins.
Let all annotations checkers add extra annotations to this tree's type.
Let all annotations checkers add extra annotations to this tree's type.
Make symbol sym
a member of scope tp.decls
where thistp
is the narrowed owner type of the scope.
Make symbol sym
a member of scope tp.decls
where thistp
is the narrowed owner type of the scope.
Creator for AnnotatedTypes.
Creator for AnnotatedTypes. It returns the underlying type if annotations.isEmpty rather than walking into the assertion.
Check that the annotations on two types conform.
Check that the annotations on two types conform. To do so, consult all registered annotation checkers.
Refine the computed greatest lower bound of a list of types.
Refine the computed greatest lower bound of a list of types. All this should do is add annotations.
Refine the computed least upper bound of a list of types.
Refine the computed least upper bound of a list of types. All this should do is add annotations.
Very convenient.
Very convenient.
A creator for type applications
A creator for existential types where the type arguments, rather than being applied directly, are interpreted as the upper bounds of unknown types.
A creator for existential types where the type arguments, rather than being applied directly, are interpreted as the upper bounds of unknown types. For instance if the type argument list given is List(AnyRefClass), the resulting type would be e.g. Set[_ <: AnyRef] rather than Set[AnyRef] .
Convert array parameters denoting a repeated parameter of a Java method
to JavaRepeatedParamClass
types.
Convert array parameters denoting a repeated parameter of a Java method
to JavaRepeatedParamClass
types.
Cast the receiver object to be of type T0
.
Cast the receiver object to be of type T0
.
Note that the success of a cast at runtime is modulo Scala's erasure semantics.
Therefore the expression 1.asInstanceOf[String]
will throw a ClassCastException
at
runtime, while the expression List(1).asInstanceOf[List[String]]
will not.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the requested type.
the receiver object.
if the receiver object is not an instance of the erasure of type T0
.
Perform given operation at given phase.
Perform given operation at given phase.
Assigns a given position to all position-less nodes of a given AST.
Turns a path into a String, introducing backquotes as necessary.
Turns a path into a String, introducing backquotes as necessary.
Create a base type sequence consisting of a single type
Create a base type sequence consisting of a single type
Since when it is to be "at" a phase is inherently ambiguous, a couple unambiguously named methods.
Since when it is to be "at" a phase is inherently ambiguous, a couple unambiguously named methods.
Does this type have a prefix that begins with a type variable, or is it a refinement type? For type prefixes that fulfil this condition, type selections with the same name of equal (wrt) =:= prefixes are considered equal wrt =:=
Does this type have a prefix that begins with a type variable, or is it a refinement type? For type prefixes that fulfil this condition, type selections with the same name of equal (wrt) =:= prefixes are considered equal wrt =:=
Java binary names, like scala/runtime/Nothing$.
Find out whether any annotation checker can adapt a tree to a given type.
Find out whether any annotation checker can adapt a tree to a given type. Called by Typers.adapt.
Mark a variable as captured; i.
Mark a variable as captured; i.e. force boxing in a *Ref type.
Convert type of a captured variable to *Ref type.
Convert type of a captured variable to *Ref type.
Convert type of a captured variable to *Ref type.
Convert type of a captured variable to *Ref type.
Check well-kindedness of type application (assumes arities are already checked) -- @M
Check well-kindedness of type application (assumes arities are already checked) -- @M
This check is also performed when abstract type members become concrete (aka a "type alias") -- then tparams.length==1 (checked one type member at a time -- in that case, prefix is the name of the type alias)
Type application is just like value application: it's "contravariant" in the sense that the type parameters of the supplied type arguments must conform to the type parameters of the required type parameters:
e.g. class Iterable[t, m[+x <: t]] --> the application Iterable[Int, List] is okay, since List's type parameter is also covariant and its bounds are weaker than <: Int
Memory to store all names sequentially.
Memory to store all names sequentially.
Create a copy of the receiver object.
Convenience functions which derive symbols by cloning.
Convenience functions which derive symbols by cloning.
Clone symbols and apply the given function to each new symbol's info.
Clone symbols and apply the given function to each new symbol's info.
the prototypical symbols
the function to apply to the infos
the newly created, info-adjusted symbols
Create the base type sequence of a compound type wuth given tp.
Create the base type sequence of a compound type wuth given tp.parents
Create a new MethodType of the same class as tp, i.
Create a new MethodType of the same class as tp, i.e. keep JavaMethodType
True if all three arguments have the same number of elements and the function is true for all the triples.
True if all three arguments have the same number of elements and the function is true for all the triples.
Create a class and a companion object, enter in enclosing scope, and initialize with a lazy type completer.
Create a class and a companion object, enter in enclosing scope, and initialize with a lazy type completer.
The owner of the newly created class and object
The simple name of the newly created class
The completer to be used to set the info of the class and the module
Functions which perform the standard clone/substituting on the given symbols and type, then call the creator function with the new symbols and type as arguments.
Functions which perform the standard clone/substituting on the given symbols and type, then call the creator function with the new symbols and type as arguments.
The current period.
The current period.
The current compiler run identifier.
The current compiler run identifier.
Remove any occurrences of type aliases from this type
Prints a stack trace if -Ydebug or equivalent was given, otherwise does nothing.
Prints a stack trace if -Ydebug or equivalent was given, otherwise does nothing.
Override with final implementation for inlining.
Override with final implementation for inlining.
Map a list of type parameter symbols to skolemized symbols, which can be deskolemized to the original type parameter.
Map a list of type parameter symbols to skolemized symbols, which can be deskolemized to the original type parameter. (A skolem is a representation of a bound variable when viewed inside its scope.) !!!Adriaan: this does not work for hk types.
Derives a new list of symbols from the given list by mapping the given list across the given function.
Derives a new list of symbols from the given list by mapping the given list across the given function. Then fixes the info of all the new symbols by substituting the new symbols for the original symbols.
the prototypical symbols
the function to create new symbols
the new list of info-adjusted symbols
Derives a new Type by first deriving new symbols as in deriveSymbols,
then performing the same oldSyms => newSyms substitution on tpe
as is
performed on the symbol infos in deriveSymbols.
Derives a new Type by first deriving new symbols as in deriveSymbols,
then performing the same oldSyms => newSyms substitution on tpe
as is
performed on the symbol infos in deriveSymbols.
the prototypical symbols
the function to create new symbols
the prototypical type
the new symbol-subsituted type
Derives a new Type by instantiating the given list of symbols as WildcardTypes.
Derives a new Type by instantiating the given list of symbols as WildcardTypes.
the symbols to replace
the new type with WildcardType replacing those syms
Convert to corresponding type parameters all skolems of method
parameters which appear in tparams
.
Convert to corresponding type parameters all skolems of method
parameters which appear in tparams
.
Substitutes the empty scope for any non-empty decls in the type.
Remove any occurrence of type <singleton> from this type and its parents
An empty deferred value definition corresponding to:
val _: _
This is used as a placeholder in the self
parameter Template if there is
no definition of a self value of self type.
Ensure that given tree has no positions that overlap with
any of the positions of others
.
Ensure that given tree has no positions that overlap with
any of the positions of others
. This is done by
shortening the range or assigning TransparentPositions
to some of the nodes in tree
.
Tests whether the argument (arg0
) is a reference to the receiver object (this
).
Tests whether the argument (arg0
) is a reference to the receiver object (this
).
The eq
method implements an equivalence relation on
non-null instances of AnyRef
, and has three additional properties:
x
and y
of type AnyRef
, multiple invocations of
x.eq(y)
consistently returns true
or consistently returns false
.x
of type AnyRef
, x.eq(null)
and null.eq(x)
returns false
.null.eq(null)
returns true
. When overriding the equals
or hashCode
methods, it is important to ensure that their behavior is
consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2
), they
should be equal to each other (o1 == o2
) and they should hash to the same value (o1.hashCode == o2.hashCode
).
true
if the argument is a reference to the receiver object; false
otherwise.
The equality method for reference types.
A creator for existential types.
A creator for existential types. This generates:
tpe1 where { tparams }
where tpe1
is the result of extrapolating tpe
wrt to tparams
.
Extrapolating means that type variables in tparams
occurring
in covariant positions are replaced by upper bounds, (minus any
SingletonClass markers), type variables in tparams
occurring in
contravariant positions are replaced by upper bounds, provided the
resulting type is legal wrt to stability, and does not contain any type
variable in tparams
.
The abstraction drops all type parameters that are not directly or
indirectly referenced by type tpe1
. If there are no remaining type
parameters, simply returns result type tpe
.
Perform operation p
on arguments tp1
, arg2
and print trace of computation.
Perform operation p
on arguments tp1
, arg2
and print trace of computation.
If option explaintypes
is set, print a subtype trace for op(found, required)
.
If option explaintypes
is set, print a subtype trace for op(found, required)
.
If option explaintypes
is set, print a subtype trace for found <:< required
.
If option explaintypes
is set, print a subtype trace for found <:< required
.
Called by the garbage collector on the receiver object when there are no more references to the object.
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the finalize
method is invoked, as
well as the interaction between finalize
and non-local returns
and exceptions, are all platform dependent.
From a list of types, find any which take type parameters where the type parameter bounds contain references to other any types in the list (including itself.
From a list of types, find any which take type parameters where the type parameter bounds contain references to other any types in the list (including itself.)
List of symbol pairs holding the recursive type parameter and the parameter which references it.
Are we compiling for .
Are we compiling for .NET?
Returns string formatted according to given format
string.
Returns string formatted according to given format
string.
Format strings are as for String.format
(@see java.lang.String.format).
For fully qualified type names.
A representation that corresponds to the dynamic class of the receiver object.
A representation that corresponds to the dynamic class of the receiver object.
The nature of the representation is platform dependent.
a representation that corresponds to the dynamic class of the receiver object.
not specified by SLS as a member of AnyRef
The greatest lower bound wrt <:< of a list of types
The greatest lower bound wrt <:< of a list of types
The greatest lower bound wrt <:< of a list of types, which have been normalized wrt elimSuper
The greatest lower bound wrt <:< of a list of types, which have been normalized wrt elimSuper
Again avoiding calling length, but the lengthCompare interface is clunky.
Again avoiding calling length, but the lengthCompare interface is clunky.
The hashCode method for reference types.
The set of all installed infotransformers.
The set of all installed infotransformers.
A creator for intersection type where intersections of a single type are replaced by the type itself.
A creator for intersection type where intersections of a single type are replaced by the type itself, and repeated parent classes are merged.
A map from lists to compound types that have the given list as parents.
A map from lists to compound types that have the given list as parents. This is used to avoid duplication in the computation of base type sequences and baseClasses. It makes use of the fact that these two operations depend only on the parents, not on the refinement.
Are we later than given phase in compilation?
Are we later than given phase in compilation?
Is this symbol table a part of a compiler universe?
Is this symbol table a part of a compiler universe?
Test whether the dynamic type of the receiver object is T0
.
Test whether the dynamic type of the receiver object is T0
.
Note that the result of the test is modulo Scala's erasure semantics.
Therefore the expression 1.isInstanceOf[String]
will return false
, while the
expression List(1).isInstanceOf[List[String]]
will return true
.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the specified type.
true
if the receiver object is an instance of erasure of type T0
; false
otherwise.
Is the given name valid for a top-level class? We exclude names with embedded $-signs, because these are nested classes or anonymous classes,
Is the given name valid for a top-level class? We exclude names with embedded $-signs, because these are nested classes or anonymous classes,
The isNumericValueType tests appear redundant, but without them test/continuations-neg/function3.
The isNumericValueType tests appear redundant, but without them test/continuations-neg/function3.scala goes into an infinite loop. (Even if the calls are to typeSymbolDirect.)
Is intersection of given types populated? That is, for all types tp1, tp2 in intersection for all common base classes bc of tp1 and tp2 let bt1, bt2 be the base types of tp1, tp2 relative to class bc Then: bt1 and bt2 have the same prefix, and any corresponding non-variant type arguments of bt1 and bt2 are the same
Is intersection of given types populated? That is, for all types tp1, tp2 in intersection for all common base classes bc of tp1 and tp2 let bt1, bt2 be the base types of tp1, tp2 relative to class bc Then: bt1 and bt2 have the same prefix, and any corresponding non-variant type arguments of bt1 and bt2 are the same
Is type tp a raw type?
Is type tp a raw type?
Is the tree Predef, scala.
Is the tree Predef, scala.Predef, or _root_.scala.Predef?
Do tp1
and tp2
denote equivalent types?
Do tp1
and tp2
denote equivalent types?
Are tps1
and tps2
lists of pairwise equivalent types?
Are tps1
and tps2
lists of pairwise equivalent types?
Are tps1
and tps2
lists of equal length such that all elements
of tps1
conform to corresponding elements of tps2
?
Are tps1
and tps2
lists of equal length such that all elements
of tps1
conform to corresponding elements of tps2
?
Do type arguments targs
conform to formal parameters tparams
?
Do type arguments targs
conform to formal parameters tparams
?
The least upper bound of a list of types, as determined by <:<
.
The least upper bound of a list of types, as determined by <:<
.
The maximum allowable depth of lubs or glbs over types ts
.
The maximum allowable depth of lubs or glbs over types ts
.
like map2, but returns list xs
itself - instead of a copy - if function
f
maps all elements to themselves.
like map2, but returns list xs
itself - instead of a copy - if function
f
maps all elements to themselves.
A deep map on a symbol's paramss.
A deep map on a symbol's paramss.
A function implementing tp1
matches tp2
.
A function implementing tp1
matches tp2
.
The maximum number of recursions allowed in toString
The maximum number of recursions allowed in toString
Compute lub (if variance == 1
) or glb (if variance == -1
) of given list
of types tps
.
Compute lub (if variance == 1
) or glb (if variance == -1
) of given list
of types tps
. All types in tps
are typerefs or singletypes
with the same symbol.
Return Some(x)
if the computation succeeds with result x
.
Return None
if the computation fails.
All these mm methods are "deep map" style methods for mapping etc.
All these mm methods are "deep map" style methods for mapping etc. on a list of lists while avoiding unnecessary intermediate structures like those created via flatten.
Returns the mirror that loaded given symbol
Returns the mirror that loaded given symbol
1.
1. If owner
is a package class (but not the empty package) and name
is a term name, make a new package
<owner>.<name>, otherwise return NoSymbol.
Exception: If owner is root and a java class with given name exists, create symbol in empty package instead
2. If owner
is the scala package and name
designates a phantom class, return
the corresponding class symbol and enter it into this mirror's ScalaPackage.
Equivalent to !(this eq that)
.
Equivalent to !(this eq that)
.
true
if the argument is not a reference to the receiver object; false
otherwise.
Does a pattern of type patType
need an outer test when executed against
selector type selType
in context defined by currentOwner
?
Does a pattern of type patType
need an outer test when executed against
selector type selType
in context defined by currentOwner
?
A creator for existential types which flattens nested existentials.
A creator for existential types which flattens nested existentials.
Create a new free term.
Create a new free term. Its owner is NoSymbol.
Create a new free type.
Create a new free type. Its owner is NoSymbol.
Create a new scope nested in another one with which it shares its elements
Create a new scope nested in another one with which it shares its elements
Create a new scope
Create a new scope
Create a new scope with given initial elements
Create a term name from string.
Create a term name from string.
Create a term name from the UTF8 encoded bytes in bs[offset.
Create a term name from the UTF8 encoded bytes in bs[offset..offset+len-1].
Create a term name from the characters in cs[offset.
Create a term name from the characters in cs[offset..offset+len-1]. TODO - have a mode where name validation is performed at creation time (e.g. if a name has the string "$class" in it, then fail if that string is not at the very end.)
Create a term name from the characters in cs[offset.
Create a term name from the characters in cs[offset..offset+len-1].
Hook to define what show(tree)
means.
Hook to define what show(tree)
means.
Create a type name from string.
Create a type name from string.
Create a type name from the UTF8 encoded bytes in bs[offset.
Create a type name from the UTF8 encoded bytes in bs[offset..offset+len-1].
Create a type name from the characters in cs[offset.
Create a type name from the characters in cs[offset..offset+len-1].
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
if there's a package
member object in pkgClass
, enter its members into it.
if there's a package
member object in pkgClass
, enter its members into it.
The original owner of a class.
The original owner of a class. Used by the backend to generate EnclosingMethod attributes.
The phase identifier of the given period.
The phase identifier of the given period.
The phase associated with given period.
The phase associated with given period.
The phase which has given index as identifier.
The phase which has given index as identifier.
Adds backticks if the name is a scala keyword.
Adds backticks if the name is a scala keyword.
The raw to existential map converts a raw type to an existential type.
The raw to existential map converts a raw type to an existential type. It is necessary because we might have read a raw type of a parameterized Java class from a class file. At the time we read the type the corresponding class file might still not be read, so we do not know what the type parameters of the type are. Therefore the conversion of raw types to existential types might not have taken place in ClassFileparser.sigToType (where it is usually done).
Mark given identifier as a reference to a captured variable itself
suppressing dereferencing with the elem
field.
Mark given identifier as a reference to a captured variable itself
suppressing dereferencing with the elem
field.
The canonical creator for a refined type with an initially empty scope.
the canonical creator for a refined type with a given scope
Given an expression, generate a tree that when compiled and executed produces the original tree.
Given an expression, generate a tree that when compiled and executed produces the original tree. The produced tree will be bound to the Universe it was called from.
For instance, given the abstract syntax tree representation of the <[ x + 1 ]> expression:
Apply(Select(Ident("x"), "+"), List(Literal(Constant(1))))
The reifier transforms it to the following expression:
<[ val $u: u.type = u // where u is a reference to the Universe that calls the reify $u.Expr[Int]($u.Apply($u.Select($u.Ident($u.newFreeVar("x", <Int>, x), "+"), List($u.Literal($u.Constant(1)))))) ]>
Reification performs expression splicing (when processing Expr.splice) and type splicing (for every type T that has a TypeTag[T] implicit in scope):
val two = mirror.reify(2) // Literal(Constant(2)) val four = mirror.reify(two.splice + two.splice) // Apply(Select(two.tree, newTermName("$plus")), List(two.tree)) def macroImpl[T](c: Context) = { ... // T here is just a type parameter, so the tree produced by reify won't be of much use in a macro expansion // however, if T were annotated with c.TypeTag (which would declare an implicit parameter for macroImpl) // then reification would subtitute T with the TypeTree that was used in a TypeApply of this particular macro invocation val factory = c.reify{ new Queryable[T] } ... }
The transformation looks mostly straightforward, but it has its tricky parts: * Reifier retains symbols and types defined outside the reified tree, however locally defined entities get erased and replaced with their original trees * Free variables are detected and wrapped in symbols of the type FreeVar * Mutable variables that are accessed from a local function are wrapped in refs * Since reified trees can be compiled outside of the scope they've been created in, special measures are taken to ensure that all members accessed in the reifee remain visible
Remove all annotation checkers
Remove all annotation checkers
Repack existential types, otherwise they sometimes get unpacked in the wrong location (type inference comes up with an unexpected skolem)
Repack existential types, otherwise they sometimes get unpacked in the wrong location (type inference comes up with an unexpected skolem)
The run identifier of the given period.
The run identifier of the given period.
True if two lists have the same length.
True if two lists have the same length. Since calling length on linear sequences is O(n), it is an inadvisable way to test length equality.
The canonical creator for single-types
The current skolemization level, needed for the algorithms in isSameType, isSubType that do constraint solving under a prefix.
The current skolemization level, needed for the algorithms in isSameType, isSubType that do constraint solving under a prefix.
Solve constraint collected in types tvars
.
Solve constraint collected in types tvars
.
All type variables to be instantiated.
The type parameters corresponding to tvars
The variances of type parameters; need to reverse solution direction for all contravariant variables.
When true
search for max solution else min.
A minimal type list which has a given list of types as its base type sequence
A minimal type list which has a given list of types as its base type sequence
Does type tp
implement symbol sym
with same or
stronger type? Exact only if sym
is a member of some
refinement type, otherwise we might return false negatives.
Does type tp
implement symbol sym
with same or
stronger type? Exact only if sym
is a member of some
refinement type, otherwise we might return false negatives.
The period at the start of run that includes period
.
The period at the start of run that includes period
.
Overridden when we know more about what was happening during a failure.
Overridden when we know more about what was happening during a failure.
Make each type var in this type use its original type for comparisons instead of collecting constraints.
Make each type var in this type use its original type for comparisons instead of collecting constraints.
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
a String representation of the object.
Dump each symbol to stdout after shutdown.
Dump each symbol to stdout after shutdown.
The maximum depth of type tp
The maximum depth of type tp
A creator for a type functions, assuming the type parameters tps already have the right owner.
A creator for a type functions, assuming the type parameters tps already have the right owner.
A creator for anonymous type functions, where the symbol for the type function still needs to be created.
A creator for anonymous type functions, where the symbol for the type function still needs to be created.
TODO: type params of anonymous type functions, which currently can only arise from normalising type aliases, are owned by the type alias of which they are the eta-expansion higher-order subtyping expects eta-expansion of type constructors that arise from a class; here, the type params are owned by that class, but is that the right thing to do?
A collector that tests for existential types appearing at given variance in a type
A collector that tests for existential types appearing at given variance in a type
The canonical creator for typerefs todo: see how we can clean this up a bit
A map to convert every occurrence of a type variable to a wildcard type.
A list of the typevars in a type.
A list of the typevars in a type.
A merker object for a base type sequence that's no yet computed.
A merker object for a base type sequence that's no yet computed. used to catch inheritance cycles
A log of type variable with their original constraints.
A log of type variable with their original constraints. Used in order to undo constraints in the case of isSubType/isSameType failure.
Assert that packages have package scopes
Assert that packages have package scopes
A map to convert every occurrence of a wildcard type to a fresh type variable
Execute op
while printing a trace of the operations on types executed.
Execute op
while printing a trace of the operations on types executed.
A position that wraps the non-empty set of trees.
A position that wraps the non-empty set of trees. The point of the wrapping position is the point of the first trees' position. If all some the trees are non-synthetic, returns a range position enclosing the non-synthetic trees Otherwise returns a synthetic offset position to point.
A position that wraps a set of trees.
Hook for extensions
Hook for extensions
(Since version 2.10.0) Give us a reason
(Since version 2.10.0) Moved to tree.duplicate
A creator for type parameterizations that strips empty type parameter lists.
A creator for type parameterizations that strips empty type parameter lists. Use this factory method to indicate the type has kind * (it's a polymorphic value) until we start tracking explicit kinds equivalent to typeFun (except that the latter requires tparams nonEmpty).
(Since version 2.10.0) use genPolyType(...) instead
(Since version 2.9.0)
(Since version 2.10.0) Use leftOfArrow instead
(Since version 2.10.0) Use resultOfEnsuring instead
The universe for standard runtime reflection from Java. This type implements all abstract term members in internal.SymbolTable.