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

Method typeAry

chapter15/src/main/java/com/seaofnodes/simple/Parser.java:529–541  ·  view source on GitHub ↗
( Type t )

Source from the content-addressed store, hash-verified

527
528 // Make an array type of t
529 private TypeMemPtr typeAry( Type t ) {
530 if( t instanceof TypeMemPtr tmp && !tmp._nil )
531 throw error("Arrays of reference types must always be nullable");
532 String tname = t.str()+"[]";
533 Type ta = TYPES.get(tname);
534 if( ta != null ) return (TypeMemPtr)ta;
535 // Need make an array type.
536 TypeStruct ts = TypeStruct.makeAry(TypeInteger.BOT,ALIAS++,t,ALIAS++);
537 TypeMemPtr tary = TypeMemPtr.make(ts);
538 TYPES.put(tname,tary);
539 START.addMemProj(ts, _scope); // Insert memory alias edges
540 return tary;
541 }
542
543
544 /**

Callers 2

typeMethod · 0.95
parsePrimaryMethod · 0.95

Calls 7

errorMethod · 0.95
makeAryMethod · 0.95
makeMethod · 0.95
strMethod · 0.45
getMethod · 0.45
putMethod · 0.45
addMemProjMethod · 0.45

Tested by

no test coverage detected