From cac5a08611f9511ba4d94b99db630404efae190a Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sun, 4 Nov 2012 14:17:25 +0100 Subject: Optimize primitive Array(e1, ..., en) Expands an existing optimization for reference arrays to apply to primitives, as well. Fixes one aspect of SI-6247. --- test/files/instrumented/t6611.scala | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'test/files/instrumented') diff --git a/test/files/instrumented/t6611.scala b/test/files/instrumented/t6611.scala index 821d5f3fbf..4c52f8a5ef 100644 --- a/test/files/instrumented/t6611.scala +++ b/test/files/instrumented/t6611.scala @@ -5,7 +5,29 @@ object Test { startProfiling() // tests optimization in Cleanup for varargs reference arrays - val a = Array("") + Array("") + + + Array(true) + Array(true, false) + Array(1: Byte) + Array(1: Byte, 2: Byte) + Array(1: Short) + Array(1: Short, 2: Short) + Array(1) + Array(1, 2) + Array(1L) + Array(1L, 2L) + Array(1d) + Array(1d, 2d) + Array(1f) + Array(1f, 2f) + + /* Not currently optimized: + Array[Int](1, 2) etc + Array(()) + Array((), ()) + */ stopProfiling() printStatistics() -- cgit v1.2.3