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

Method load

chapter24/src/test/java/com/seaofnodes/simple/Eval2.java:370–389  ·  view source on GitHub ↗
( LoadNode ld )

Source from the content-addressed store, hash-verified

368 }
369 return ary;
370 }
371
372 int num = type._fields.length;
373 Object[] ptr = new Object[num];
374 for( int i=0; i<num; i++ )
375 ptr[i] = con(type._fields[i]._t.makeZero());
376 return ptr;
377 }
378
379 private static Object load( LoadNode ld ) {
380 Object f = val(ld.ptr());
381 // Check for dense constant array
382 if( f instanceof TypeMemPtr tmp ) {
383 //assert tmp._obj._con != TypeConAry.BOT;
384 //if( ld._name.equals("#") )
385 // return (long)tmp._obj._con.len();
386 //int idx = offToIdx(x(ld.off()),tmp._obj);
387 //return tmp._obj._con.at(idx);
388 throw Utils.TODO();
389 }
390 Object[] fs = (Object[])f;
391 if( ld._name.equals("#") )
392 return (long)fs.length;

Callers 1

computeMethod · 0.95

Calls 9

valMethod · 0.95
TODOMethod · 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