comparison src/share/vm/graal/graalCodeInstaller.cpp @ 9891:558c73d8bdc0

Add compressed oops support in comments' copying in CodeInstaller
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Wed, 05 Jun 2013 12:00:36 +0200
parents 4d5872186e76
children 0f7ca53be929 91c16dff3fc1
comparison
equal deleted inserted replaced
9890:f902b6a71670 9891:558c73d8bdc0
477 } 477 }
478 } 478 }
479 479
480 #ifndef PRODUCT 480 #ifndef PRODUCT
481 if (_comments != NULL) { 481 if (_comments != NULL) {
482 oop* comments = (oop*) _comments->base(T_OBJECT); 482 oop comment;
483 for (int i = 0; i < _comments->length(); i++) { 483 for (int i = 0; i < _comments->length(); i++) {
484 oop comment = comments[i]; 484 if(UseCompressedOops) {
485 comment=oopDesc::decode_heap_oop(((narrowOop*) _comments->base(T_OBJECT))[i]);
486 } else {
487 comment=((oop*) (_comments->base(T_OBJECT)))[i];
488 }
485 assert(comment->is_a(HotSpotCompiledCode_Comment::klass()), "cce"); 489 assert(comment->is_a(HotSpotCompiledCode_Comment::klass()), "cce");
486 jint offset = HotSpotCompiledCode_Comment::pcOffset(comment); 490 jint offset = HotSpotCompiledCode_Comment::pcOffset(comment);
487 char* text = java_lang_String::as_utf8_string(HotSpotCompiledCode_Comment::text(comment)); 491 char* text = java_lang_String::as_utf8_string(HotSpotCompiledCode_Comment::text(comment));
488 buffer.block_comment(offset, text); 492 buffer.block_comment(offset, text);
489 } 493 }