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

Function test1

deps/v8/test/mjsunit/opt-elements-kind.js:129–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127
128%PrepareFunctionForOptimization(test1);
129function test1() {
130 // Test transition chain SMI->DOUBLE->FAST (crankshafted function will
131 // transition to FAST directly).
132 var smis = construct_smis();
133 convert_mixed(smis, 1.5, elements_kind.fast_double);
134
135 var doubles = construct_doubles();
136 convert_mixed(doubles, "three", elements_kind.fast);
137
138 convert_mixed(construct_smis(), "three", elements_kind.fast);
139 convert_mixed(construct_doubles(), "three", elements_kind.fast);
140
141 if (%ICsAreEnabled()) {
142 // Test that allocation sites allocate correct elements kind initially based
143 // on previous transitions.
144 smis = construct_smis();
145 doubles = construct_doubles();
146 convert_mixed(smis, 1, elements_kind.fast);
147 convert_mixed(doubles, 1, elements_kind.fast);
148 assertTrue(%HaveSameMap(smis, doubles));
149 }
150}
151
152function clear_ic_state() {
153 %ClearFunctionFeedback(construct_smis);

Callers 1

Calls 2

convert_mixedFunction · 0.85
assertTrueFunction · 0.70

Tested by

no test coverage detected