Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move quote unpickling to the core package
  • Loading branch information
nicolasstucki committed Jan 8, 2018
commit 8b94c86a1382f4799b5ed9c8951fe301a7a432ec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dotty.tools.dotc.quoted
package dotty.tools.dotc.core.quoted

import dotty.tools.dotc.ast.Trees._
import dotty.tools.dotc.ast.tpd
Expand All @@ -8,7 +8,7 @@ import dotty.tools.dotc.core.Contexts._
import dotty.tools.dotc.core.Decorators._
import dotty.tools.dotc.core.Flags._
import dotty.tools.dotc.core.Symbols._
import dotty.tools.dotc.core.tasty._
import dotty.tools.dotc.core.tasty.{TastyPickler, TastyPrinter, TastyString}
import dotty.tools.dotc.interpreter.RawQuoted

object PickledQuotes {
Expand Down Expand Up @@ -79,7 +79,7 @@ object PickledQuotes {

/** Unpickle TASTY bytes into it's tree */
private def unpickle(bytes: Array[Byte], splices: Seq[Any])(implicit ctx: Context): Tree = {
val unpickler = new dotty.tools.dotc.quoted.TastyUnpickler(bytes, splices)
val unpickler = new TastyUnpickler(bytes, splices)
unpickler.enter(roots = Set(defn.RootPackage))
val tree = unpickler.body.head
if (pickling ne noPrinter) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dotty.tools.dotc.quoted
package dotty.tools.dotc.core.quoted

import dotty.tools.dotc.ast.Trees.GenericApply
import dotty.tools.dotc.ast.tpd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dotty.tools.dotc.quoted
package dotty.tools.dotc.core.quoted

import dotty.tools.dotc.core.tasty._
import dotty.tools.dotc.core.tasty.TastyUnpickler.NameTable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import scala.collection.{ mutable, immutable }
import config.Printers.pickling
import typer.Checking
import config.Config
import dotty.tools.dotc.quoted.PickledQuotes
import dotty.tools.dotc.core.quoted.PickledQuotes
import dotty.tools.dotc.interpreter.RawQuoted
import scala.quoted.Expr

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import dotty.tools.dotc.core.Contexts._
import dotty.tools.dotc.core.Decorators._
import dotty.tools.dotc.core.Names._
import dotty.tools.dotc.core.Symbols._
import dotty.tools.dotc.quoted.Quoted
import dotty.tools.dotc.core.quoted.Quoted
import dotty.tools.dotc.util.Positions.Position

import scala.reflect.ClassTag
Expand Down
3 changes: 1 addition & 2 deletions compiler/src/dotty/tools/dotc/transform/ReifyQuotes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ import NameKinds.OuterSelectName

import scala.collection.mutable
import dotty.tools.dotc.core.StdNames._
import dotty.tools.dotc.quoted.PickledQuotes
import dotty.tools.dotc.quoted.Quoted
import dotty.tools.dotc.core.quoted._


/** Translates quoted terms and types to `unpickle` method calls.
Expand Down
9 changes: 2 additions & 7 deletions compiler/src/dotty/tools/dotc/transform/Splicer.scala
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
package dotty.tools.dotc
package transform

import dotty.tools.dotc.core.Contexts._
import dotty.tools.dotc.core.Symbols._
import dotty.tools.dotc.ast.Trees._
import dotty.tools.dotc.ast.tpd
import dotty.tools.dotc.core.Contexts._
import dotty.tools.dotc.core.quoted._
import dotty.tools.dotc.interpreter._
import dotty.tools.dotc.quoted.PickledQuotes
import dotty.tools.dotc.quoted.Quoted

import scala.quoted

/** Utility class to slice quoted expressions */
object Splicer {
Expand Down