< prev index next >

src/hotspot/share/runtime/frame.cpp

Print this page

1422       int sizeargs = m->size_of_parameters();
1423 
1424       BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, sizeargs);
1425       VMRegPair* regs   = NEW_RESOURCE_ARRAY(VMRegPair, sizeargs);
1426       {
1427         int sig_index = 0;
1428         if (!m->is_static()) {
1429           sig_bt[sig_index++] = T_OBJECT; // 'this'
1430         }
1431         for (SignatureStream ss(m->signature()); !ss.at_return_type(); ss.next()) {
1432           BasicType t = ss.type();
1433           assert(type2size[t] == 1 || type2size[t] == 2, "size is 1 or 2");
1434           sig_bt[sig_index++] = t;
1435           if (type2size[t] == 2) {
1436             sig_bt[sig_index++] = T_VOID;
1437           }
1438         }
1439         assert(sig_index == sizeargs, "");
1440       }
1441       int stack_arg_slots = SharedRuntime::java_calling_convention(sig_bt, regs, sizeargs);
1442       assert(stack_arg_slots ==  m->num_stack_arg_slots(), "");
1443       int out_preserve = SharedRuntime::out_preserve_stack_slots();
1444       int sig_index = 0;
1445       int arg_index = (m->is_static() ? 0 : -1);
1446       for (SignatureStream ss(m->signature()); !ss.at_return_type(); ) {
1447         bool at_this = (arg_index == -1);
1448         bool at_old_sp = false;
1449         BasicType t = (at_this ? T_OBJECT : ss.type());
1450         assert(t == sig_bt[sig_index], "sigs in sync");
1451         VMReg fst = regs[sig_index].first();
1452         if (fst->is_stack()) {
1453           assert(((int)fst->reg2stack()) >= 0, "reg2stack: " INTPTR_FORMAT, fst->reg2stack());
1454           int offset = (fst->reg2stack() + out_preserve) * VMRegImpl::stack_slot_size + stack_slot_offset;
1455           intptr_t* stack_address = (intptr_t*)((address)unextended_sp() + offset);
1456           if (at_this) {
1457             values.describe(frame_no, stack_address, err_msg("this for #%d", frame_no), 1);
1458           } else {
1459             values.describe(frame_no, stack_address, err_msg("param %d %s for #%d", arg_index, type2name(t), frame_no), 1);
1460           }
1461         }
1462         sig_index += type2size[t];

1422       int sizeargs = m->size_of_parameters();
1423 
1424       BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, sizeargs);
1425       VMRegPair* regs   = NEW_RESOURCE_ARRAY(VMRegPair, sizeargs);
1426       {
1427         int sig_index = 0;
1428         if (!m->is_static()) {
1429           sig_bt[sig_index++] = T_OBJECT; // 'this'
1430         }
1431         for (SignatureStream ss(m->signature()); !ss.at_return_type(); ss.next()) {
1432           BasicType t = ss.type();
1433           assert(type2size[t] == 1 || type2size[t] == 2, "size is 1 or 2");
1434           sig_bt[sig_index++] = t;
1435           if (type2size[t] == 2) {
1436             sig_bt[sig_index++] = T_VOID;
1437           }
1438         }
1439         assert(sig_index == sizeargs, "");
1440       }
1441       int stack_arg_slots = SharedRuntime::java_calling_convention(sig_bt, regs, sizeargs);
1442       assert(stack_arg_slots ==  m->num_stack_arg_slots(false /* rounded */), "");
1443       int out_preserve = SharedRuntime::out_preserve_stack_slots();
1444       int sig_index = 0;
1445       int arg_index = (m->is_static() ? 0 : -1);
1446       for (SignatureStream ss(m->signature()); !ss.at_return_type(); ) {
1447         bool at_this = (arg_index == -1);
1448         bool at_old_sp = false;
1449         BasicType t = (at_this ? T_OBJECT : ss.type());
1450         assert(t == sig_bt[sig_index], "sigs in sync");
1451         VMReg fst = regs[sig_index].first();
1452         if (fst->is_stack()) {
1453           assert(((int)fst->reg2stack()) >= 0, "reg2stack: " INTPTR_FORMAT, fst->reg2stack());
1454           int offset = (fst->reg2stack() + out_preserve) * VMRegImpl::stack_slot_size + stack_slot_offset;
1455           intptr_t* stack_address = (intptr_t*)((address)unextended_sp() + offset);
1456           if (at_this) {
1457             values.describe(frame_no, stack_address, err_msg("this for #%d", frame_no), 1);
1458           } else {
1459             values.describe(frame_no, stack_address, err_msg("param %d %s for #%d", arg_index, type2name(t), frame_no), 1);
1460           }
1461         }
1462         sig_index += type2size[t];
< prev index next >