comparison c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/HotSpotSignature.java @ 2284:569d3fe7d65c

non-static VMEntries and VMExits, CompilationServer simplifications
author Lukas Stadler <lukas.stadler@jku.at>
date Thu, 07 Apr 2011 15:32:25 +0200
parents 3c0a889a176b
children
comparison
equal deleted inserted replaced
2282:0309d394eb5f 2284:569d3fe7d65c
36 private final String returnType; 36 private final String returnType;
37 private final String originalString; 37 private final String originalString;
38 private RiType[] argumentTypes; 38 private RiType[] argumentTypes;
39 private RiType returnTypeCache; 39 private RiType returnTypeCache;
40 40
41 public HotSpotSignature(String signature) { 41 public HotSpotSignature(Compiler compiler, String signature) {
42 super(compiler);
42 assert signature.length() > 0; 43 assert signature.length() > 0;
43 this.originalString = signature; 44 this.originalString = signature;
44 45
45 if (signature.charAt(0) == '(') { 46 if (signature.charAt(0) == '(') {
46 int cur = 1; 47 int cur = 1;
114 if (argumentTypes == null) { 115 if (argumentTypes == null) {
115 argumentTypes = new RiType[arguments.size()]; 116 argumentTypes = new RiType[arguments.size()];
116 } 117 }
117 RiType type = argumentTypes[index]; 118 RiType type = argumentTypes[index];
118 if (type == null) { 119 if (type == null) {
119 type = Compiler.getVMEntries().RiSignature_lookupType(arguments.get(index), (HotSpotTypeResolved) accessingClass); 120 type = compiler.getVMEntries().RiSignature_lookupType(arguments.get(index), (HotSpotTypeResolved) accessingClass);
120 argumentTypes[index] = type; 121 argumentTypes[index] = type;
121 } 122 }
122 return type; 123 return type;
123 } 124 }
124 125
133 } 134 }
134 135
135 @Override 136 @Override
136 public RiType returnType(RiType accessingClass) { 137 public RiType returnType(RiType accessingClass) {
137 if (returnTypeCache == null) { 138 if (returnTypeCache == null) {
138 returnTypeCache = Compiler.getVMEntries().RiSignature_lookupType(returnType, (HotSpotTypeResolved) accessingClass); 139 returnTypeCache = compiler.getVMEntries().RiSignature_lookupType(returnType, (HotSpotTypeResolved) accessingClass);
139 } 140 }
140 return returnTypeCache; 141 return returnTypeCache;
141 } 142 }
142 143
143 @Override 144 @Override