src/share/vm/ci/ciMethodData.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/ci/ciMethodData.cpp Thu Oct 10 15:31:35 2013
--- new/src/share/vm/ci/ciMethodData.cpp Thu Oct 10 15:31:35 2013
*** 135,150 ****
--- 135,155 ----
}
}
void ciTypeStackSlotEntries::translate_type_data_from(const TypeStackSlotEntries* entries) {
! for (int i = 0; i < number_of_arguments(); i++) {
! for (int i = 0; i < _number_of_entries; i++) {
intptr_t k = entries->type(i);
TypeStackSlotEntries::set_type(i, translate_klass(k));
}
}
+ void ciReturnTypeEntry::translate_type_data_from(const ReturnTypeEntry* ret) {
+ intptr_t k = ret->type();
+ set_type(translate_klass(k));
+ }
+
// Get the data at an arbitrary (sort of) data index.
ciProfileData* ciMethodData::data_at(int data_index) {
if (out_of_bounds(data_index)) {
return NULL;
}
*** 311,320 ****
--- 316,339 ----
data->as_VirtualCallTypeData()->set_argument_type(i, k->get_Klass());
}
}
}
+ void ciMethodData::set_return_type(int bci, ciKlass* k) {
+ VM_ENTRY_MARK;
+ MethodData* mdo = get_MethodData();
+ if (mdo != NULL) {
+ ProfileData* data = mdo->bci_to_data(bci);
+ if (data->is_CallTypeData()) {
+ data->as_CallTypeData()->set_return_type(k->get_Klass());
+ } else {
+ assert(data->is_VirtualCallTypeData(), "no arguments!");
+ data->as_VirtualCallTypeData()->set_return_type(k->get_Klass());
+ }
+ }
+ }
+
bool ciMethodData::has_escape_info() {
return eflag_set(MethodData::estimated);
}
void ciMethodData::set_eflag(MethodData::EscapeFlag f) {
*** 515,537 ****
--- 534,570 ----
st->print(" (null seen)");
}
}
void ciTypeStackSlotEntries::print_data_on(outputStream* st) const {
_pd->tab(st, true);
st->print("argument types");
for (int i = 0; i < number_of_arguments(); i++) {
+ for (int i = 0; i < _number_of_entries; i++) {
_pd->tab(st);
st->print("%d: stack (%u) ", i, stack_slot(i));
print_ciklass(st, type(i));
st->cr();
}
}
+ void ciReturnTypeEntry::print_data_on(outputStream* st) const {
+ _pd->tab(st);
+ st->print("ret ");
+ print_ciklass(st, type());
+ st->cr();
+ }
+
void ciCallTypeData::print_data_on(outputStream* st) const {
print_shared(st, "ciCallTypeData");
+ if (has_arguments()) {
+ tab(st, true);
+ st->print("argument types");
args()->print_data_on(st);
+ }
+ if (has_return()) {
+ tab(st, true);
+ st->print("return type");
+ ret()->print_data_on(st);
+ }
}
void ciReceiverTypeData::print_receiver_data_on(outputStream* st) const {
uint row;
int entries = 0;
*** 559,566 ****
--- 592,608 ----
}
void ciVirtualCallTypeData::print_data_on(outputStream* st) const {
print_shared(st, "ciVirtualCallTypeData");
rtd_super()->print_receiver_data_on(st);
+ if (has_arguments()) {
+ tab(st, true);
+ st->print("argument types");
args()->print_data_on(st);
+ }
+ if (has_return()) {
+ tab(st, true);
+ st->print("return type");
+ ret()->print_data_on(st);
+ }
}
#endif
src/share/vm/ci/ciMethodData.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File