private RValue [ ] packReturns ( CallStack frame , Decl . Callable decl ) { if ( decl instanceof Decl . Property ) { return new RValue [ ] { RValue . True } ; } else { Tuple < Decl . Variable > returns = decl . getReturns ( ) ; RValue [ ] values = new RValue [ returns . size ( ) ] ; for ( int i = 0 ; i != values . length ; ++ i ) { values [ i ] = frame . getLocal ( returns . get ( i ) . getName ( ) ) ; } return values ; } }
Given an execution frame extract the return values from a given function or method . The parameters of the function or method are located first in the frame followed by the return values .