public Frame copyStack(){
  Frame frame=new Frame(locals.length,stack.length);
  System.arraycopy(stack,0,frame.stack,0,stack.length);
  frame.top=top;
  return frame;
}

public Frame copyStack ( ) { Frame frame = new Frame ( locals . length , stack . length ) ; System . arraycopy ( stack , 0 , frame . stack , 0 , stack . length ) ; frame . top = top ; return frame ; }
makes a shallow copy of the stack portion of this frame . the local variable table size will be copied , but its contents will be empty .
