From 09199545d784ba36dee1899bda8a9c4ce448397c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 25 Jan 2014 13:02:39 +0100 Subject: Add text markers around "hot" tracing operations. That way they can be easily removed by search and replace, which gives us a clearer picture of the runtime profiles. --- src/dotty/tools/dotc/core/SymDenotations.scala | 2 +- src/dotty/tools/dotc/core/TypeApplications.scala | 4 ++-- src/dotty/tools/dotc/core/TypeOps.scala | 4 ++-- src/dotty/tools/dotc/core/Types.scala | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 72c61d224..7c3421eef 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -1044,7 +1044,7 @@ object SymDenotations { NoType } - ctx.debugTraceIndented(s"$tp.baseType($this)") { + /*>|>*/ ctx.debugTraceIndented(s"$tp.baseType($this)") /*<|<*/ { if (symbol.isStatic && tp.derivesFrom(symbol)) symbol.typeRef else tp match { diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala index 8e068f5d3..9f742fcc2 100644 --- a/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/src/dotty/tools/dotc/core/TypeApplications.scala @@ -26,7 +26,7 @@ class TypeApplications(val self: Type) extends AnyVal { * For an intersection type A & B, the type parameters of its left operand, A. * Empty list for all other types. */ - final def typeParams(implicit ctx: Context): List[TypeSymbol] = track("typeParams") { + final def typeParams(implicit ctx: Context): List[TypeSymbol] = /*>|>*/ track("typeParams") /*<|<*/ { self match { case tp: ClassInfo => tp.cls.typeParams @@ -83,7 +83,7 @@ class TypeApplications(val self: Type) extends AnyVal { typeParams filter (tparam => self.member(tparam.name).symbol == tparam) /** Encode the type resulting from applying this type to given arguments */ - final def appliedTo(args: List[Type])(implicit ctx: Context): Type = track("appliedTo") { + final def appliedTo(args: List[Type])(implicit ctx: Context): Type = /*>|>*/ track("appliedTo") /*<|<*/ { def recur(tp: Type, tparams: List[TypeSymbol], args: List[Type]): Type = args match { case arg :: args1 => diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala index e2352d89e..4e0a857a3 100644 --- a/src/dotty/tools/dotc/core/TypeOps.scala +++ b/src/dotty/tools/dotc/core/TypeOps.scala @@ -9,7 +9,7 @@ trait TypeOps { this: Context => final def asSeenFrom(tp: Type, pre: Type, cls: Symbol, theMap: AsSeenFromMap): Type = { - def toPrefix(pre: Type, cls: Symbol, thiscls: ClassSymbol): Type = ctx.debugTraceIndented(s"toPrefix($pre, $cls, $thiscls)") { + def toPrefix(pre: Type, cls: Symbol, thiscls: ClassSymbol): Type = /*>|>*/ ctx.debugTraceIndented(s"toPrefix($pre, $cls, $thiscls)") /*<|<*/ { if ((pre eq NoType) || (pre eq NoPrefix) || (cls is PackageClass)) tp else if (thiscls.derivesFrom(cls) && pre.baseType(thiscls).exists) @@ -21,7 +21,7 @@ trait TypeOps { this: Context => toPrefix(pre.baseType(cls).normalizedPrefix, cls.owner, thiscls) } - ctx.conditionalTraceIndented(TypeOps.track , s"asSeen ${tp.show} from (${pre.show}, ${cls.show})", show = true) { // !!! DEBUG + /*>|>*/ ctx.conditionalTraceIndented(TypeOps.track , s"asSeen ${tp.show} from (${pre.show}, ${cls.show})", show = true) /*<|<*/ { // !!! DEBUG tp match { case tp: NamedType => val sym = tp.symbol diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 6c9bc4f10..0627608cd 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -345,7 +345,7 @@ object Types { } /** The member of this type with the given name */ - final def member(name: Name)(implicit ctx: Context): Denotation = track("member-" + name) { + final def member(name: Name)(implicit ctx: Context): Denotation = /*>|>*/ track("member-" + name) /*<|<*/ { findMember(name, widenIfUnstable, EmptyFlags) } @@ -506,7 +506,7 @@ object Types { } /** The basetype of this type with given class symbol */ - final def baseType(base: Symbol)(implicit ctx: Context): Type = /*ctx.traceIndented(s"$this baseType $base")*/ track("baseType") { + final def baseType(base: Symbol)(implicit ctx: Context): Type = /*ctx.traceIndented(s"$this baseType $base")*/ /*>|>*/ track("baseType") /*<|<*/ { base.denot match { case classd: ClassDenotation => classd.baseTypeOf(this) case _ => NoType -- cgit v1.2.3