Skip to content

Commit

Permalink
Remove debug print
Browse files Browse the repository at this point in the history
  • Loading branch information
xerial committed Aug 20, 2023
1 parent b635cf6 commit 197742c
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q) {
surfaceOf(TypeRepr.of(using tpe))
}

private val seen = scala.collection.mutable.Set[TypeRepr]()
private val memo = scala.collection.mutable.Map[TypeRepr, Expr[Surface]]()
private val seen = scala.collection.mutable.Set[TypeRepr]()
private val memo = scala.collection.mutable.Map[TypeRepr, Expr[Surface]]()
private val lazySurface = scala.collection.mutable.Set[TypeRepr]()

private def surfaceOf(t: TypeRepr): Expr[Surface] = {
Expand All @@ -93,10 +93,9 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q) {
// For debugging
// println(s"[${typeNameOf(t)}]\n ${t}\nfull type name: ${fullTypeNameOf(t)}\nclass: ${t.getClass}")
val generator = factory.andThen { expr =>
if(!lazySurface.contains(t)) {
if (!lazySurface.contains(t)) {
expr
}
else {
} else {
// Need to cache the recursive Surface to be referenced in a LazySurface
val cacheKey = if (typeNameOf(t) == "scala.Any") {
t match {
Expand All @@ -110,8 +109,7 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q) {
case _ =>
fullTypeNameOf(t)
}
}
else {
} else {
fullTypeNameOf(t)
}
'{
Expand Down Expand Up @@ -706,7 +704,7 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q) {
}
}
val expr = Expr.ofSeq(methodSurfaces)
println(s"methodOf: ${targetType.typeSymbol.fullName} => \n${expr.show}")
// println(s"methodOf: ${targetType.typeSymbol.fullName} => \n${expr.show}")
methodMemo += targetType -> expr
expr
}
Expand Down

0 comments on commit 197742c

Please sign in to comment.