diff options
author | Martin Odersky <odersky@gmail.com> | 2014-09-12 02:29:53 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-09-12 02:29:53 +0200 |
commit | 2317764b683fe548f7c5e3b5ee5ede9760433c61 (patch) | |
tree | 812021ca83db7c3120ebe4a1797015b04856996e /src/dotty/tools/dotc/core | |
parent | bb5b049076ca733ea42e528ecef81de438a15b19 (diff) | |
download | dotty-2317764b683fe548f7c5e3b5ee5ede9760433c61.tar.gz dotty-2317764b683fe548f7c5e3b5ee5ede9760433c61.tar.bz2 dotty-2317764b683fe548f7c5e3b5ee5ede9760433c61.zip |
New phase: CapturedVars
Breaks out boxing functionality of captured vars from lambda lift.
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r-- | src/dotty/tools/dotc/core/Definitions.scala | 9 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/StdNames.scala | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala index cace6df74..72c42e719 100644 --- a/src/dotty/tools/dotc/core/Definitions.scala +++ b/src/dotty/tools/dotc/core/Definitions.scala @@ -538,6 +538,15 @@ class Definitions { vcls } + /** The classes for which a Ref type exists. */ + lazy val refClasses: collection.Set[Symbol] = ScalaNumericValueClasses + BooleanClass + ObjectClass + + lazy val refClass: Map[Symbol, Symbol] = + refClasses.map(rc => rc -> ctx.requiredClass(s"scala.runtime.${rc.name}Ref")).toMap + + lazy val volatileRefClass: Map[Symbol, Symbol] = + refClasses.map(rc => rc -> ctx.requiredClass(s"scala.runtime.Volatile${rc.name}Ref")).toMap + def wrapArrayMethodName(elemtp: Type): TermName = { val cls = elemtp.classSymbol if (cls.isPrimitiveValueClass) nme.wrapXArray(cls.name) diff --git a/src/dotty/tools/dotc/core/StdNames.scala b/src/dotty/tools/dotc/core/StdNames.scala index af4e810de..3cafd2af7 100644 --- a/src/dotty/tools/dotc/core/StdNames.scala +++ b/src/dotty/tools/dotc/core/StdNames.scala @@ -344,6 +344,7 @@ object StdNames { // val conforms : N = "conforms" // Dotty deviation: no special treatment of conforms, so the occurrence of the name here would cause to unintended implicit shadowing. Should find a less common name for it in Predef. val copy: N = "copy" val currentMirror: N = "currentMirror" + val create: N = "create" val definitions: N = "definitions" val delayedInit: N = "delayedInit" val delayedInitArg: N = "delayedInit$body" @@ -484,6 +485,7 @@ object StdNames { val withFilter: N = "withFilter" val withFilterIfRefutable: N = "withFilterIfRefutable$" val wrap: N = "wrap" + val zero: N = "zero" val zip: N = "zip" val synthSwitch: N = "$synthSwitch" |