hotspot/src/share/vm/opto/compile.cpp
changeset 29341 dedd5ddb0f95
parent 29083 5e7bce2712ac
parent 29337 ef2be52deeaf
child 30211 442fbbb31f75
equal deleted inserted replaced
29090:bf691f42c812 29341:dedd5ddb0f95
    40 #include "opto/callnode.hpp"
    40 #include "opto/callnode.hpp"
    41 #include "opto/cfgnode.hpp"
    41 #include "opto/cfgnode.hpp"
    42 #include "opto/chaitin.hpp"
    42 #include "opto/chaitin.hpp"
    43 #include "opto/compile.hpp"
    43 #include "opto/compile.hpp"
    44 #include "opto/connode.hpp"
    44 #include "opto/connode.hpp"
       
    45 #include "opto/convertnode.hpp"
    45 #include "opto/divnode.hpp"
    46 #include "opto/divnode.hpp"
    46 #include "opto/escape.hpp"
    47 #include "opto/escape.hpp"
    47 #include "opto/idealGraphPrinter.hpp"
    48 #include "opto/idealGraphPrinter.hpp"
    48 #include "opto/loopnode.hpp"
    49 #include "opto/loopnode.hpp"
    49 #include "opto/machnode.hpp"
    50 #include "opto/machnode.hpp"
  3865   }
  3866   }
  3866 
  3867 
  3867   return SSC_full_test;
  3868   return SSC_full_test;
  3868 }
  3869 }
  3869 
  3870 
       
  3871 Node* Compile::conv_I2X_index(PhaseGVN *phase, Node* idx, const TypeInt* sizetype) {
       
  3872 #ifdef _LP64
       
  3873   // The scaled index operand to AddP must be a clean 64-bit value.
       
  3874   // Java allows a 32-bit int to be incremented to a negative
       
  3875   // value, which appears in a 64-bit register as a large
       
  3876   // positive number.  Using that large positive number as an
       
  3877   // operand in pointer arithmetic has bad consequences.
       
  3878   // On the other hand, 32-bit overflow is rare, and the possibility
       
  3879   // can often be excluded, if we annotate the ConvI2L node with
       
  3880   // a type assertion that its value is known to be a small positive
       
  3881   // number.  (The prior range check has ensured this.)
       
  3882   // This assertion is used by ConvI2LNode::Ideal.
       
  3883   int index_max = max_jint - 1;  // array size is max_jint, index is one less
       
  3884   if (sizetype != NULL)  index_max = sizetype->_hi - 1;
       
  3885   const TypeLong* lidxtype = TypeLong::make(CONST64(0), index_max, Type::WidenMax);
       
  3886   idx = phase->transform(new ConvI2LNode(idx, lidxtype));
       
  3887 #endif
       
  3888   return idx;
       
  3889 }
       
  3890 
  3870 // The message about the current inlining is accumulated in
  3891 // The message about the current inlining is accumulated in
  3871 // _print_inlining_stream and transfered into the _print_inlining_list
  3892 // _print_inlining_stream and transfered into the _print_inlining_list
  3872 // once we know whether inlining succeeds or not. For regular
  3893 // once we know whether inlining succeeds or not. For regular
  3873 // inlining, messages are appended to the buffer pointed by
  3894 // inlining, messages are appended to the buffer pointed by
  3874 // _print_inlining_idx in the _print_inlining_list. For late inlining,
  3895 // _print_inlining_idx in the _print_inlining_list. For late inlining,