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

Function test

deps/v8/test/mjsunit/closures.js:34–43  ·  view source on GitHub ↗
(n)

Source from the content-addressed store, hash-verified

32}
33
34function test(n) {
35 function MyFunction() {
36 var result = n * 2 + arguments.length;
37 return result;
38 };
39 %PrepareFunctionForOptimization(MyFunction);
40 for (var i = 0; i < 5; ++i) MyFunction();
41 %OptimizeFunctionOnNextCall(MyFunction);
42 runner(MyFunction, n * 2);
43}
44
45test(1);
46test(42);

Callers 1

closures.jsFile · 0.70

Calls 2

MyFunctionFunction · 0.85
runnerFunction · 0.70

Tested by

no test coverage detected