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

Function f1

deps/v8/test/mjsunit/baseline/flush-baseline-code.js:56–74  ·  view source on GitHub ↗
(should_recurse)

Source from the content-addressed store, hash-verified

54// Check bytecode isn't flushed if it's held strongly from somewhere but
55// baseline code is flushed.
56function f1(should_recurse) {
57 if (should_recurse) {
58 assertTrue(HasByteCode(f1));
59 for (i = 1; i < 50; i++) {
60 f1(false);
61 }
62 assertTrue(HasBaselineCode(f1));
63 // Here we are not checking whether some object was indeed reclaimed,
64 // so should not worry if conservative stack scanning is performed.
65 gc();
66 // TODO(jgruber, v8:12161): No longer true since we now always tier up to
67 // available Sparkplug code as early as possible. By the time we reach this
68 // assert, SP code is being executed and is thus alive.
69 // assertFalse(HasBaselineCode(f1));
70 // Also, the active tier is Sparkplug and not Ignition.
71 // assertTrue(ActiveTierIsIgnition(f1));
72 }
73 return x.b + 10;
74}
75
76(async function () {
77 f1(false);

Callers 1

Calls 4

HasByteCodeFunction · 0.70
HasBaselineCodeFunction · 0.70
assertTrueFunction · 0.50
gcFunction · 0.50

Tested by

no test coverage detected