Skip to content

Commit 3cbc635

Browse files
committed
Rename StagingContext to QuoteContext
1 parent 6d02874 commit 3cbc635

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

compiler/src/dotty/tools/dotc/quoted/Interpreter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import dotty.tools.dotc.core.Symbols._
2424
import dotty.tools.dotc.core.TypeErasure
2525
import dotty.tools.dotc.core.Types._
2626
import dotty.tools.dotc.quoted._
27-
import dotty.tools.dotc.staging.StagingContext.*
27+
import dotty.tools.dotc.staging.QuoteContext.*
2828
import dotty.tools.dotc.typer.ImportInfo.withRootImports
2929
import dotty.tools.dotc.util.SrcPos
3030
import dotty.tools.dotc.reporting.Message

compiler/src/dotty/tools/dotc/staging/HealType.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import dotty.tools.dotc.core.Decorators._
66
import dotty.tools.dotc.core.Flags._
77
import dotty.tools.dotc.core.Symbols._
88
import dotty.tools.dotc.core.Types._
9-
import dotty.tools.dotc.staging.StagingContext.*
9+
import dotty.tools.dotc.staging.QuoteContext.*
1010
import dotty.tools.dotc.staging.StagingLevel.*
1111
import dotty.tools.dotc.staging.QuoteTypeTags.*
1212
import dotty.tools.dotc.transform.SymUtils._

compiler/src/dotty/tools/dotc/staging/PCPCheckAndHeal.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import dotty.tools.dotc.core.NameKinds._
1010
import dotty.tools.dotc.core.StdNames._
1111
import dotty.tools.dotc.core.Symbols._
1212
import dotty.tools.dotc.core.Types._
13-
import dotty.tools.dotc.staging.StagingContext.*
13+
import dotty.tools.dotc.staging.QuoteContext.*
1414
import dotty.tools.dotc.staging.StagingLevel.*
1515
import dotty.tools.dotc.staging.QuoteTypeTags.*
1616
import dotty.tools.dotc.util.Property
@@ -146,11 +146,11 @@ class PCPCheckAndHeal extends TreeMapWithStages {
146146
// `quoted.runtime.Expr.quote[F[T]](... T ...)` --> `internal.Quoted.expr[F[$t]](... T ...)`
147147
val tp = healType(splice.srcPos)(splice.tpe.widenTermRefExpr)
148148
cpy.Apply(splice)(cpy.TypeApply(fun)(fun.fun, tpd.TypeTree(tp) :: Nil), body1 :: Nil)
149-
case f @ Apply(fun @ TypeApply(_, _), qctx :: Nil) =>
149+
case f @ Apply(fun @ TypeApply(_, _), quotes :: Nil) =>
150150
// Type of the splice itself must also be healed
151151
// `quoted.runtime.Expr.quote[F[T]](... T ...)` --> `internal.Quoted.expr[F[$t]](... T ...)`
152152
val tp = healType(splice.srcPos)(splice.tpe.widenTermRefExpr)
153-
cpy.Apply(splice)(cpy.Apply(f)(cpy.TypeApply(fun)(fun.fun, tpd.TypeTree(tp) :: Nil), qctx :: Nil), body1 :: Nil)
153+
cpy.Apply(splice)(cpy.Apply(f)(cpy.TypeApply(fun)(fun.fun, tpd.TypeTree(tp) :: Nil), quotes :: Nil), body1 :: Nil)
154154
}
155155
}
156156

compiler/src/dotty/tools/dotc/staging/StagingContext.scala renamed to compiler/src/dotty/tools/dotc/staging/QuoteContext.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ import dotty.tools.dotc.util.Property
77
import dotty.tools.dotc.staging.PCPCheckAndHeal
88
import dotty.tools.dotc.staging.StagingLevel.*
99

10-
object StagingContext {
10+
object QuoteContext {
1111

1212
/** A key to be used in a context property that tracks the quotation stack.
1313
* Stack containing the Quotes references received by the surrounding quotes.
1414
*/
1515
private val QuotesStack = new Property.Key[List[tpd.Tree]]
1616

1717
/** Context with an incremented quotation level and pushes a reference to a Quotes on the quote context stack */
18-
def pushQuotes(qctxRef: tpd.Tree)(using Context): Context =
18+
def pushQuotes(quotes: tpd.Tree)(using Context): Context =
1919
val old = ctx.property(QuotesStack).getOrElse(List.empty)
20-
quoteContext.setProperty(QuotesStack, qctxRef :: old)
20+
quoteContext.setProperty(QuotesStack, quotes :: old)
2121

2222
/** Context with a decremented quotation level and pops the Some of top of the quote context stack or None if the stack is empty.
2323
* The quotation stack could be empty if we are in a top level splice or an erroneous splice directly within a top level splice.

compiler/src/dotty/tools/dotc/transform/Inlining.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import dotty.tools.dotc.quoted._
1212
import dotty.tools.dotc.inlines.Inlines
1313
import dotty.tools.dotc.ast.TreeMapWithImplicits
1414
import dotty.tools.dotc.core.DenotTransformers.IdentityDenotTransformer
15-
import dotty.tools.dotc.staging.StagingContext.*
15+
import dotty.tools.dotc.staging.QuoteContext.*
1616
import dotty.tools.dotc.staging.StagingLevel
1717

1818
import scala.collection.mutable.ListBuffer

compiler/src/dotty/tools/dotc/transform/Splicing.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import dotty.tools.dotc.core.StdNames._
2222
import dotty.tools.dotc.quoted._
2323
import dotty.tools.dotc.config.ScalaRelease.*
2424
import dotty.tools.dotc.staging.PCPCheckAndHeal
25-
import dotty.tools.dotc.staging.StagingContext.*
25+
import dotty.tools.dotc.staging.QuoteContext.*
2626
import dotty.tools.dotc.staging.StagingLevel.*
2727
import dotty.tools.dotc.staging.QuoteTypeTags
2828

compiler/src/dotty/tools/dotc/transform/Staging.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import dotty.tools.dotc.core.Symbols._
1010
import dotty.tools.dotc.core.Types._
1111
import dotty.tools.dotc.util.SrcPos
1212
import dotty.tools.dotc.transform.SymUtils._
13-
import dotty.tools.dotc.staging.StagingContext.*
13+
import dotty.tools.dotc.staging.QuoteContext.*
1414
import dotty.tools.dotc.staging.StagingLevel.*
1515
import dotty.tools.dotc.staging.PCPCheckAndHeal
1616
import dotty.tools.dotc.staging.HealType

compiler/src/dotty/tools/dotc/typer/QuotesAndSplices.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import dotty.tools.dotc.core.StdNames._
1515
import dotty.tools.dotc.core.Symbols._
1616
import dotty.tools.dotc.core.Types._
1717
import dotty.tools.dotc.inlines.PrepareInlineable
18-
import dotty.tools.dotc.staging.StagingContext.*
18+
import dotty.tools.dotc.staging.QuoteContext.*
1919
import dotty.tools.dotc.staging.StagingLevel.*
2020
import dotty.tools.dotc.transform.SymUtils._
2121
import dotty.tools.dotc.typer.Implicits._

0 commit comments

Comments
 (0)