src/cpu/x86/vm/templateInterpreter_x86_32.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6893081 Sdiff src/cpu/x86/vm

src/cpu/x86/vm/templateInterpreter_x86_32.cpp

Print this page
rev 1081 : imported patch indy-cleanup-6893081.patch


1471 
1472   // fixed size of an interpreter frame:
1473   int max_locals = method->max_locals() * Interpreter::stackElementWords();
1474   int extra_locals = (method->max_locals() - method->size_of_parameters()) *
1475                      Interpreter::stackElementWords();
1476 
1477   int overhead = frame::sender_sp_offset - frame::interpreter_frame_initial_sp_offset;
1478 
1479   // Our locals were accounted for by the caller (or last_frame_adjust on the transistion)
1480   // Since the callee parameters already account for the callee's params we only need to account for
1481   // the extra locals.
1482 
1483 
1484   int size = overhead +
1485          ((callee_locals - callee_param_count)*Interpreter::stackElementWords()) +
1486          (moncount*frame::interpreter_frame_monitor_size()) +
1487          tempcount*Interpreter::stackElementWords() + popframe_extra_args;
1488 
1489   if (interpreter_frame != NULL) {
1490 #ifdef ASSERT



1491     assert(caller->unextended_sp() == interpreter_frame->interpreter_frame_sender_sp(), "Frame not properly walkable");
1492     assert(caller->sp() == interpreter_frame->sender_sp(), "Frame not properly walkable(2)");
1493 #endif
1494 
1495     interpreter_frame->interpreter_frame_set_method(method);
1496     // NOTE the difference in using sender_sp and interpreter_frame_sender_sp
1497     // interpreter_frame_sender_sp is the original sp of the caller (the unextended_sp)
1498     // and sender_sp is fp+8
1499     intptr_t* locals = interpreter_frame->sender_sp() + max_locals - 1;
1500 
1501     interpreter_frame->interpreter_frame_set_locals(locals);
1502     BasicObjectLock* montop = interpreter_frame->interpreter_frame_monitor_begin();
1503     BasicObjectLock* monbot = montop - moncount;
1504     interpreter_frame->interpreter_frame_set_monitor_end(monbot);
1505 
1506     // Set last_sp
1507     intptr_t*  rsp = (intptr_t*) monbot  -
1508                      tempcount*Interpreter::stackElementWords() -
1509                      popframe_extra_args;
1510     interpreter_frame->interpreter_frame_set_last_sp(rsp);




1471 
1472   // fixed size of an interpreter frame:
1473   int max_locals = method->max_locals() * Interpreter::stackElementWords();
1474   int extra_locals = (method->max_locals() - method->size_of_parameters()) *
1475                      Interpreter::stackElementWords();
1476 
1477   int overhead = frame::sender_sp_offset - frame::interpreter_frame_initial_sp_offset;
1478 
1479   // Our locals were accounted for by the caller (or last_frame_adjust on the transistion)
1480   // Since the callee parameters already account for the callee's params we only need to account for
1481   // the extra locals.
1482 
1483 
1484   int size = overhead +
1485          ((callee_locals - callee_param_count)*Interpreter::stackElementWords()) +
1486          (moncount*frame::interpreter_frame_monitor_size()) +
1487          tempcount*Interpreter::stackElementWords() + popframe_extra_args;
1488 
1489   if (interpreter_frame != NULL) {
1490 #ifdef ASSERT
1491     if (!EnableMethodHandles)
1492       // @@@ FIXME: Should we correct interpreter_frame_sender_sp in the calling sequences?
1493       // Probably, since deoptimization doesn't work yet.
1494       assert(caller->unextended_sp() == interpreter_frame->interpreter_frame_sender_sp(), "Frame not properly walkable");
1495     assert(caller->sp() == interpreter_frame->sender_sp(), "Frame not properly walkable(2)");
1496 #endif
1497 
1498     interpreter_frame->interpreter_frame_set_method(method);
1499     // NOTE the difference in using sender_sp and interpreter_frame_sender_sp
1500     // interpreter_frame_sender_sp is the original sp of the caller (the unextended_sp)
1501     // and sender_sp is fp+8
1502     intptr_t* locals = interpreter_frame->sender_sp() + max_locals - 1;
1503 
1504     interpreter_frame->interpreter_frame_set_locals(locals);
1505     BasicObjectLock* montop = interpreter_frame->interpreter_frame_monitor_begin();
1506     BasicObjectLock* monbot = montop - moncount;
1507     interpreter_frame->interpreter_frame_set_monitor_end(monbot);
1508 
1509     // Set last_sp
1510     intptr_t*  rsp = (intptr_t*) monbot  -
1511                      tempcount*Interpreter::stackElementWords() -
1512                      popframe_extra_args;
1513     interpreter_frame->interpreter_frame_set_last_sp(rsp);


src/cpu/x86/vm/templateInterpreter_x86_32.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File