aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/NameOps.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-26 19:15:40 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-03-29 09:29:05 +0100
commit37cf9efe509b0bac4fb6bda01b7126e7511e43f0 (patch)
treeee5fa94171acf87de4e5da5bf7ee704a18596163 /src/dotty/tools/dotc/core/NameOps.scala
parent0a1e969cb09e953d6b3f3b64b63a050588aa3360 (diff)
downloaddotty-37cf9efe509b0bac4fb6bda01b7126e7511e43f0.tar.gz
dotty-37cf9efe509b0bac4fb6bda01b7126e7511e43f0.tar.bz2
dotty-37cf9efe509b0bac4fb6bda01b7126e7511e43f0.zip
Erasure phase PoC
Still missing: bridge method generation, signatures. Other changes - Turned around Checking and NoChecking. Checking is the default, NoChecking disables it. - Refactored Typer#typed to expose typedNamed, so that it can be overridden in erasure. - Made logging more forgiving wrt off-buy-one phase errors. Conflicts: src/dotty/tools/dotc/typer/Typer.scala
Diffstat (limited to 'src/dotty/tools/dotc/core/NameOps.scala')
-rw-r--r--src/dotty/tools/dotc/core/NameOps.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/NameOps.scala b/src/dotty/tools/dotc/core/NameOps.scala
index b9df8f6ed..35f94aac7 100644
--- a/src/dotty/tools/dotc/core/NameOps.scala
+++ b/src/dotty/tools/dotc/core/NameOps.scala
@@ -181,6 +181,14 @@ object NameOps {
name.drop(tpnme.HK_TRAIT_PREFIX.length).toList.map(varianceOfSuffix)
}
+ /** The name of the generic runtime operation corresponding to an array operation */
+ def genericArrayOp: TermName = name match {
+ case nme.apply => nme.array_apply
+ case nme.length => nme.array_length
+ case nme.update => nme.array_update
+ case nme.clone_ => nme.array_clone
+ }
+
/** If name length exceeds allowable limit, replace part of it by hash */
def compactified(implicit ctx: Context): TermName = termName(compactify(name.toString))
}