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

Function lazyChanger

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

Source from the content-addressed store, hash-verified

64(function() {
65 var a = [1, 2, 3, 4, 5];
66 var lazyChanger = function(deopt) {
67 var callback = function(v,i,o) {
68 if (i === 2 && deopt) {
69 a[2] = 100;
70 %DeoptimizeNow();
71 }
72 return true;
73 }
74 return a.filter(callback);
75 };
76 %PrepareFunctionForOptimization(lazyChanger);
77 assertEquals(a, lazyChanger());
78 lazyChanger();

Calls 1

filterMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…