src/share/vm/ci/ciConstant.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7083786 Sdiff src/share/vm/ci

src/share/vm/ci/ciConstant.hpp

Print this page




  29 #include "ci/ciNullObject.hpp"
  30 
  31 // ciConstant
  32 //
  33 // This class represents a constant value.
  34 class ciConstant VALUE_OBJ_CLASS_SPEC {
  35 private:
  36   friend class ciEnv;
  37   friend class ciField;
  38 
  39   BasicType _type;
  40   union {
  41     jint      _int;
  42     jlong     _long;
  43     jint      _long_half[2];
  44     jfloat    _float;
  45     jdouble   _double;
  46     ciObject* _object;
  47   } _value;
  48 
  49   // Implementation of the print method.
  50   void print_impl(outputStream* st);
  51 
  52 public:
  53 
  54   ciConstant() {
  55     _type = T_ILLEGAL; _value._long = -1;
  56   }
  57   ciConstant(BasicType type, jint value) {
  58     assert(type != T_LONG && type != T_DOUBLE && type != T_FLOAT,
  59            "using the wrong ciConstant constructor");
  60     _type = type; _value._int = value;
  61   }
  62   ciConstant(jlong value) {
  63     _type = T_LONG; _value._long = value;
  64   }
  65   ciConstant(jfloat value) {
  66     _type = T_FLOAT; _value._float = value;
  67   }
  68   ciConstant(jdouble value) {
  69     _type = T_DOUBLE; _value._double = value;
  70   }
  71   ciConstant(BasicType type, ciObject* p) {




  29 #include "ci/ciNullObject.hpp"
  30 
  31 // ciConstant
  32 //
  33 // This class represents a constant value.
  34 class ciConstant VALUE_OBJ_CLASS_SPEC {
  35 private:
  36   friend class ciEnv;
  37   friend class ciField;
  38 
  39   BasicType _type;
  40   union {
  41     jint      _int;
  42     jlong     _long;
  43     jint      _long_half[2];
  44     jfloat    _float;
  45     jdouble   _double;
  46     ciObject* _object;
  47   } _value;
  48 



  49 public:
  50 
  51   ciConstant() {
  52     _type = T_ILLEGAL; _value._long = -1;
  53   }
  54   ciConstant(BasicType type, jint value) {
  55     assert(type != T_LONG && type != T_DOUBLE && type != T_FLOAT,
  56            "using the wrong ciConstant constructor");
  57     _type = type; _value._int = value;
  58   }
  59   ciConstant(jlong value) {
  60     _type = T_LONG; _value._long = value;
  61   }
  62   ciConstant(jfloat value) {
  63     _type = T_FLOAT; _value._float = value;
  64   }
  65   ciConstant(jdouble value) {
  66     _type = T_DOUBLE; _value._double = value;
  67   }
  68   ciConstant(BasicType type, ciObject* p) {


src/share/vm/ci/ciConstant.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File