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

Function test

deps/v8/test/mjsunit/compiler/load-elimination-global.js:173–188  ·  view source on GitHub ↗
(x, f)

Source from the content-addressed store, hash-verified

171}
172
173function test(x, f) {
174 %PrepareFunctionForOptimization(f);
175 X = true;
176 assertEquals(x, f());
177 assertEquals(x, f());
178 X = false;
179 assertEquals(x, f());
180 assertEquals(x, f());
181 X = true;
182 %OptimizeFunctionOnNextCall(f);
183 assertEquals(x, f());
184 assertEquals(x, f());
185 X = false;
186 assertEquals(x, f());
187 assertEquals(x, f());
188}
189
190test(4, test_load);
191test(8, test_store_load);

Callers 1

Calls 2

assertEqualsFunction · 0.70
fFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…