Skip to content

Move TastyImpl to tastyreflect #4580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dotty.tools.dotc.tasty
package dotty.tools.dotc.tastyreflect

import dotty.tools.dotc.core.Contexts.Context

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dotty.tools.dotc.tasty
package dotty.tools.dotc.tastyreflect

import dotty.tools.dotc.core.Flags
import dotty.tools.dotc.core.Flags._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package dotty.tools.dotc.tasty
package dotty.tools.dotc.tastyreflect

import dotty.tools.dotc.ast.tpd
import dotty.tools.dotc.core.Contexts.Context
import dotty.tools.dotc.core.Symbols._
import dotty.tools.dotc.core.Flags._
import dotty.tools.dotc.core.Symbols._

object FromSymbol {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package dotty.tools.dotc.tasty
package dotty.tools.dotc.tastyreflect

import dotty.tools.dotc.ast.{Trees, tpd, untpd}
import dotty.tools.dotc.core
import dotty.tools.dotc.core._
import dotty.tools.dotc.core.Decorators._
import dotty.tools.dotc.core.StdNames.nme
import dotty.tools.dotc.core.Symbols.Symbol
import dotty.tools.dotc.core.Decorators._
import dotty.tools.dotc.core._
import dotty.tools.dotc.core.quoted.PickledQuotes
import dotty.tools.dotc.reporting.Reporter
import dotty.tools.dotc.reporting.diagnostic.MessageContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import dotty.tools.dotc.ast.Trees.{Tree, Untyped}
import dotty.tools.dotc.core.Symbols.Symbol
import dotty.tools.dotc.core.Types.Type

package object tasty {
package object tastyreflect {

type PackageDefinition = PackageDefinitionImpl[Type]

/** Represents the symbol of a definition in tree form */
case class PackageDefinitionImpl[-T >: Untyped] private[tasty] (symbol: Symbol) extends Tree[T] {
case class PackageDefinitionImpl[-T >: Untyped] private[tastyreflect] (symbol: Symbol) extends Tree[T] {
type ThisTree[-T >: Untyped] = PackageDefinitionImpl[T]
}

Expand Down
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/transform/Splicer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import dotty.tools.dotc.core.quoted._
import dotty.tools.dotc.core.Types._
import dotty.tools.dotc.core.Symbols._
import dotty.tools.dotc.core.TypeErasure
import dotty.tools.dotc.tasty.CompilationUniverse
import dotty.tools.dotc.tastyreflect.CompilationUniverse

import scala.util.control.NonFatal
import dotty.tools.dotc.util.Positions.Position
Expand All @@ -38,7 +38,7 @@ object Splicer {
val liftedArgs = getLiftedArgs(call, bindings)
val interpreter = new Interpreter(pos, classLoader)
val interpreted = interpreter.interpretCallToSymbol[Seq[Any] => Object](call.symbol)
val tctx = new tasty.CompilationUniverse(ctx)
val tctx = new CompilationUniverse(ctx)
evaluateMacro(pos) {
// Some parts of the macro are evaluated during the unpickling performed in quotedExprToTree
val evaluated = interpreted.map(lambda => lambda(tctx :: liftedArgs).asInstanceOf[scala.quoted.Expr[Nothing]])
Expand Down