Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/opto/machnode.cpp
          +++ new/src/share/vm/opto/machnode.cpp
↓ open down ↓ 476 lines elided ↑ open up ↑
 477  477  }
 478  478  #endif
 479  479  
 480  480  
 481  481  //=============================================================================
 482  482  int MachConstantNode::constant_offset() {
 483  483    int offset = _constant.offset();
 484  484    // Bind the offset lazily.
 485  485    if (offset == -1) {
 486  486      Compile::ConstantTable& constant_table = Compile::current()->constant_table();
      487 +    // If called from Compile::scratch_emit_size assume the worst-case
      488 +    // for load offsets: half the constant table size.
      489 +    // NOTE: Don't return or calculate the actual offset (which might
      490 +    // be zero) because that leads to problems with e.g. jumpXtnd on
      491 +    // some architectures (cf. add-optimization in SPARC jumpXtnd).
      492 +    if (Compile::current()->in_scratch_emit_size())
      493 +      return constant_table.size() / 2;
 487  494      offset = constant_table.table_base_offset() + constant_table.find_offset(_constant);
 488  495      _constant.set_offset(offset);
 489  496    }
 490  497    return offset;
 491  498  }
 492  499  
 493  500  
 494  501  //=============================================================================
 495  502  #ifndef PRODUCT
 496  503  void MachNullCheckNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
↓ open down ↓ 257 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX