< prev index next >

src/hotspot/share/runtime/vframeArray.cpp

Print this page




 474 }
 475 
 476 int vframeArrayElement::on_stack_size(int callee_parameters,
 477                                       int callee_locals,
 478                                       bool is_top_frame,
 479                                       int popframe_extra_stack_expression_els) const {
 480   assert(method()->max_locals() == locals()->size(), "just checking");
 481   int locks = monitors() == NULL ? 0 : monitors()->number_of_monitors();
 482   int temps = expressions()->size();
 483   return Interpreter::size_activation(method()->max_stack(),
 484                                       temps + callee_parameters,
 485                                       popframe_extra_stack_expression_els,
 486                                       locks,
 487                                       callee_parameters,
 488                                       callee_locals,
 489                                       is_top_frame);
 490 }
 491 
 492 
 493 intptr_t* vframeArray::unextended_sp() const {

 494   return _original.unextended_sp();
 495 }
 496 
 497 vframeArray* vframeArray::allocate(JavaThread* thread, int frame_size, GrowableArray<compiledVFrame*>* chunk,
 498                                    RegisterMap *reg_map, frame sender, frame caller, frame self,
 499                                    bool realloc_failures) {
 500 
 501   // Allocate the vframeArray
 502   vframeArray * result = (vframeArray*) AllocateHeap(sizeof(vframeArray) + // fixed part
 503                                                      sizeof(vframeArrayElement) * (chunk->length() - 1), // variable part
 504                                                      mtCompiler);
 505   result->_frames = chunk->length();
 506   result->_owner_thread = thread;
 507   result->_sender = sender;
 508   result->_caller = caller;
 509   result->_original = self;
 510   result->set_unroll_block(NULL); // initialize it
 511   result->fill_in(thread, frame_size, chunk, reg_map, realloc_failures);
 512   return result;
 513 }




 474 }
 475 
 476 int vframeArrayElement::on_stack_size(int callee_parameters,
 477                                       int callee_locals,
 478                                       bool is_top_frame,
 479                                       int popframe_extra_stack_expression_els) const {
 480   assert(method()->max_locals() == locals()->size(), "just checking");
 481   int locks = monitors() == NULL ? 0 : monitors()->number_of_monitors();
 482   int temps = expressions()->size();
 483   return Interpreter::size_activation(method()->max_stack(),
 484                                       temps + callee_parameters,
 485                                       popframe_extra_stack_expression_els,
 486                                       locks,
 487                                       callee_parameters,
 488                                       callee_locals,
 489                                       is_top_frame);
 490 }
 491 
 492 
 493 intptr_t* vframeArray::unextended_sp() const {
 494   assert(owner_thread()->is_in_usable_stack((address) _original.unextended_sp()), INTPTR_FORMAT, p2i(_original.unextended_sp())); 
 495   return _original.unextended_sp();
 496 }
 497 
 498 vframeArray* vframeArray::allocate(JavaThread* thread, int frame_size, GrowableArray<compiledVFrame*>* chunk,
 499                                    RegisterMap *reg_map, frame sender, frame caller, frame self,
 500                                    bool realloc_failures) {
 501 
 502   // Allocate the vframeArray
 503   vframeArray * result = (vframeArray*) AllocateHeap(sizeof(vframeArray) + // fixed part
 504                                                      sizeof(vframeArrayElement) * (chunk->length() - 1), // variable part
 505                                                      mtCompiler);
 506   result->_frames = chunk->length();
 507   result->_owner_thread = thread;
 508   result->_sender = sender;
 509   result->_caller = caller;
 510   result->_original = self;
 511   result->set_unroll_block(NULL); // initialize it
 512   result->fill_in(thread, frame_size, chunk, reg_map, realloc_failures);
 513   return result;
 514 }


< prev index next >