1 /* |
1 /* |
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
1488 StringTable::intern("I", THREAD); // Needed for StringBuffer persistence? |
1488 StringTable::intern("I", THREAD); // Needed for StringBuffer persistence? |
1489 StringTable::intern("Z", THREAD); // Needed for StringBuffer persistence? |
1489 StringTable::intern("Z", THREAD); // Needed for StringBuffer persistence? |
1490 |
1490 |
1491 // sun.io.Converters |
1491 // sun.io.Converters |
1492 static const char obj_array_sig[] = "[[Ljava/lang/Object;"; |
1492 static const char obj_array_sig[] = "[[Ljava/lang/Object;"; |
1493 SymbolTable::lookup(obj_array_sig, (int)strlen(obj_array_sig), THREAD); |
1493 (void)SymbolTable::new_permanent_symbol(obj_array_sig, THREAD); |
1494 |
1494 |
1495 // java.util.HashMap |
1495 // java.util.HashMap |
1496 static const char map_entry_array_sig[] = "[Ljava/util/Map$Entry;"; |
1496 static const char map_entry_array_sig[] = "[Ljava/util/Map$Entry;"; |
1497 SymbolTable::lookup(map_entry_array_sig, (int)strlen(map_entry_array_sig), |
1497 (void)SymbolTable::new_permanent_symbol(map_entry_array_sig, THREAD); |
1498 THREAD); |
|
1499 |
1498 |
1500 tty->print("Loading classes to share ... "); |
1499 tty->print("Loading classes to share ... "); |
1501 while ((fgets(class_name, sizeof class_name, file)) != NULL) { |
1500 while ((fgets(class_name, sizeof class_name, file)) != NULL) { |
1502 if (*class_name == '#') { |
1501 if (*class_name == '#') { |
1503 jint fsh, fsl; |
1502 jint fsh, fsl; |
1512 class_name[name_len-1] = '\0'; |
1511 class_name[name_len-1] = '\0'; |
1513 |
1512 |
1514 computed_jsum = jsum(computed_jsum, class_name, (const int)name_len - 1); |
1513 computed_jsum = jsum(computed_jsum, class_name, (const int)name_len - 1); |
1515 |
1514 |
1516 // Got a class name - load it. |
1515 // Got a class name - load it. |
1517 TempNewSymbol class_name_symbol = SymbolTable::new_symbol(class_name, THREAD); |
1516 Symbol* class_name_symbol = SymbolTable::new_permanent_symbol(class_name, THREAD); |
1518 guarantee(!HAS_PENDING_EXCEPTION, "Exception creating a symbol."); |
1517 guarantee(!HAS_PENDING_EXCEPTION, "Exception creating a symbol."); |
1519 klassOop klass = SystemDictionary::resolve_or_null(class_name_symbol, |
1518 klassOop klass = SystemDictionary::resolve_or_null(class_name_symbol, |
1520 THREAD); |
1519 THREAD); |
1521 guarantee(!HAS_PENDING_EXCEPTION, "Exception resolving a class."); |
1520 guarantee(!HAS_PENDING_EXCEPTION, "Exception resolving a class."); |
1522 if (klass != NULL) { |
1521 if (klass != NULL) { |