@@ -472,7 +472,8 @@ object Types {
472472 * Inherited by all type proxies. Overridden for And and Or types.
473473 * `Nil` for all other types.
474474 */
475- def baseClasses (implicit ctx : Context ): List [ClassSymbol ] = track(" baseClasses" ) {
475+ def baseClasses (implicit ctx : Context ): List [ClassSymbol ] = {
476+ record(" baseClasses" )
476477 this match {
477478 case tp : TypeProxy =>
478479 tp.underlying.baseClasses
@@ -501,12 +502,13 @@ object Types {
501502 * The result is either a SymDenotation or a MultiDenotation of SymDenotations.
502503 * The info(s) are the original symbol infos, no translation takes place.
503504 */
504- final def decl (name : Name )(implicit ctx : Context ): Denotation = track(" decl" ) {
505+ final def decl (name : Name )(implicit ctx : Context ): Denotation = {
506+ record(" decl" )
505507 findDecl(name, EmptyFlags )
506508 }
507509
508510 /** A denotation containing the non-private declaration(s) in this type with the given name */
509- final def nonPrivateDecl (name : Name )(implicit ctx : Context ): Denotation = track( " nonPrivateDecl " ) {
511+ final def nonPrivateDecl (name : Name )(implicit ctx : Context ): Denotation = {
510512 findDecl(name, Private )
511513 }
512514
@@ -526,12 +528,14 @@ object Types {
526528 }
527529
528530 /** The member of this type with the given name */
529- final def member (name : Name )(implicit ctx : Context ): Denotation = /* >|>*/ track(" member" ) /* <|<*/ {
531+ final def member (name : Name )(implicit ctx : Context ): Denotation = /* >|>*/ {
532+ record(" member" )
530533 memberBasedOnFlags(name, required = EmptyFlags , excluded = EmptyFlags )
531534 }
532535
533536 /** The non-private member of this type with the given name. */
534- final def nonPrivateMember (name : Name )(implicit ctx : Context ): Denotation = track(" nonPrivateMember" ) {
537+ final def nonPrivateMember (name : Name )(implicit ctx : Context ): Denotation = {
538+ record(" nonPrivateMember" )
535539 memberBasedOnFlags(name, required = EmptyFlags , excluded = Flags .Private )
536540 }
537541
@@ -759,31 +763,36 @@ object Types {
759763 }
760764
761765 /** The set of abstract term members of this type. */
762- final def abstractTermMembers (implicit ctx : Context ): Seq [SingleDenotation ] = track(" abstractTermMembers" ) {
766+ final def abstractTermMembers (implicit ctx : Context ): Seq [SingleDenotation ] = {
767+ record(" abstractTermMembers" )
763768 memberDenots(abstractTermNameFilter,
764769 (name, buf) => buf ++= nonPrivateMember(name).altsWith(_.is(Deferred )))
765770 }
766771
767772 /** The set of abstract type members of this type. */
768- final def abstractTypeMembers (implicit ctx : Context ): Seq [SingleDenotation ] = track(" abstractTypeMembers" ) {
773+ final def abstractTypeMembers (implicit ctx : Context ): Seq [SingleDenotation ] = {
774+ record(" abstractTypeMembers" )
769775 memberDenots(abstractTypeNameFilter,
770776 (name, buf) => buf += nonPrivateMember(name).asSingleDenotation)
771777 }
772778
773779 /** The set of abstract type members of this type. */
774- final def nonClassTypeMembers (implicit ctx : Context ): Seq [SingleDenotation ] = track(" nonClassTypeMembers" ) {
780+ final def nonClassTypeMembers (implicit ctx : Context ): Seq [SingleDenotation ] = {
781+ record(" nonClassTypeMembers" )
775782 memberDenots(nonClassTypeNameFilter,
776783 (name, buf) => buf += member(name).asSingleDenotation)
777784 }
778785
779786 /** The set of type alias members of this type */
780- final def typeAliasMembers (implicit ctx : Context ): Seq [SingleDenotation ] = track(" typeAlias" ) {
787+ final def typeAliasMembers (implicit ctx : Context ): Seq [SingleDenotation ] = {
788+ record(" typeAliasMembers" )
781789 memberDenots(typeAliasNameFilter,
782790 (name, buf) => buf += member(name).asSingleDenotation)
783791 }
784792
785793 /** The set of type members of this type */
786- final def typeMembers (implicit ctx : Context ): Seq [SingleDenotation ] = track(" typeMembers" ) {
794+ final def typeMembers (implicit ctx : Context ): Seq [SingleDenotation ] = {
795+ record(" typeMembers" )
787796 memberDenots(typeNameFilter,
788797 (name, buf) => buf += member(name).asSingleDenotation)
789798 }
@@ -792,31 +801,36 @@ object Types {
792801 * @param kind A subset of {Implicit, Given} that specifies what kind of implicit should
793802 * be returned
794803 */
795- final def implicitMembers (kind : FlagSet )(implicit ctx : Context ): List [TermRef ] = track(" implicitMembers" ) {
804+ final def implicitMembers (kind : FlagSet )(implicit ctx : Context ): List [TermRef ] = {
805+ record(" implicitMembers" )
796806 memberDenots(implicitFilter,
797807 (name, buf) => buf ++= member(name).altsWith(_.isOneOf(GivenOrImplicitVal & kind)))
798808 .toList.map(d => TermRef (this , d.symbol.asTerm))
799809 }
800810
801811 /** The set of member classes of this type */
802- final def memberClasses (implicit ctx : Context ): Seq [SingleDenotation ] = track(" memberClasses" ) {
812+ final def memberClasses (implicit ctx : Context ): Seq [SingleDenotation ] = {
813+ record(" memberClasses" )
803814 memberDenots(typeNameFilter,
804815 (name, buf) => buf ++= member(name).altsWith(x => x.isClass))
805816 }
806817
807- final def fields (implicit ctx : Context ): Seq [SingleDenotation ] = track(" fields" ) {
818+ final def fields (implicit ctx : Context ): Seq [SingleDenotation ] = {
819+ record(" fields" )
808820 memberDenots(fieldFilter,
809821 (name, buf) => buf ++= member(name).altsWith(x => ! x.is(Method )))
810822 }
811823
812824 /** The set of members of this type that have all of `required` flags but none of `excluded` flags set. */
813- final def membersBasedOnFlags (required : FlagSet , excluded : FlagSet )(implicit ctx : Context ): Seq [SingleDenotation ] = track(" membersBasedOnFlags" ) {
825+ final def membersBasedOnFlags (required : FlagSet , excluded : FlagSet )(implicit ctx : Context ): Seq [SingleDenotation ] = {
826+ record(" membersBasedOnFlags" )
814827 memberDenots(takeAllFilter,
815828 (name, buf) => buf ++= memberBasedOnFlags(name, required, excluded).alternatives)
816829 }
817830
818831 /** All members of this type. Warning: this can be expensive to compute! */
819- final def allMembers (implicit ctx : Context ): Seq [SingleDenotation ] = track(" allMembers" ) {
832+ final def allMembers (implicit ctx : Context ): Seq [SingleDenotation ] = {
833+ record(" allMembers" )
820834 memberDenots(takeAllFilter, (name, buf) => buf ++= member(name).alternatives)
821835 }
822836
@@ -827,27 +841,31 @@ object Types {
827841 /** This type seen as if it were the type of a member of prefix type `pre`
828842 * declared in class `cls`.
829843 */
830- final def asSeenFrom (pre : Type , cls : Symbol )(implicit ctx : Context ): Type = track(" asSeenFrom" ) {
844+ final def asSeenFrom (pre : Type , cls : Symbol )(implicit ctx : Context ): Type = {
845+ record(" asSeenFrom" )
831846 if (! cls.membersNeedAsSeenFrom(pre)) this
832847 else ctx.asSeenFrom(this , pre, cls)
833848 }
834849
835850// ----- Subtype-related --------------------------------------------
836851
837852 /** Is this type a subtype of that type? */
838- final def <:< (that : Type )(implicit ctx : Context ): Boolean = track(" <:<" ) {
853+ final def <:< (that : Type )(implicit ctx : Context ): Boolean = {
854+ record(" <:<" )
839855 ctx.typeComparer.topLevelSubType(this , that)
840856 }
841857
842858 /** Is this type a subtype of that type? */
843- final def frozen_<:< (that : Type )(implicit ctx : Context ): Boolean = track(" frozen_<:<" ) {
859+ final def frozen_<:< (that : Type )(implicit ctx : Context ): Boolean = {
860+ record(" frozen_<:<" )
844861 ctx.typeComparer.isSubTypeWhenFrozen(this , that)
845862 }
846863
847864 /** Is this type the same as that type?
848865 * This is the case iff `this <:< that` and `that <:< this`.
849866 */
850- final def =:= (that : Type )(implicit ctx : Context ): Boolean = track(" =:=" ) {
867+ final def =:= (that : Type )(implicit ctx : Context ): Boolean = {
868+ record(" =:=" )
851869 ctx.typeComparer.isSameType(this , that)
852870 }
853871
@@ -905,7 +923,8 @@ object Types {
905923 * (*) when matching with a Java method, we also regard Any and Object as equivalent
906924 * parameter types.
907925 */
908- def matches (that : Type )(implicit ctx : Context ): Boolean = track(" matches" ) {
926+ def matches (that : Type )(implicit ctx : Context ): Boolean = {
927+ record(" matches" )
909928 ctx.typeComparer.matchesType(this , that, relaxed = ! ctx.phase.erasedTypes)
910929 }
911930
@@ -920,14 +939,16 @@ object Types {
920939 }
921940
922941 /** The basetype of this type with given class symbol, NoType if `base` is not a class. */
923- final def baseType (base : Symbol )(implicit ctx : Context ): Type = /* trace(s"$this baseType $base")*/ /* >|>*/ track(" base type" ) /* <|<*/ {
942+ final def baseType (base : Symbol )(implicit ctx : Context ): Type = {
943+ record(" baseType" )
924944 base.denot match {
925945 case classd : ClassDenotation => classd.baseTypeOf(this )
926946 case _ => NoType
927947 }
928948 }
929949
930- def & (that : Type )(implicit ctx : Context ): Type = track(" &" ) {
950+ def & (that : Type )(implicit ctx : Context ): Type = {
951+ record(" &" )
931952 ctx.typeComparer.glb(this , that)
932953 }
933954
@@ -956,7 +977,8 @@ object Types {
956977 // superclass.
957978 }
958979
959- def | (that : Type )(implicit ctx : Context ): Type = track(" |" ) {
980+ def | (that : Type )(implicit ctx : Context ): Type = {
981+ record(" |" )
960982 ctx.typeComparer.lub(this , that)
961983 }
962984
0 commit comments