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

Function monomorphic

deps/v8/test/mjsunit/elements-kind.js:154–164  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

152
153 // Crankshaft support for smi-only array elements.
154 function monomorphic(array) {
155 assertKind(elements_kind.fast_smi_only, array);
156 for (var i = 0; i < 3; i++) {
157 array[i] = i + 10;
158 }
159 assertKind(elements_kind.fast_smi_only, array);
160 for (var i = 0; i < 3; i++) {
161 var a = array[i];
162 assertEquals(i + 10, a);
163 }
164 }
165 var smi_only = new Array(1, 2, 3);
166 assertKind(elements_kind.fast_smi_only, smi_only);
167 %PrepareFunctionForOptimization(monomorphic);

Callers 1

test_wrapperFunction · 0.85

Calls 2

assertKindFunction · 0.70
assertEqualsFunction · 0.50

Tested by

no test coverage detected