aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r--src/dotty/tools/dotc/core/Definitions.scala9
-rw-r--r--src/dotty/tools/dotc/core/StdNames.scala2
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"