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

Method ret

chapter24/src/test/java/com/seaofnodes/simple/Eval2.java:224–234  ·  view source on GitHub ↗
( ReturnNode ret )

Source from the content-addressed store, hash-verified

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