Mercurial > hg > truffle
comparison src/share/vm/oops/instanceKlass.cpp @ 8860:46f6f063b272
7153771: array bound check elimination for c1
Summary: when possible optimize out array bound checks, inserting predicates when needed.
Reviewed-by: never, kvn, twisti
Contributed-by: thomaswue <thomas.wuerthinger@oracle.com>
author | roland |
---|---|
date | Thu, 21 Mar 2013 09:27:54 +0100 |
parents | c8b31b461e1a |
children | b9a918201d47 8be1318fbe77 |
comparison
equal
deleted
inserted
replaced
8780:98f3af397705 | 8860:46f6f063b272 |
---|---|
2226 } | 2226 } |
2227 } | 2227 } |
2228 } | 2228 } |
2229 | 2229 |
2230 void InstanceKlass::clean_method_data(BoolObjectClosure* is_alive) { | 2230 void InstanceKlass::clean_method_data(BoolObjectClosure* is_alive) { |
2231 #ifdef COMPILER2 | |
2232 // Currently only used by C2. | |
2233 for (int m = 0; m < methods()->length(); m++) { | 2231 for (int m = 0; m < methods()->length(); m++) { |
2234 MethodData* mdo = methods()->at(m)->method_data(); | 2232 MethodData* mdo = methods()->at(m)->method_data(); |
2235 if (mdo != NULL) { | 2233 if (mdo != NULL) { |
2236 for (ProfileData* data = mdo->first_data(); | 2234 for (ProfileData* data = mdo->first_data(); |
2237 mdo->is_valid(data); | 2235 mdo->is_valid(data); |
2238 data = mdo->next_data(data)) { | 2236 data = mdo->next_data(data)) { |
2239 data->clean_weak_klass_links(is_alive); | 2237 data->clean_weak_klass_links(is_alive); |
2240 } | 2238 } |
2241 } | 2239 } |
2242 } | 2240 } |
2243 #else | |
2244 #ifdef ASSERT | |
2245 // Verify that we haven't started to use MDOs for C1. | |
2246 for (int m = 0; m < methods()->length(); m++) { | |
2247 MethodData* mdo = methods()->at(m)->method_data(); | |
2248 assert(mdo == NULL, "Didn't expect C1 to use MDOs"); | |
2249 } | |
2250 #endif // ASSERT | |
2251 #endif // !COMPILER2 | |
2252 } | 2241 } |
2253 | 2242 |
2254 | 2243 |
2255 static void remove_unshareable_in_class(Klass* k) { | 2244 static void remove_unshareable_in_class(Klass* k) { |
2256 // remove klass's unshareable info | 2245 // remove klass's unshareable info |