aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/NameOps.scala
diff options
context:
space:
mode:
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 e7283c827..74673235a 100644
--- a/src/dotty/tools/dotc/core/NameOps.scala
+++ b/src/dotty/tools/dotc/core/NameOps.scala
@@ -196,6 +196,14 @@ object NameOps {
case nme.clone_ => nme.array_clone
}
+ /** The name of the primitive runtime operation corresponding to an array operation */
+ def primitiveArrayOp: TermName = name match {
+ case nme.apply => nme.primitive.arrayApply
+ case nme.length => nme.primitive.arrayLength
+ case nme.update => nme.primitive.arrayUpdate
+ case nme.CONSTRUCTOR => nme.primitive.arrayConstructor
+ }
+
/** If name length exceeds allowable limit, replace part of it by hash */
def compactified(implicit ctx: Context): TermName = termName(compactify(name.toString))
}