1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2015, 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. |
98 |
98 |
99 // Adding elements |
99 // Adding elements |
100 Symbol* basic_add(int index, u1* name, int len, unsigned int hashValue, |
100 Symbol* basic_add(int index, u1* name, int len, unsigned int hashValue, |
101 bool c_heap, TRAPS); |
101 bool c_heap, TRAPS); |
102 bool basic_add(ClassLoaderData* loader_data, |
102 bool basic_add(ClassLoaderData* loader_data, |
103 constantPoolHandle cp, int names_count, |
103 const constantPoolHandle& cp, int names_count, |
104 const char** names, int* lengths, int* cp_indices, |
104 const char** names, int* lengths, int* cp_indices, |
105 unsigned int* hashValues, TRAPS); |
105 unsigned int* hashValues, TRAPS); |
106 |
106 |
107 static void new_symbols(ClassLoaderData* loader_data, |
107 static void new_symbols(ClassLoaderData* loader_data, |
108 constantPoolHandle cp, int names_count, |
108 const constantPoolHandle& cp, int names_count, |
109 const char** name, int* lengths, |
109 const char** name, int* lengths, |
110 int* cp_indices, unsigned int* hashValues, |
110 int* cp_indices, unsigned int* hashValues, |
111 TRAPS) { |
111 TRAPS) { |
112 add(loader_data, cp, names_count, name, lengths, cp_indices, hashValues, THREAD); |
112 add(loader_data, cp, names_count, name, lengths, cp_indices, hashValues, THREAD); |
113 } |
113 } |
168 // jchar (utf16) version of lookups |
168 // jchar (utf16) version of lookups |
169 static Symbol* lookup_unicode(const jchar* name, int len, TRAPS); |
169 static Symbol* lookup_unicode(const jchar* name, int len, TRAPS); |
170 static Symbol* lookup_only_unicode(const jchar* name, int len, unsigned int& hash); |
170 static Symbol* lookup_only_unicode(const jchar* name, int len, unsigned int& hash); |
171 |
171 |
172 static void add(ClassLoaderData* loader_data, |
172 static void add(ClassLoaderData* loader_data, |
173 constantPoolHandle cp, int names_count, |
173 const constantPoolHandle& cp, int names_count, |
174 const char** names, int* lengths, int* cp_indices, |
174 const char** names, int* lengths, int* cp_indices, |
175 unsigned int* hashValues, TRAPS); |
175 unsigned int* hashValues, TRAPS); |
176 |
176 |
177 // Release any dead symbols |
177 // Release any dead symbols |
178 static void unlink() { |
178 static void unlink() { |