/* Sun-$Revision: 23.5 $ */ /* Copyright 1992-9 Sun Microsystems, Inc. and Stanford University. See the LICENSE file for license information. */ # pragma interface class ByteCodePositionTable: public AbstractByteCode { public: // instance variables objVectorOop positions; fint codeIndex; fint maxCodeIndex; // constructor ByteCodePositionTable() : AbstractByteCode() { maxCodeIndex = 50; codeIndex = 0; positions= Memory->objVectorObj->cloneSize(maxCodeIndex); } oop Finish() { if (!ResolveBranches()) return ErrorCodes::general_prim_error(errorMessage); return positions->cloneSize(codeIndex); } // helpers bool isPositionTable() { return true; } void GenCode(fint offset, fint length, fint c); fint bci() { return codeIndex; } // preserve operation void oops_do(oopsDoFn f) { AbstractByteCode::oops_do(f); (*f)((oop*)&positions); } };