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

Method load

chapter19/src/test/java/com/seaofnodes/simple/Eval2.java:348–357  ·  view source on GitHub ↗
( LoadNode ld )

Source from the content-addressed store, hash-verified

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