equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 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. |
30 #include "runtime/safepoint.hpp" |
30 #include "runtime/safepoint.hpp" |
31 #include "utilities/hashtable.inline.hpp" |
31 #include "utilities/hashtable.inline.hpp" |
32 |
32 |
33 // add new entry to the table |
33 // add new entry to the table |
34 void ResolutionErrorTable::add_entry(int index, unsigned int hash, |
34 void ResolutionErrorTable::add_entry(int index, unsigned int hash, |
35 constantPoolHandle pool, int cp_index, |
35 const constantPoolHandle& pool, int cp_index, |
36 Symbol* error, Symbol* message) |
36 Symbol* error, Symbol* message) |
37 { |
37 { |
38 assert_locked_or_safepoint(SystemDictionary_lock); |
38 assert_locked_or_safepoint(SystemDictionary_lock); |
39 assert(!pool.is_null() && error != NULL, "adding NULL obj"); |
39 assert(!pool.is_null() && error != NULL, "adding NULL obj"); |
40 |
40 |
42 add_entry(index, entry); |
42 add_entry(index, entry); |
43 } |
43 } |
44 |
44 |
45 // find entry in the table |
45 // find entry in the table |
46 ResolutionErrorEntry* ResolutionErrorTable::find_entry(int index, unsigned int hash, |
46 ResolutionErrorEntry* ResolutionErrorTable::find_entry(int index, unsigned int hash, |
47 constantPoolHandle pool, int cp_index) |
47 const constantPoolHandle& pool, int cp_index) |
48 { |
48 { |
49 assert_locked_or_safepoint(SystemDictionary_lock); |
49 assert_locked_or_safepoint(SystemDictionary_lock); |
50 |
50 |
51 for (ResolutionErrorEntry *error_probe = bucket(index); |
51 for (ResolutionErrorEntry *error_probe = bucket(index); |
52 error_probe != NULL; |
52 error_probe != NULL; |