/** * "native" implementation of Class[] VMStackWalker::getClassContext() */ public static void getClassContext(StackFrame frame) { // should be an array ref Heap.HeapReference heapRef = Heap.GetInstance().newArray(ToyVMClassLoader.loadClass("java/lang/Class"),4); ((ArrayList)heapRef.obj).Add(frame.getThis()); ((ArrayList)heapRef.obj).Add(frame.getThis()); ((ArrayList)heapRef.obj).Add(frame.getThis()); // since this is a method call we are just // storing the return value frame.getPrev().pushOperand(heapRef); }