MCPcopy Index your code
hub / github.com/nodejs/node / to_double

Function to_double

deps/v8/test/mjsunit/optimized-map.js:419–433  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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();

Callers 1

optimized-map.jsFile · 0.85

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected