aboutsummaryrefslogtreecommitdiff
path: root/vm/compiler/codegen/arm/CodegenDriver.c
diff options
context:
space:
mode:
authorAndy McFadden <fadden@android.com>2011-02-15 07:48:05 -0800
committerAndy McFadden <fadden@android.com>2011-02-15 15:04:17 -0800
commitca02b580a542e97f273e1adfb6d26e7b20cc99a0 (patch)
tree98195b16f46ba14d51738552a969afcec4a6abf2 /vm/compiler/codegen/arm/CodegenDriver.c
parent1a8493cafbdbdcc26f5fbe7ed2cf8bdd01d1b732 (diff)
Barrier after construction of finalizable object
If thread 1 creates an object, and thread 2 executes the finalizer, then thread 2 must be guaranteed to see a fully-constructed object. To this end, we need to emit a store/store barrier before returning from the object's constructor. We already do this for objects with final fields, so this is a minor tweak. While working on this I noticed that Enum overrides finalize() (for the explicit purpose of making sure that no subclass can do so), which the VM was taking as a signal that all enumerated types are finalizable. In practice this doesn't matter, since the only instances are the enum elements themselves, and we'd only GC them if the enum class itself went away. However, setting it correctly means less work for dexopt and has no measurable impact on class loading time. Bug 3403518 Change-Id: Ifa890b5e7ef1cda2a554ba54f25c4148272c3537
Diffstat (limited to 'vm/compiler/codegen/arm/CodegenDriver.c')
0 files changed, 0 insertions, 0 deletions