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

Function getInsertionIndex

test/fixtures/snapshot/typescript.js:146937–146944  ·  view source on GitHub ↗
(indexBitmap, maskPosition)

Source from the content-addressed store, hash-verified

146935 constructionState[rulesBucketIndex] = increaseInsertionIndex(state, position);
146936 }
146937 function getInsertionIndex(indexBitmap, maskPosition) {
146938 var index = 0;
146939 for (var pos = 0; pos <= maskPosition; pos += maskBitSize) {
146940 index += indexBitmap & mask;
146941 indexBitmap >>= maskBitSize;
146942 }
146943 return index;
146944 }
146945 function increaseInsertionIndex(indexBitmap, maskPosition) {
146946 var value = ((indexBitmap >> maskPosition) & mask) + 1;
146947 ts.Debug.assert((value & mask) === value, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules.");

Callers 1

addRuleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected