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

Method ret

chapter22/src/test/java/com/seaofnodes/simple/Eval2.java:222–232  ·  view source on GitHub ↗
( ReturnNode ret )

Source from the content-addressed store, hash-verified

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