@@ -115,6 +115,8 @@ object Array extends FallbackArrayBuilding {
115115 * @param xs the elements to put in the array
116116 * @return an array containing all elements from xs.
117117 */
118+ // Subject to a compiler optimization in Cleanup.
119+ // Array(e0, ..., en) is translated to { val a = new Array(3); a(i) = ei; a }
118120 def apply [T : ClassTag ](xs : T * ): Array [T ] = {
119121 val array = new Array [T ](xs.length)
120122 var i = 0
@@ -123,6 +125,7 @@ object Array extends FallbackArrayBuilding {
123125 }
124126
125127 /** Creates an array of `Boolean` objects */
128+ // Subject to a compiler optimization in Cleanup, see above.
126129 def apply (x : Boolean , xs : Boolean * ): Array [Boolean ] = {
127130 val array = new Array [Boolean ](xs.length + 1 )
128131 array(0 ) = x
@@ -132,6 +135,7 @@ object Array extends FallbackArrayBuilding {
132135 }
133136
134137 /** Creates an array of `Byte` objects */
138+ // Subject to a compiler optimization in Cleanup, see above.
135139 def apply (x : Byte , xs : Byte * ): Array [Byte ] = {
136140 val array = new Array [Byte ](xs.length + 1 )
137141 array(0 ) = x
@@ -141,6 +145,7 @@ object Array extends FallbackArrayBuilding {
141145 }
142146
143147 /** Creates an array of `Short` objects */
148+ // Subject to a compiler optimization in Cleanup, see above.
144149 def apply (x : Short , xs : Short * ): Array [Short ] = {
145150 val array = new Array [Short ](xs.length + 1 )
146151 array(0 ) = x
@@ -150,6 +155,7 @@ object Array extends FallbackArrayBuilding {
150155 }
151156
152157 /** Creates an array of `Char` objects */
158+ // Subject to a compiler optimization in Cleanup, see above.
153159 def apply (x : Char , xs : Char * ): Array [Char ] = {
154160 val array = new Array [Char ](xs.length + 1 )
155161 array(0 ) = x
@@ -159,6 +165,7 @@ object Array extends FallbackArrayBuilding {
159165 }
160166
161167 /** Creates an array of `Int` objects */
168+ // Subject to a compiler optimization in Cleanup, see above.
162169 def apply (x : Int , xs : Int * ): Array [Int ] = {
163170 val array = new Array [Int ](xs.length + 1 )
164171 array(0 ) = x
@@ -168,6 +175,7 @@ object Array extends FallbackArrayBuilding {
168175 }
169176
170177 /** Creates an array of `Long` objects */
178+ // Subject to a compiler optimization in Cleanup, see above.
171179 def apply (x : Long , xs : Long * ): Array [Long ] = {
172180 val array = new Array [Long ](xs.length + 1 )
173181 array(0 ) = x
@@ -177,6 +185,7 @@ object Array extends FallbackArrayBuilding {
177185 }
178186
179187 /** Creates an array of `Float` objects */
188+ // Subject to a compiler optimization in Cleanup, see above.
180189 def apply (x : Float , xs : Float * ): Array [Float ] = {
181190 val array = new Array [Float ](xs.length + 1 )
182191 array(0 ) = x
@@ -186,6 +195,7 @@ object Array extends FallbackArrayBuilding {
186195 }
187196
188197 /** Creates an array of `Double` objects */
198+ // Subject to a compiler optimization in Cleanup, see above.
189199 def apply (x : Double , xs : Double * ): Array [Double ] = {
190200 val array = new Array [Double ](xs.length + 1 )
191201 array(0 ) = x
0 commit comments