650 } 651 // Memoize this result. 652 if (!is_shared()) { 653 _implementor = impl; 654 } 655 } 656 return impl; 657 } 658 659 ciInstanceKlass* ciInstanceKlass::host_klass() { 660 assert(is_loaded(), "must be loaded"); 661 if (is_anonymous()) { 662 VM_ENTRY_MARK 663 Klass* host_klass = get_instanceKlass()->host_klass(); 664 return CURRENT_ENV->get_instance_klass(host_klass); 665 } 666 return NULL; 667 } 668 669 ciInstanceKlass* ciInstanceKlass::vcc_klass() { 670 InstanceKlass* ik = get_instanceKlass(); 671 if (ik->has_vcc_klass()) { 672 if (_vcc_klass == NULL) { 673 VM_ENTRY_MARK; 674 InstanceKlass* k = InstanceKlass::cast(ik->get_vcc_klass()); 675 _vcc_klass = CURRENT_THREAD_ENV->get_instance_klass(k); 676 } 677 return _vcc_klass; 678 } else { 679 return NULL; 680 } 681 } 682 683 // Utility class for printing of the contents of the static fields for 684 // use by compilation replay. It only prints out the information that 685 // could be consumed by the compiler, so for primitive types it prints 686 // out the actual value. For Strings it's the actual string value. 687 // For array types it it's first level array size since that's the 688 // only value which statically unchangeable. For all other reference 689 // types it simply prints out the dynamic type. 690 691 class StaticFieldPrinter : public FieldClosure { 692 protected: 693 outputStream* _out; 694 public: 695 StaticFieldPrinter(outputStream* out) : 696 _out(out) { 697 } 698 void do_field_helper(fieldDescriptor* fd, oop obj, bool flattened); 699 }; 700 | 650 } 651 // Memoize this result. 652 if (!is_shared()) { 653 _implementor = impl; 654 } 655 } 656 return impl; 657 } 658 659 ciInstanceKlass* ciInstanceKlass::host_klass() { 660 assert(is_loaded(), "must be loaded"); 661 if (is_anonymous()) { 662 VM_ENTRY_MARK 663 Klass* host_klass = get_instanceKlass()->host_klass(); 664 return CURRENT_ENV->get_instance_klass(host_klass); 665 } 666 return NULL; 667 } 668 669 ciInstanceKlass* ciInstanceKlass::vcc_klass() { 670 return NULL; 671 } 672 673 // Utility class for printing of the contents of the static fields for 674 // use by compilation replay. It only prints out the information that 675 // could be consumed by the compiler, so for primitive types it prints 676 // out the actual value. For Strings it's the actual string value. 677 // For array types it it's first level array size since that's the 678 // only value which statically unchangeable. For all other reference 679 // types it simply prints out the dynamic type. 680 681 class StaticFieldPrinter : public FieldClosure { 682 protected: 683 outputStream* _out; 684 public: 685 StaticFieldPrinter(outputStream* out) : 686 _out(out) { 687 } 688 void do_field_helper(fieldDescriptor* fd, oop obj, bool flattened); 689 }; 690 |