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

Function lazyDeselection

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

Source from the content-addressed store, hash-verified

87(function() {
88 var a = [1, 2, 3, 4, 5];
89 var lazyDeselection = function(deopt) {
90 var callback = function(v,i,o) {
91 if (i === 2 && deopt) {
92 %DeoptimizeNow();
93 return false;
94 }
95 return true;
96 }
97 return a.filter(callback);
98 };
99 %PrepareFunctionForOptimization(lazyDeselection);
100 assertEquals(a, lazyDeselection());
101 lazyDeselection();

Callers 1

Calls 1

filterMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…