equal
deleted
inserted
replaced
188 return true; |
188 return true; |
189 // Trust VM anonymous classes. They are private API (sun.misc.Unsafe) and can't be serialized, |
189 // Trust VM anonymous classes. They are private API (sun.misc.Unsafe) and can't be serialized, |
190 // so there is no hacking of finals going on with them. |
190 // so there is no hacking of finals going on with them. |
191 if (holder->is_anonymous()) |
191 if (holder->is_anonymous()) |
192 return true; |
192 return true; |
|
193 // Trust Atomic*FieldUpdaters: they are very important for performance, and make up one |
|
194 // more reason not to use Unsafe, if their final fields are trusted. See more in JDK-8140483. |
|
195 if (holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicIntegerFieldUpdater_Impl() || |
|
196 holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicLongFieldUpdater_CASUpdater() || |
|
197 holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicLongFieldUpdater_LockedUpdater() || |
|
198 holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicReferenceFieldUpdater_Impl()) { |
|
199 return true; |
|
200 } |
193 return TrustFinalNonStaticFields; |
201 return TrustFinalNonStaticFields; |
194 } |
202 } |
195 |
203 |
196 void ciField::initialize_from(fieldDescriptor* fd) { |
204 void ciField::initialize_from(fieldDescriptor* fd) { |
197 // Get the flags, offset, and canonical holder of the field. |
205 // Get the flags, offset, and canonical holder of the field. |