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

public Frame copy ( ) { Frame frame = new Frame ( locals . length , stack . length ) ; System . arraycopy ( locals , 0 , frame . locals , 0 , locals . length ) ; System . arraycopy ( stack , 0 , frame . stack , 0 , stack . length ) ; frame . top = top ; return frame ; }
makes a shallow copy of this frame , i . e . the type instances will remain the same .
