Esempio n. 1
0
 static int length(oop java_string) {
   assert(initialized, "Must be initialized");
   assert(is_instance(java_string), "must be java_string");
   if (count_offset > 0) {
     return java_string->int_field(count_offset);
   } else {
     return ((typeArrayOop)java_string->obj_field(value_offset))->length();
   }
 }
Esempio n. 2
0
 static int offset(oop java_string) {
   assert(initialized, "Must be initialized");
   assert(is_instance(java_string), "must be java_string");
   if (offset_offset > 0) {
     return java_string->int_field(offset_offset);
   } else {
     return 0;
   }
 }
Esempio n. 3
0
 static int length(oop java_string) {
   assert(is_instance(java_string), "must be java_string");
   return java_string->int_field(count_offset);
 }
Esempio n. 4
0
 static unsigned int hash(oop java_string) {
   assert(initialized && (hash_offset > 0), "Must be initialized");
   assert(is_instance(java_string), "must be java_string");
   return java_string->int_field(hash_offset);
 }