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

Method load

chapter21/src/test/java/com/seaofnodes/simple/Eval2.java:350–359  ·  view source on GitHub ↗
( LoadNode ld )

Source from the content-addressed store, hash-verified

348 }
349
350 private static Object load( LoadNode ld ) {
351 TypeMemPtr tmp = (TypeMemPtr)ld.ptr()._type;
352 Object[] fs = (Object[])val(ld.ptr());
353 if( ld._name.equals("#") )
354 return (long)fs.length;
355 int idx = tmp._obj.isAry()
356 ? offToIdx(x(ld.off()),tmp._obj)
357 : tmp._obj.find(ld._name);
358 return fs[idx];
359 }
360
361 private static Object store( StoreNode st ) {
362 if( st._name.equals("#") )

Callers 1

computeMethod · 0.95

Calls 8

valMethod · 0.95
offToIdxMethod · 0.95
xMethod · 0.95
ptrMethod · 0.45
equalsMethod · 0.45
isAryMethod · 0.45
offMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected