6951190: assert(!klass_is_exact(),"only non-exact klass") while building JDK

Mon, 10 May 2010 14:58:38 -0700

author
never
date
Mon, 10 May 2010 14:58:38 -0700
changeset 1851
e8e83be27dd7
parent 1850
359375cb7de6
child 1857
2ad074ba8456
child 1868
df736661d0c8

6951190: assert(!klass_is_exact(),"only non-exact klass") while building JDK
Reviewed-by: kvn

src/share/vm/opto/library_call.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/opto/library_call.cpp	Fri May 07 15:13:00 2010 -0700
     1.2 +++ b/src/share/vm/opto/library_call.cpp	Mon May 10 14:58:38 2010 -0700
     1.3 @@ -809,8 +809,7 @@
     1.4    Node* no_ctrl = NULL;
     1.5  
     1.6    ciInstanceKlass* klass = env()->String_klass();
     1.7 -  const TypeInstPtr* string_type =
     1.8 -        TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
     1.9 +  const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass);
    1.10  
    1.11    const TypeAryPtr* value_type =
    1.12          TypeAryPtr::make(TypePtr::NotNull,
    1.13 @@ -883,8 +882,7 @@
    1.14    }
    1.15  
    1.16    ciInstanceKlass* klass = env()->String_klass();
    1.17 -  const TypeInstPtr* string_type =
    1.18 -    TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
    1.19 +  const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass);
    1.20    Node* no_ctrl = NULL;
    1.21  
    1.22    // Get counts for string and argument
    1.23 @@ -958,14 +956,16 @@
    1.24      }
    1.25    }
    1.26  
    1.27 -  const TypeInstPtr* string_type =
    1.28 -    TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
    1.29 +  const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass);
    1.30  
    1.31    Node* no_ctrl = NULL;
    1.32    Node* receiver_cnt;
    1.33    Node* argument_cnt;
    1.34  
    1.35    if (!stopped()) {
    1.36 +    // Properly cast the argument to String
    1.37 +    argument = _gvn.transform(new (C, 2) CheckCastPPNode(control(), argument, string_type));
    1.38 +
    1.39      // Get counts for string and argument
    1.40      Node* receiver_cnta = basic_plus_adr(receiver, receiver, count_offset);
    1.41      receiver_cnt  = make_load(no_ctrl, receiver_cnta, TypeInt::INT, T_INT, string_type->add_offset(count_offset));
    1.42 @@ -1090,7 +1090,7 @@
    1.43    const int offset_offset = java_lang_String::offset_offset_in_bytes();
    1.44  
    1.45    ciInstanceKlass* klass = env()->String_klass();
    1.46 -  const TypeInstPtr* string_type = TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
    1.47 +  const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass);
    1.48    const TypeAryPtr*  source_type = TypeAryPtr::make(TypePtr::NotNull, TypeAry::make(TypeInt::CHAR,TypeInt::POS), ciTypeArrayKlass::make(T_CHAR), true, 0);
    1.49  
    1.50    Node* sourceOffseta = basic_plus_adr(string_object, string_object, offset_offset);
    1.51 @@ -1199,8 +1199,7 @@
    1.52      Node* no_ctrl  = NULL;
    1.53  
    1.54      ciInstanceKlass* klass = env()->String_klass();
    1.55 -    const TypeInstPtr* string_type =
    1.56 -      TypeInstPtr::make(TypePtr::BotPTR, klass, false, NULL, 0);
    1.57 +    const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass);
    1.58  
    1.59      // Get counts for string and substr
    1.60      Node* source_cnta = basic_plus_adr(receiver, receiver, count_offset);

mercurial