MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / offToIdx

Method offToIdx

chapter24/src/test/java/com/seaofnodes/simple/Eval2.java:335–340  ·  view source on GitHub ↗
( long off, TypeStruct t)

Source from the content-addressed store, hash-verified

333
334 // Convert array size to array element count
335 private static int offToIdx( long off, TypeStruct t) {
336 off -= t.aryBase();
337 int scale = t.aryScale();
338 assert (off & ((1L << scale)-1)) == 0;
339 return (int)(off>>scale);
340 }
341
342 // Builds and returns a pointer Object
343 private static Object alloc(NewNode alloc) {

Callers 3

allocMethod · 0.95
loadMethod · 0.95
storeMethod · 0.95

Calls 2

aryBaseMethod · 0.45
aryScaleMethod · 0.45

Tested by

no test coverage detected