aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/mips/CodegenFactory.cpp
diff options
context:
space:
mode:
authorCarl Shapiro <cshapiro@google.com>2010-10-19 17:27:13 -0700
committerCarl Shapiro <cshapiro@google.com>2010-10-19 20:28:37 -0700
commit2e3ec7160b265d520cd755f8c20163410d822373 (patch)
treef518c6e0ceb8d44989a0df3be8beec663121e395 /vm/compiler/codegen/mips/CodegenFactory.cpp
parent3db6149c9891089ed1b357ab69db5c57c9c1fb6c (diff)
Fix class loader interning following a String.intern.
Strings can be intered by the class loader, in the case of string literals, or by the user, through String.intern. Literal strings exist for the life of their referencing classes. User strings are weak and may be garbage collected when unreferenced. These two classes of strings are kept in seprate tables for the conveniance of the garbage collector during root traversal. When a class loader interns a string that was already interned by the user the runtime must move the string from the intern table to the literal table to increase the reference strength. Previously, this was implemented by inserting the incoming string into the literal table and removing any matching strings in the intern table. This transition lost pointer equality. With this change we first insert the exact string from the intern table into the literal table and secondly remove its reference from the intern table. By moving the string between tables pointer equality is preserved. At this point lookupInternedString should be split into two functions, possibly by pulled up the relevant bits into the public interface functions. Since this change will be merged to gingerbread I will leave the clean up to a separate change. Bug: 3098960
Diffstat (limited to 'vm/compiler/codegen/mips/CodegenFactory.cpp')
0 files changed, 0 insertions, 0 deletions