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

Method ret

chapter21/src/test/java/com/seaofnodes/simple/Eval2.java:223–233  ·  view source on GitHub ↗
( ReturnNode ret )

Source from the content-addressed store, hash-verified

221 }
222
223 private static CFGNode ret( ReturnNode ret ) {
224 // Fetch return expression value and continuation from current frame
225 Object rez = val(ret.expr());
226 Closure cont = clj(ret.rpc());
227 // Lower Frame reference count; might delete frame
228 F.dec(); // Lower ref count
229 // Install replacement Frame; set return result over the CallEnd
230 F = cont._frame;
231 F.put0(cont._cc,rez); // Set return value into CallEnd
232 return cont._cc; // Return CallEnd as the new control
233 }
234
235 private static String exit( ReturnNode ret ) {
236 return prettyPrint(ret.expr()._type,val(ret.expr()));

Callers 1

evalMethod · 0.95

Calls 6

valMethod · 0.95
cljMethod · 0.95
exprMethod · 0.45
rpcMethod · 0.45
decMethod · 0.45
put0Method · 0.45

Tested by

no test coverage detected