aboutsummaryrefslogtreecommitdiff
path: root/vm/oo/Array.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Dalvik: Ensure that the array length complies with the final specifierSerban Constantinescu2013-12-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | JSR-133, which Android 4 should comply with, "final" fields should be visible to all threads at the time the constructor exits, regardless of synchronization. This behaviour should also apply to the array lengths as they are regarded as equivalent in behaviour to "final" fields. Non-final fields require explicit synchronization in Java for them to be accessed correctly. The Dalvik VM in Android ensures constructors for ordinary object behave properly by inserting a memory barrier ("DMB") on their return if the object's class has a "final" field. The issue, however, is that while Dalivk inserts a barrier in constructors, it doesn't during array create. A barrier ought to be inserted in order to ensure an array's length is visible when the array itself can be observed by other threads. In order for Dalvik to be correct in respect to JSR-133 and the ARM memory model, it should be modified to have a memory barrier after an array is allocated and initialized, before it is visible to other threads. Change-Id: I329656139264552bbd7cacd8c743b694ee2e0bb8 Signed-off-by: Stuart Monteith <Stuart.Monteith@arm.com> Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
* Merge tag 'android-4.4_r1' into cm-11.0Ricardo Cerqueira2013-11-011-11/+13
|\ | | | | | | Android 4.4 Release 1.0
| * Fix inner class access flags and array modifiers.Elliott Hughes2013-06-141-11/+13
| | | | | | | | | | | | | | | | | | Inner class access flags should come from the InnerClass attribute. Array classes should all have the ACC_ABSTRACT modifier set. Bug: https://code.google.com/p/android/issues/detail?id=56267 Change-Id: If4793ee6c7a6b24bf4d32ef05167d81b58011188
* | Add barriers for proper observation sequence.Xin Qi2013-07-251-0/+5
|/ | | | Change-Id: I5c2ef043920fe60c92304cd2c8a857a805b6e9af
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-3/+3
| | | | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Also fix an occurrence of LOGW missed in an earlier change. Bug: 5449033 Change-Id: I2e3b23839e6dcd09015d6402280e9300c75e3406
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-2/+2
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: Ia5d301248024df26c2a29dabdfe738e39ec87c82
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-4/+4
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I8bd96961e369a08e86ff78b82d90f20f42787eb1
* Switch dvmHumanReadableDescriptor over to std::string.Elliott Hughes2011-06-071-3/+2
| | | | | | (Prep work before making a change to stack dumps.) Change-Id: I0af49b920f450fd2611e4b96e717a637483122d6
* Further conservation of newlines.Dan Bornstein2011-05-261-13/+13
| | | | | | Friends don't let friends end LOG() strings with newlines. Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00
* Establish a subclass relationship between ClassObject and Object.Carl Shapiro2011-05-061-4/+4
| | | | Change-Id: I9fb5d33f23ec7aeb2b9a3908d4125b34be0599ae
* Establish a subclass relationship between ArrayObject and Object.Carl Shapiro2011-05-031-9/+7
| | | | Change-Id: I9f9fe52bd4ceebb6dde48251a89190ba6bb00ce4
* Add a non-moving option to dvmMalloc and make use of it.Carl Shapiro2011-04-271-1/+1
| | | | | | | | | At present, class objects, non-moving arrays, and interned strings have location dependencies in native code. Allocating non-moving is a no-op for the present heap, but this option will have an effect after the copying collector is integrated. Change-Id: I674f83a086ac65db303baab0599831f80f52a4a5
* Replace public uses of dvmAllocArray with dvmAllocArrayByClass.Carl Shapiro2011-04-191-5/+8
| | | | Change-Id: Ica5d457566ebf1196af5c0ef260ddeb95f569b81
* Remove dvmAllocObjectArray and all of its uses.Carl Shapiro2011-04-181-30/+0
| | | | | | | | This replaces uses of dvmAllocObjectArray with equivalent but safer calls to dvmAllocArrayByClass. dvmAllocObjectArray performed no type checking of its arguments and was easy to use incorrectly. Change-Id: Ia82fe73cb9d73bbb27f5961242ad5961f9f9924c
* Move fundamental object definitions and operations to C++Carl Shapiro2011-04-131-0/+659
Change-Id: Ibc3766edfbf7fdbde2d762d6e88a0bb02df2be31