src/hotspot/share/ci/ciEnv.cpp
changeset 51997 9ce37fa2e179
parent 50963 69b438908512
child 52195 f08c1d7a5c53
equal deleted inserted replaced
51996:84743156e780 51997:9ce37fa2e179
   397   ASSERT_IN_VM;
   397   ASSERT_IN_VM;
   398   EXCEPTION_CONTEXT;
   398   EXCEPTION_CONTEXT;
   399 
   399 
   400   // Now we need to check the SystemDictionary
   400   // Now we need to check the SystemDictionary
   401   Symbol* sym = name->get_symbol();
   401   Symbol* sym = name->get_symbol();
   402   if (sym->byte_at(0) == 'L' &&
   402   if (sym->char_at(0) == 'L' &&
   403     sym->byte_at(sym->utf8_length()-1) == ';') {
   403     sym->char_at(sym->utf8_length()-1) == ';') {
   404     // This is a name from a signature.  Strip off the trimmings.
   404     // This is a name from a signature.  Strip off the trimmings.
   405     // Call recursive to keep scope of strippedsym.
   405     // Call recursive to keep scope of strippedsym.
   406     TempNewSymbol strippedsym = SymbolTable::new_symbol(sym->as_utf8()+1,
   406     TempNewSymbol strippedsym = SymbolTable::new_symbol(sym->as_utf8()+1,
   407                     sym->utf8_length()-2,
   407                     sym->utf8_length()-2,
   408                     KILL_COMPILE_ON_FATAL_(_unloaded_ciinstance_klass));
   408                     KILL_COMPILE_ON_FATAL_(_unloaded_ciinstance_klass));
   425     domain = Handle(THREAD, accessing_klass->protection_domain());
   425     domain = Handle(THREAD, accessing_klass->protection_domain());
   426   }
   426   }
   427 
   427 
   428   // setup up the proper type to return on OOM
   428   // setup up the proper type to return on OOM
   429   ciKlass* fail_type;
   429   ciKlass* fail_type;
   430   if (sym->byte_at(0) == '[') {
   430   if (sym->char_at(0) == '[') {
   431     fail_type = _unloaded_ciobjarrayklass;
   431     fail_type = _unloaded_ciobjarrayklass;
   432   } else {
   432   } else {
   433     fail_type = _unloaded_ciinstance_klass;
   433     fail_type = _unloaded_ciinstance_klass;
   434   }
   434   }
   435   Klass* found_klass;
   435   Klass* found_klass;
   451   // The element type may be available either locally or via constraints.
   451   // The element type may be available either locally or via constraints.
   452   // In either case, if we can find the element type in the system dictionary,
   452   // In either case, if we can find the element type in the system dictionary,
   453   // we must build an array type around it.  The CI requires array klasses
   453   // we must build an array type around it.  The CI requires array klasses
   454   // to be loaded if their element klasses are loaded, except when memory
   454   // to be loaded if their element klasses are loaded, except when memory
   455   // is exhausted.
   455   // is exhausted.
   456   if (sym->byte_at(0) == '[' &&
   456   if (sym->char_at(0) == '[' &&
   457       (sym->byte_at(1) == '[' || sym->byte_at(1) == 'L')) {
   457       (sym->char_at(1) == '[' || sym->char_at(1) == 'L')) {
   458     // We have an unloaded array.
   458     // We have an unloaded array.
   459     // Build it on the fly if the element class exists.
   459     // Build it on the fly if the element class exists.
   460     TempNewSymbol elem_sym = SymbolTable::new_symbol(sym->as_utf8()+1,
   460     TempNewSymbol elem_sym = SymbolTable::new_symbol(sym->as_utf8()+1,
   461                                                  sym->utf8_length()-1,
   461                                                  sym->utf8_length()-1,
   462                                                  KILL_COMPILE_ON_FATAL_(fail_type));
   462                                                  KILL_COMPILE_ON_FATAL_(fail_type));