Mercurial > hg > truffle
comparison src/share/vm/ci/ciMethodData.hpp @ 12966:b2ee5dc63353
8024070: C2 needs some form of type speculation
Summary: record unused type profile information with type system, propagate and use it.
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Wed, 23 Oct 2013 12:40:23 +0200 |
parents | 5ccbab1c69f3 |
children | 6e1826d5c23e |
comparison
equal
deleted
inserted
replaced
12965:8b4bbba322d3 | 12966:b2ee5dc63353 |
---|---|
98 | 98 |
99 ciKlass* valid_type(int i) const { | 99 ciKlass* valid_type(int i) const { |
100 return valid_ciklass(type(i)); | 100 return valid_ciklass(type(i)); |
101 } | 101 } |
102 | 102 |
103 bool maybe_null(int i) const { | |
104 return was_null_seen(type(i)); | |
105 } | |
106 | |
103 #ifndef PRODUCT | 107 #ifndef PRODUCT |
104 void print_data_on(outputStream* st) const; | 108 void print_data_on(outputStream* st) const; |
105 #endif | 109 #endif |
106 }; | 110 }; |
107 | 111 |
109 public: | 113 public: |
110 void translate_type_data_from(const ReturnTypeEntry* ret); | 114 void translate_type_data_from(const ReturnTypeEntry* ret); |
111 | 115 |
112 ciKlass* valid_type() const { | 116 ciKlass* valid_type() const { |
113 return valid_ciklass(type()); | 117 return valid_ciklass(type()); |
118 } | |
119 | |
120 bool maybe_null() const { | |
121 return was_null_seen(type()); | |
114 } | 122 } |
115 | 123 |
116 #ifndef PRODUCT | 124 #ifndef PRODUCT |
117 void print_data_on(outputStream* st) const; | 125 void print_data_on(outputStream* st) const; |
118 #endif | 126 #endif |
150 } | 158 } |
151 | 159 |
152 ciKlass* valid_return_type() const { | 160 ciKlass* valid_return_type() const { |
153 assert(has_return(), "no ret type profiling data"); | 161 assert(has_return(), "no ret type profiling data"); |
154 return ret()->valid_type(); | 162 return ret()->valid_type(); |
163 } | |
164 | |
165 bool argument_maybe_null(int i) const { | |
166 return args()->maybe_null(i); | |
167 } | |
168 | |
169 bool return_maybe_null() const { | |
170 return ret()->maybe_null(); | |
155 } | 171 } |
156 | 172 |
157 #ifndef PRODUCT | 173 #ifndef PRODUCT |
158 void print_data_on(outputStream* st) const; | 174 void print_data_on(outputStream* st) const; |
159 #endif | 175 #endif |
258 ciKlass* valid_return_type() const { | 274 ciKlass* valid_return_type() const { |
259 assert(has_return(), "no ret type profiling data"); | 275 assert(has_return(), "no ret type profiling data"); |
260 return ret()->valid_type(); | 276 return ret()->valid_type(); |
261 } | 277 } |
262 | 278 |
279 bool argument_maybe_null(int i) const { | |
280 return args()->maybe_null(i); | |
281 } | |
282 | |
283 bool return_maybe_null() const { | |
284 return ret()->maybe_null(); | |
285 } | |
286 | |
263 #ifndef PRODUCT | 287 #ifndef PRODUCT |
264 void print_data_on(outputStream* st) const; | 288 void print_data_on(outputStream* st) const; |
265 #endif | 289 #endif |
266 }; | 290 }; |
267 | 291 |
301 | 325 |
302 ciTypeStackSlotEntries* parameters() const { return (ciTypeStackSlotEntries*)ParametersTypeData::parameters(); } | 326 ciTypeStackSlotEntries* parameters() const { return (ciTypeStackSlotEntries*)ParametersTypeData::parameters(); } |
303 | 327 |
304 ciKlass* valid_parameter_type(int i) const { | 328 ciKlass* valid_parameter_type(int i) const { |
305 return parameters()->valid_type(i); | 329 return parameters()->valid_type(i); |
330 } | |
331 | |
332 bool parameter_maybe_null(int i) const { | |
333 return parameters()->maybe_null(i); | |
306 } | 334 } |
307 | 335 |
308 #ifndef PRODUCT | 336 #ifndef PRODUCT |
309 void print_data_on(outputStream* st) const; | 337 void print_data_on(outputStream* st) const; |
310 #endif | 338 #endif |