aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/runtime/vc/VCPrototype.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-05-01 14:50:44 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-05-05 20:08:30 +0200
commitfa4b46a8a4337411eefac61d58d68f6497974bd5 (patch)
tree830c623da48e4cbcb8e5b9e066079b16e3eaef0c /src/dotty/runtime/vc/VCPrototype.scala
parentb2523fee17389a876af48c683b92e64209ca6105 (diff)
downloaddotty-fa4b46a8a4337411eefac61d58d68f6497974bd5.tar.gz
dotty-fa4b46a8a4337411eefac61d58d68f6497974bd5.tar.bz2
dotty-fa4b46a8a4337411eefac61d58d68f6497974bd5.zip
Add Value classes and array prototypes.
Making actual value classes extend this prototypes serves two goals: - This is a basis for implementing arrays of value classes. - Having underlying final in those glasses makes all unbox methods monomorphic and final. - this decreases size of an empty case-class to 1/3 of previous size.
Diffstat (limited to 'src/dotty/runtime/vc/VCPrototype.scala')
-rw-r--r--src/dotty/runtime/vc/VCPrototype.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/dotty/runtime/vc/VCPrototype.scala b/src/dotty/runtime/vc/VCPrototype.scala
new file mode 100644
index 000000000..5b43e74f4
--- /dev/null
+++ b/src/dotty/runtime/vc/VCPrototype.scala
@@ -0,0 +1,14 @@
+package dotty.runtime.vc
+
+abstract class VCPrototype {
+}
+
+abstract class VCCompanionPrototype {
+
+}
+
+abstract class VCArrayPrototype[T <: VCPrototype] {
+ def apply(idx: Int): Object
+ def update(idx: Int, el: T): Unit
+ def length: Int
+}