* fail if clear is not called before
*/
public void clear() {
if (stateStack.size()>1) {
int size = stateStack.size()-1;
throw new GroovyBugError("the compile stack contains "+size+" more push instruction"+(size==1?"":"s")+" than pops.");
}
if (lhsStack.size()>1) {
int size = lhsStack.size()-1;
throw new GroovyBugError("lhs stack is supposed to be empty, but has " +
size + " elements left.");
}
if (implicitThisStack.size()>1) {
int size = implicitThisStack.size()-1;
throw new GroovyBugError("implicit 'this' stack is supposed to be empty, but has " +
size + " elements left.");
}
clear = true;
MethodVisitor mv = controller.getMethodVisitor();
// br experiment with local var table so debuggers can retrieve variable names