< prev index next >

src/hotspot/share/runtime/fieldType.hpp

Print this page




  52 class FieldType: public AllStatic {
  53  private:
  54   static void skip_optional_size(Symbol* signature, int* index);
  55   static bool is_valid_array_signature(Symbol* signature);
  56  public:
  57 
  58   // Return basic type
  59   static BasicType basic_type(Symbol* signature);
  60 
  61   // Testing
  62   static bool is_array(Symbol* signature) { return signature->utf8_length() > 1 && signature->byte_at(0) == '[' && is_valid_array_signature(signature); }
  63 
  64   static bool is_obj(Symbol* signature) {
  65      int sig_length = signature->utf8_length();
  66      // Must start with 'L' and end with ';'
  67      return (sig_length >= 2 &&
  68              (signature->byte_at(0) == 'L') &&
  69              (signature->byte_at(sig_length - 1) == ';'));
  70   }
  71 
  72   static bool is_valuetype(Symbol* signature) {
  73     int sig_length = signature->utf8_length();
  74     // Must start with 'Q' and end with ';'
  75     return (sig_length >= 2 &&
  76         (signature->byte_at(0) == 'Q') &&
  77         (signature->byte_at(sig_length - 1) == ';'));
  78   }
  79 
  80   // MVT name mangling, VM derived value type naming Foo->Foo$Value
  81   static bool is_dvt_postfix(Symbol* signature);
  82   static char* dvt_unmangle_vcc(Symbol* signature);
  83 
  84   // Parse field and extract array information. Works for T_ARRAY only.
  85   static BasicType get_array_info(Symbol* signature, FieldArrayInfo& ai, TRAPS);
  86 };
  87 
  88 #endif // SHARE_VM_RUNTIME_FIELDTYPE_HPP


  52 class FieldType: public AllStatic {
  53  private:
  54   static void skip_optional_size(Symbol* signature, int* index);
  55   static bool is_valid_array_signature(Symbol* signature);
  56  public:
  57 
  58   // Return basic type
  59   static BasicType basic_type(Symbol* signature);
  60 
  61   // Testing
  62   static bool is_array(Symbol* signature) { return signature->utf8_length() > 1 && signature->byte_at(0) == '[' && is_valid_array_signature(signature); }
  63 
  64   static bool is_obj(Symbol* signature) {
  65      int sig_length = signature->utf8_length();
  66      // Must start with 'L' and end with ';'
  67      return (sig_length >= 2 &&
  68              (signature->byte_at(0) == 'L') &&
  69              (signature->byte_at(sig_length - 1) == ';'));
  70   }
  71 








  72   // MVT name mangling, VM derived value type naming Foo->Foo$Value
  73   static bool is_dvt_postfix(Symbol* signature);
  74   static char* dvt_unmangle_vcc(Symbol* signature);
  75 
  76   // Parse field and extract array information. Works for T_ARRAY only.
  77   static BasicType get_array_info(Symbol* signature, FieldArrayInfo& ai, TRAPS);
  78 };
  79 
  80 #endif // SHARE_VM_RUNTIME_FIELDTYPE_HPP
< prev index next >