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

Method ret

chapter18/src/test/java/com/seaofnodes/simple/Eval2.java:221–231  ·  view source on GitHub ↗
( ReturnNode ret )

Source from the content-addressed store, hash-verified

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