5 public class ParamsObject {
6 private Vector pointerparams;
7 private Vector primitiveparams;
8 private MethodDescriptor method;
10 private Hashtable paramtotemp;
11 private Hashtable temptostore;
14 public ParamsObject(MethodDescriptor md, int tag) {
15 pointerparams=new Vector();
16 primitiveparams=new Vector();
17 paramtotemp=new Hashtable();
18 temptostore=new Hashtable();
28 public void addPtr(TempDescriptor t) {
29 Position p=new Position(true, pointerparams.size());
31 paramtotemp.put(new Integer(count++), t);
35 public boolean isParamPtr(TempDescriptor t) {
36 if (containsTemp(t)) {
37 ParamsObject.Position p=(ParamsObject.Position)temptostore.get(t);
43 public boolean isParamPrim(TempDescriptor t) {
44 if (containsTemp(t)) {
45 ParamsObject.Position p=(ParamsObject.Position)temptostore.get(t);
51 public boolean containsTemp(TempDescriptor t) {
52 return temptostore.containsKey(t);
55 public void addPrim(TempDescriptor t) {
56 Position p=new Position(false, primitiveparams.size());
57 primitiveparams.add(t);
58 paramtotemp.put(new Integer(count++), t);
63 return pointerparams.size();
66 TempDescriptor getPointer(int i) {
67 return (TempDescriptor) pointerparams.get(i);
70 return primitiveparams.size();
73 TempDescriptor getPrimitive(int i) {
74 return (TempDescriptor) primitiveparams.get(i);
76 static class Position {
79 Position(boolean inStruct, int position) {
80 this.inStruct=inStruct;
81 this.position=position;