comparison src/share/vm/runtime/vframeArray.cpp @ 3464:be4ca325525a

Merge.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Jul 2011 17:32:44 -0700
parents 5ca1332171c8 3d2ab563047a
children 3dbcd1013cc8
comparison
equal deleted inserted replaced
3239:7c4b4daac19b 3464:be4ca325525a
162 } 162 }
163 } 163 }
164 164
165 int unpack_counter = 0; 165 int unpack_counter = 0;
166 166
167 void vframeArrayElement::unpack_on_stack(int callee_parameters, 167 void vframeArrayElement::unpack_on_stack(int caller_actual_parameters,
168 int callee_parameters,
168 int callee_locals, 169 int callee_locals,
169 frame* caller, 170 frame* caller,
170 bool is_top_frame, 171 bool is_top_frame,
171 int exec_mode) { 172 int exec_mode) {
172 JavaThread* thread = (JavaThread*) Thread::current(); 173 JavaThread* thread = (JavaThread*) Thread::current();
278 279
279 Interpreter::layout_activation(method(), 280 Interpreter::layout_activation(method(),
280 temps + callee_parameters, 281 temps + callee_parameters,
281 popframe_preserved_args_size_in_words, 282 popframe_preserved_args_size_in_words,
282 locks, 283 locks,
284 caller_actual_parameters,
283 callee_parameters, 285 callee_parameters,
284 callee_locals, 286 callee_locals,
285 caller, 287 caller,
286 iframe(), 288 iframe(),
287 is_top_frame); 289 is_top_frame);
458 460
459 _locals = _expressions = NULL; 461 _locals = _expressions = NULL;
460 462
461 } 463 }
462 464
463 int vframeArrayElement::on_stack_size(int callee_parameters, 465 int vframeArrayElement::on_stack_size(int caller_actual_parameters,
466 int callee_parameters,
464 int callee_locals, 467 int callee_locals,
465 bool is_top_frame, 468 bool is_top_frame,
466 int popframe_extra_stack_expression_els) const { 469 int popframe_extra_stack_expression_els) const {
467 assert(method()->max_locals() == locals()->size(), "just checking"); 470 assert(method()->max_locals() == locals()->size(), "just checking");
468 int locks = monitors() == NULL ? 0 : monitors()->number_of_monitors(); 471 int locks = monitors() == NULL ? 0 : monitors()->number_of_monitors();
469 int temps = expressions()->size(); 472 int temps = expressions()->size();
470 return Interpreter::size_activation(method(), 473 return Interpreter::size_activation(method(),
471 temps + callee_parameters, 474 temps + callee_parameters,
472 popframe_extra_stack_expression_els, 475 popframe_extra_stack_expression_els,
473 locks, 476 locks,
477 caller_actual_parameters,
474 callee_parameters, 478 callee_parameters,
475 callee_locals, 479 callee_locals,
476 is_top_frame); 480 is_top_frame);
477 } 481 }
478 482
539 } 543 }
540 } 544 }
541 } 545 }
542 } 546 }
543 547
544 void vframeArray::unpack_to_stack(frame &unpack_frame, int exec_mode) { 548 void vframeArray::unpack_to_stack(frame &unpack_frame, int exec_mode, int caller_actual_parameters) {
545 // stack picture 549 // stack picture
546 // unpack_frame 550 // unpack_frame
547 // [new interpreter frames ] (frames are skeletal but walkable) 551 // [new interpreter frames ] (frames are skeletal but walkable)
548 // caller_frame 552 // caller_frame
549 // 553 //
568 // Unpack the frames from the oldest (frames() -1) to the youngest (0) 572 // Unpack the frames from the oldest (frames() -1) to the youngest (0)
569 573
570 for (index = frames() - 1; index >= 0 ; index--) { 574 for (index = frames() - 1; index >= 0 ; index--) {
571 int callee_parameters = index == 0 ? 0 : element(index-1)->method()->size_of_parameters(); 575 int callee_parameters = index == 0 ? 0 : element(index-1)->method()->size_of_parameters();
572 int callee_locals = index == 0 ? 0 : element(index-1)->method()->max_locals(); 576 int callee_locals = index == 0 ? 0 : element(index-1)->method()->max_locals();
573 element(index)->unpack_on_stack(callee_parameters, 577 element(index)->unpack_on_stack(caller_actual_parameters,
578 callee_parameters,
574 callee_locals, 579 callee_locals,
575 &caller_frame, 580 &caller_frame,
576 index == 0, 581 index == 0,
577 exec_mode); 582 exec_mode);
578 if (index == frames() - 1) { 583 if (index == frames() - 1) {
579 Deoptimization::unwind_callee_save_values(element(index)->iframe(), this); 584 Deoptimization::unwind_callee_save_values(element(index)->iframe(), this);
580 } 585 }
581 caller_frame = *element(index)->iframe(); 586 caller_frame = *element(index)->iframe();
587 caller_actual_parameters = callee_parameters;
582 } 588 }
583 589
584 590
585 deallocate_monitor_chunks(); 591 deallocate_monitor_chunks();
586 } 592 }