hotspot/src/share/vm/runtime/vframe.cpp
changeset 23867 f144d430b1cf
parent 22234 da823d78ad65
child 24424 2658d7834c6e
equal deleted inserted replaced
23866:42d397967053 23867:f144d430b1cf
   319       *addr = sv->get_int();
   319       *addr = sv->get_int();
   320     }
   320     }
   321   }
   321   }
   322 }
   322 }
   323 
   323 
   324 StackValueCollection*  interpretedVFrame::expressions() const {
   324 StackValueCollection* interpretedVFrame::expressions() const {
   325   int length = fr().interpreter_frame_expression_stack_size();
   325 
   326   if (method()->is_native()) {
   326   InterpreterOopMap oop_mask;
   327     // If the method is native, there is no expression stack
   327 
   328     length = 0;
   328   if (!method()->is_native()) {
       
   329     // Get oopmap describing oops and int for current bci
       
   330     if (TraceDeoptimization && Verbose) {
       
   331       methodHandle m_h(method());
       
   332       OopMapCache::compute_one_oop_map(m_h, bci(), &oop_mask);
       
   333     } else {
       
   334       method()->mask_for(bci(), &oop_mask);
       
   335     }
       
   336   }
       
   337 
       
   338   // If the bci is a call instruction, i.e. any of the invoke* instructions,
       
   339   // the InterpreterOopMap does not include expression/operand stack liveness
       
   340   // info in the oop_mask/bit_mask. This can lead to a discrepancy of what
       
   341   // is actually on the expression stack compared to what is given by the
       
   342   // oop_map. We need to use the length reported in the oop_map.
       
   343   int length = oop_mask.expression_stack_size();
       
   344 
       
   345   assert(fr().interpreter_frame_expression_stack_size() >= length,
       
   346     "error in expression stack!");
       
   347 
       
   348   StackValueCollection* result = new StackValueCollection(length);
       
   349 
       
   350   if (0 == length) {
       
   351     return result;
   329   }
   352   }
   330 
   353 
   331   int nof_locals = method()->max_locals();
   354   int nof_locals = method()->max_locals();
   332   StackValueCollection* result = new StackValueCollection(length);
   355 
   333 
       
   334   InterpreterOopMap oop_mask;
       
   335   // Get oopmap describing oops and int for current bci
       
   336   if (TraceDeoptimization && Verbose) {
       
   337     methodHandle m_h(method());
       
   338     OopMapCache::compute_one_oop_map(m_h, bci(), &oop_mask);
       
   339   } else {
       
   340     method()->mask_for(bci(), &oop_mask);
       
   341   }
       
   342   // handle expressions
   356   // handle expressions
   343   for(int i=0; i < length; i++) {
   357   for(int i=0; i < length; i++) {
   344     // Find stack location
   358     // Find stack location
   345     intptr_t *addr = fr().interpreter_frame_expression_stack_at(i);
   359     intptr_t *addr = fr().interpreter_frame_expression_stack_at(i);
   346 
   360