MCPcopy Create free account
hub / github.com/nodejs/node / eagerDeoptInCalled

Function eagerDeoptInCalled

deps/v8/test/mjsunit/optimized-filter.js:17–30  ·  view source on GitHub ↗
(deopt)

Source from the content-addressed store, hash-verified

15 var a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25];
16 var result = 0;
17 var eagerDeoptInCalled = function(deopt) {
18 var callback = function(v,i,o) {
19 if (i == 13 && deopt) {
20 a.abc = 25;
21 }
22
23 // Ensure that the output array is smaller by shaving off the first
24 // item.
25 if (i === 0) return false;
26 result += v;
27 return true;
28 }
29 return a.filter(callback);
30 };
31 %PrepareFunctionForOptimization(eagerDeoptInCalled);
32 eagerDeoptInCalled();
33 eagerDeoptInCalled();

Callers 1

Calls 1

filterMethod · 0.65

Tested by

no test coverage detected