From 37cf9efe509b0bac4fb6bda01b7126e7511e43f0 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 26 Mar 2014 19:15:40 +0100 Subject: 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 --- src/dotty/tools/dotc/core/NameOps.scala | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/dotty/tools/dotc/core/NameOps.scala') 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)) } -- cgit v1.2.3