()
| 417 | (function() { |
| 418 | var result = 0; |
| 419 | var to_double = function() { |
| 420 | var callback = function(v,i,o) { |
| 421 | result += v; |
| 422 | if (i < 5) { |
| 423 | // First transition the output array to PACKED_DOUBLE_ELEMENTS. |
| 424 | return v + 0.5; |
| 425 | } else { |
| 426 | // Then return smi values and make sure they can live in the double |
| 427 | // array. |
| 428 | return v; |
| 429 | } |
| 430 | }; |
| 431 | %EnsureFeedbackVectorForFunction(callback); |
| 432 | return c.map(callback); |
| 433 | }; |
| 434 | %PrepareFunctionForOptimization(to_double); |
| 435 | to_double(); |
| 436 | to_double(); |