Mercurial > hg > truffle
comparison src/share/vm/ci/ciInstanceKlass.cpp @ 1080:7c57aead6d3e
6892658: C2 should optimize some stringbuilder patterns
Reviewed-by: kvn, twisti
author | never |
---|---|
date | Thu, 12 Nov 2009 09:24:21 -0800 |
parents | d1605aabd0a1 |
children | dd57230ba8fe |
comparison
equal
deleted
inserted
replaced
1078:8e7adf982378 | 1080:7c57aead6d3e |
---|---|
339 ciField* field = new (CURRENT_THREAD_ENV->arena()) ciField(&fd); | 339 ciField* field = new (CURRENT_THREAD_ENV->arena()) ciField(&fd); |
340 return field; | 340 return field; |
341 } | 341 } |
342 | 342 |
343 // ------------------------------------------------------------------ | 343 // ------------------------------------------------------------------ |
344 // ciInstanceKlass::get_field_by_name | |
345 ciField* ciInstanceKlass::get_field_by_name(ciSymbol* name, ciSymbol* signature, bool is_static) { | |
346 VM_ENTRY_MARK; | |
347 instanceKlass* k = get_instanceKlass(); | |
348 fieldDescriptor fd; | |
349 klassOop def = k->find_field(name->get_symbolOop(), signature->get_symbolOop(), is_static, &fd); | |
350 if (def == NULL) { | |
351 return NULL; | |
352 } | |
353 ciField* field = new (CURRENT_THREAD_ENV->arena()) ciField(&fd); | |
354 return field; | |
355 } | |
356 | |
357 // ------------------------------------------------------------------ | |
344 // ciInstanceKlass::non_static_fields. | 358 // ciInstanceKlass::non_static_fields. |
345 | 359 |
346 class NonStaticFieldFiller: public FieldClosure { | 360 class NonStaticFieldFiller: public FieldClosure { |
347 GrowableArray<ciField*>* _arr; | 361 GrowableArray<ciField*>* _arr; |
348 ciEnv* _curEnv; | 362 ciEnv* _curEnv; |