class FrameInfo

pri TopOpStack : OpStackList;

pri PC : bytecode;

pri currentClass : ClassInfo;

pri fstlocal : LocalList;

pri currentMethod : MethodInfo;

meth GetTopOpStack =^ (res f: OpStackList ·

f:= TopOpStack;

)

end

meth SetTopOpStack =^ (val f: OpStackList ·

TopOpStack:= f;

)

end

meth SetcurrentClass =^ ( val c: ClassInfo ·

currentClass:= c;

)

end

meth GetcurrentClass =^ ( res c: ClassInfo ·

c:= currentClass;

)

end

meth GetfstLocal =^ (res f: LocalList ·

f:= fstLocal;

)

end

meth SetfstLocal =^ (val f: LocalList ·

fstLocal:= f;

)

end

meth SetcurrentMethod =^ ( val m: MethodInfo ·

currentMethod:= m;

)

end

meth GetcurrentMethod =^ ( res m: MethodInfo ·

m:= currentMethod;

)

end

meth GetPC =^ (res b: Bytecode ·

b:= PC;

)

end

meth SetPC =^ (val b: Bytecode ·

PC:= b;

)

end

meth IncPC =^ ( ·

if [] PC <> null ® PC.GetNext(PC);

fi

)

end

meth Push =^ ( val D: Object ·

var NewItem: OpStackList ·

NewItem:= New OpStackList;

NewItem.SetData(D);

NewItem.SetNext(TopOpStack);

TopOpStack := NewItem;

end

)

end

meth Pop =^ ( res D: Object ·

TopOpStack.GetData(D);

TopOpStack.GetNext(TopOpStack);

)

end

 

meth GetLocal =^ (val count: Int;

res d: object ·

FstLocal.GetLocal(count, d);

)

end

meth PutLocal =^ (val count: Int;

val d: object ·

FstLocal.PutLocal(FstLocal, count, d);

)

end

meth AppendLocal =^ (val d: object ·

if [] FstLocal = null ®

FstLocal:= New LocalList;

FstLocal.SetData(d)

[] FstLocal <> null ®

FstLocal.AppendLocal(FstLocal, d);

fi

)

end

 

meth Branch =^ ( val BranchOffset: Int ·

PC.Branch(PC, BranchOffSet);

)

end

meth FindCPList =^ (val index: Int; res entry : CPList ·

currentClass.FindCPList(index, entry);

)

end

 

end