void tos_into_slot ( int d , int n , String id ) { // In a copy-on-modify language, only update the local scope, or return val assert d == 0 || ( d == 1 && _display [ _tod ] == n + 1 ) ; int idx = _display [ _tod - d ] + n ; // Temporary solution to kill a UDF from global name space. Needs to fix in the future. if ( _tod == 0 ) ASTOp . removeUDF ( id ) ; subRef ( _ary [ idx ] , _key [ idx ] ) ; subRef ( _fcn [ idx ] ) ; Frame fr = _ary [ _sp - 1 ] ; _ary [ idx ] = fr == null ? null : addRef ( new Frame ( fr ) ) ; _d [ idx ] = _d [ _sp - 1 ] ; _str [ idx ] = _str [ _sp - 1 ] ; _fcn [ idx ] = addRef ( _fcn [ _sp - 1 ] ) ; _key [ idx ] = d == 0 && fr != null ? id : null ; // Temporary solution to add a UDF to global name space. Needs to fix in the future. if ( _tod == 0 && _fcn [ _sp - 1 ] != null ) ASTOp . putUDF ( _fcn [ _sp - 1 ] , id ) ; assert _ary [ 0 ] == null || check_refcnt ( _ary [ 0 ] . anyVec ( ) ) ; }
Copy from TOS into a slot . Does NOT pop results .