OSDN Git Service
Elliott Hughes [Thu, 29 Sep 2011 22:58:28 +0000 (15:58 -0700)]
Add STLDeleteValues, and use it.
This is the version from Chromium.
Change-Id: I5b7c6a544d5d5db8244869c58461cad16e7b4b86
jeffhao [Thu, 29 Sep 2011 22:13:22 +0000 (15:13 -0700)]
Merge "Fixed test for static final fields that don't use <clinit>." into dalvik-dev
jeffhao [Thu, 29 Sep 2011 22:05:18 +0000 (15:05 -0700)]
Fixed test for static final fields that don't use <clinit>.
Static final fields that are initialized by a compile-time constant
expression are replaced by copies of the constant value. This is done by
the compiler, and the dex file format passes it on.
Change-Id: I19c9b63508a4632ac32b8b877f33d68bfb3b054b
buzbee [Thu, 29 Sep 2011 21:15:05 +0000 (14:15 -0700)]
Add memory barriers (Issue
3338450)
Add missing barriers required for volatile access on Arm. Also,
flipped long volatile field accesses to the slow path. The
previous codegen was not only missing barriers, but was not
using 64-bit atomics.
Change-Id: I4aa2be2bf81971e5ae664c762ceaf2ea58ce231b
buzbee [Thu, 29 Sep 2011 18:14:04 +0000 (11:14 -0700)]
Register usage cleanup
I plan to enable some of the old-world basic block optimizations.
Those care about temp register status, so we needed a bit of
cleanup on the temp tracking.
Change-Id: I317bce1b91a73ec9589c20ed5bfe00d53994991a
Elliott Hughes [Thu, 29 Sep 2011 17:52:22 +0000 (10:52 -0700)]
New atomics from dalvik.
Change-Id: I00de43b180aaaf69f40f9bebddef641cffe949b7
Jesse Wilson [Thu, 29 Sep 2011 17:12:33 +0000 (13:12 -0400)]
Revert "Reverts to track dalvik and libcore"
This reverts commit
53d6ff445706c390c541d10ef11f1b2f19ab14e8.
Change-Id: I7cfff5b532b0dd6ffef010732cd248f58236421b
Elliott Hughes [Thu, 29 Sep 2011 05:24:21 +0000 (22:24 -0700)]
Merge "Throw if ResolveMethod fails." into dalvik-dev
Elliott Hughes [Thu, 29 Sep 2011 02:17:29 +0000 (19:17 -0700)]
Throw if ResolveMethod fails.
It's impractical for the lower-level Find*Method calls to throw because
they're used in class initialization and exception throwing.
Change-Id: Idece1ea99553a758ebc23d987e46b59f0445ea67
Shih-wei Liao [Thu, 29 Sep 2011 01:06:15 +0000 (18:06 -0700)]
For Stack Indirect Reference Table, visit roots in the table.
Change-Id: Ib2574c54b080944e0be3c498578520d52df4d9ec
Shih-wei Liao [Wed, 28 Sep 2011 04:33:19 +0000 (21:33 -0700)]
Fix stack scanning bugs: Add PC OFFSET before retrieving Registermap.
GC passes for the MemUsage of 5 MB * 100.
Note that RegisterMap is uncompressed. Also add new GC test.
Change-Id: I7a7afc845d4582f8f2f3ba95e4716266ec46c635
Brian Carlstrom [Wed, 28 Sep 2011 18:37:09 +0000 (11:37 -0700)]
Remove extra lock and racy assert in class initialization
Change-Id: Idaf68cbf888b5edc5e05877da6a20b86bdfb4762
jeffhao [Tue, 27 Sep 2011 20:54:29 +0000 (13:54 -0700)]
Verifier should not exit with exceptions pending.
Change-Id: Ibf820594883b345c55e9f636d937aae6506706d6
Ian Rogers [Tue, 27 Sep 2011 20:38:14 +0000 (13:38 -0700)]
Support for stack scanning of roots.
Change-Id: Icbb02959725735faaa230e0fd00e8039b2f9c1b2
Brian Carlstrom [Tue, 27 Sep 2011 23:27:12 +0000 (16:27 -0700)]
Fix oatdumps stats alignment
Change-Id: I9487fb8383fcc4a3f5adaf2d7987125e58e8197a
Shih-wei Liao [Tue, 27 Sep 2011 22:00:09 +0000 (15:00 -0700)]
Disable test until RegisterMap is fixed for thread run.
Change-Id: I0ae63abdadf8eeec0ba5fa3d820f91774a10aa01
Brian Carlstrom [Tue, 27 Sep 2011 21:35:04 +0000 (14:35 -0700)]
Fix space_test by ensuring Runtime::Current() is not null
Change-Id: Ied38b8ff3ae85b78d6e11d4bbf498bb2e0bffa4e
Brian Carlstrom [Tue, 27 Sep 2011 20:46:08 +0000 (13:46 -0700)]
Merge "Kill oat_process before rerunning" into dalvik-dev
Shih-wei Liao [Sun, 25 Sep 2011 07:05:53 +0000 (00:05 -0700)]
Add a test to trigger GC.
Change-Id: I398465ae0129612d0f8742d129a4c82c796584a3
Brian Carlstrom [Tue, 27 Sep 2011 20:35:23 +0000 (13:35 -0700)]
Kill oat_process before rerunning
Change-Id: Ibc73c2435bd3e7925eaac535759f4adf1d06901d
Brian Carlstrom [Tue, 27 Sep 2011 20:34:42 +0000 (13:34 -0700)]
Merge "Add -verbose:startup" into dalvik-dev
Brian Carlstrom [Tue, 27 Sep 2011 20:29:15 +0000 (13:29 -0700)]
Add -verbose:startup
Change-Id: I1ef70c2a9e559893541bbbf381b6893808602555
jeffhao [Tue, 27 Sep 2011 18:19:12 +0000 (11:19 -0700)]
Merge "Verifier stops if it can't resolve a class, method, or field." into dalvik-dev
Elliott Hughes [Tue, 27 Sep 2011 18:07:08 +0000 (11:07 -0700)]
Merge "Improve -Xcheck:jni handling of jfieldIDs and jmethodIDs." into dalvik-dev
jeffhao [Mon, 26 Sep 2011 21:25:31 +0000 (14:25 -0700)]
Verifier stops if it can't resolve a class, method, or field.
The goal is to have it try to verify the class again at runtime, so the
verifier can punt if it can't resolve something until then.
Change-Id: Ib3dc1662a60b1a5b55f7f8777963dc4ed44ce5f1
Elliott Hughes [Tue, 27 Sep 2011 17:46:50 +0000 (10:46 -0700)]
Improve -Xcheck:jni handling of jfieldIDs and jmethodIDs.
Also fix naming conventions to match the rest of art.
Change-Id: Id96046c677a97c7e3f0a9b2983a02b77de3b034e
Ian Rogers [Mon, 26 Sep 2011 23:32:29 +0000 (16:32 -0700)]
Support for JNI local reference cookie.
This also fixes a cross compilation bug in reseting the top of the
indirect reference table following a down call.
Change-Id: I40d913a6f86dadfe87b58d6d13a1ff3613f270ac
Elliott Hughes [Tue, 27 Sep 2011 16:59:59 +0000 (09:59 -0700)]
Merge "Add one last memory barrier." into dalvik-dev
Brian Carlstrom [Tue, 27 Sep 2011 05:29:18 +0000 (22:29 -0700)]
Fixes for "null instanceof" and class initialization
First issue was that the codegen seemed to expect r0 to contain 0 for
a false result in the null object case. This is a quick fix to make
that true. Given that the code is doing the work of a null check and
pulling out the object's class, the code should probably just pass the
class to the helper function, making this a case of IsAssignableFrom,
not instanceof.
Second issues were related to missing EnsureInitialized calls in two
different code paths, one coming from reflection, one coming from
managed code. New Class::AllocObject assert should help keep us out of
trouble in the future in this area, although perhaps Heap::AllocObject
should have a check as well.
Change-Id: Ib7975b6457481c1ac85135d38f42c6061e6443a0
buzbee [Tue, 27 Sep 2011 00:51:15 +0000 (17:51 -0700)]
Merge "Misc codegen fixes related to register promotion" into dalvik-dev
Elliott Hughes [Tue, 27 Sep 2011 00:24:06 +0000 (17:24 -0700)]
Add one last memory barrier.
(At the time I added all the others, this code had yet to be written.)
Change-Id: Id41e5730eec19d9968608cdcdfc487e48ddfb487
Elliott Hughes [Tue, 27 Sep 2011 00:13:09 +0000 (17:13 -0700)]
Merge "Add the "- waiting on"/"- waiting to lock" lines to the SIGQUIT output." into dalvik-dev
Elliott Hughes [Tue, 27 Sep 2011 00:03:36 +0000 (17:03 -0700)]
Add the "- waiting on"/"- waiting to lock" lines to the SIGQUIT output.
Change-Id: I0a8ab2e9e54c390e0d499ef464d82c2f2c628cbe
Brian Carlstrom [Mon, 26 Sep 2011 23:48:59 +0000 (16:48 -0700)]
Futher oat_process debugging
Change-Id: I7a25933939cf353e6dd67a80daebd6944b2448ac
buzbee [Mon, 26 Sep 2011 22:05:48 +0000 (15:05 -0700)]
Misc codegen fixes related to register promotion
The post-promotion world no longer guarantees that wide result
pairs don't overlap with source operands. Also had to narrow
a load-elimination optimization to apply only when using
temp registers for Dalvik virtual registers.
Change-Id: I2afbbec865d5a14d46e539cce4d8b3d0e4e8880b
Brian Carlstrom [Mon, 26 Sep 2011 20:49:03 +0000 (13:49 -0700)]
Fix bug in HasSameMethodDescriptorClass on return types
Also included:
- Make oatdump tolerant of missing code
- Include class status in oatdump output
- Additional oat_process support for testing
Change-Id: Id1b8d5662ca061f2dc22b2b087b5a5945e54b91c
Elliott Hughes [Mon, 26 Sep 2011 20:38:08 +0000 (13:38 -0700)]
Another go at hardening Class::DumpClass.
Change-Id: I327a53c20e8221009ed44042920f8dc06ce3d281
Elliott Hughes [Mon, 26 Sep 2011 19:18:25 +0000 (12:18 -0700)]
Dump the pending exception when CheckJNI spots a call to a function that requires there to be no pending exception.
Change-Id: Ice81e23c408ce15902a6270c8835ceabb0e5e278
Brian Carlstrom [Mon, 26 Sep 2011 02:35:00 +0000 (19:35 -0700)]
Assorted fixes for running frameworks apps
- Adding Heap::target_utililization_
- Convert ClassNotFoundError to ClassNotFoundException in Class.forName
- Finish String::GetHashCode
- Changed Runtime.gc to unimplemented
- Disable preload simulation in oat_process
- Empty native placeholder for org.apache.harmony.dalvik.ddmc.DdmServer
- Bonus: Fix problem with reflective invocation of constructors and private methods
Change-Id: If11b273e2f82e8e0fa7161a756098514e1156a19
Elliott Hughes [Mon, 26 Sep 2011 17:42:15 +0000 (10:42 -0700)]
Add a -verbose:thread option.
Change-Id: Ie9bbe2195d7c427379e4a27d3fe51f1a71e58597
Elliott Hughes [Mon, 26 Sep 2011 17:15:43 +0000 (10:15 -0700)]
~ should have been !.
Change-Id: Ia5c939dddba192593883e1c009663ce6a0ecdb9c
buzbee [Mon, 26 Sep 2011 01:11:54 +0000 (18:11 -0700)]
Various optimization fixes
Multiple problems surfaced when register promotion was enabled. This
CL takes care of a few, but more remain. The main problems dealt with
here are related to not having data types handy on invokes. Solved by
intepreting the shorty of the target and updating the operand names
appropriately.
The other problem was a little nastier. The codgen infrastructure wasn't
expecting wide results to overlap source operands (for example:
add-long (v0,v1) = (v1,v2) + (v3,v4)
In the old world, the result pair would start with a fresh name
and temps. In the new world, though, the register promotion mechanism
retains the mappings. Not a difficult problem to solve, but I'll
need to very carefully examine the existing long op generators to
make sure they can handle overlaps.
Change-Id: I019607620f7a78cadc9e7c57f247806d0a68243d
Shih-wei Liao [Fri, 16 Sep 2011 17:36:43 +0000 (10:36 -0700)]
Stack scanning: Find RegisterMap and unit-test it. Add decoding of the map.
Tests disabled, because there is a bug in System's LoadLibrary.
Change-Id: Ied3f4a31ce454f37c4d0f9caacd4ba03c4adb493
Elliott Hughes [Mon, 26 Sep 2011 01:04:37 +0000 (18:04 -0700)]
Various things.
Change-Id: I6911c995d7635b95e6dc6b9112bf4e1adf85e830
Elliott Hughes [Mon, 26 Sep 2011 00:48:00 +0000 (17:48 -0700)]
Log when a Thread tries to set its name.
Useful when debugging early failures to have thread names rather than just ids.
Change-Id: I3e00e530847cabb70a1894d2ddaaeb0251642aad
Elliott Hughes [Mon, 26 Sep 2011 00:45:19 +0000 (17:45 -0700)]
Merge "Use JNI to start the daemon threads." into dalvik-dev
Elliott Hughes [Mon, 26 Sep 2011 00:42:19 +0000 (17:42 -0700)]
Use JNI to start the daemon threads.
Avoids manually messing with thread state, which I feel we're doing too
much of.
Change-Id: Ie75b7545ad473346bfa5a4694146e6d84a7cfbe6
Elliott Hughes [Mon, 26 Sep 2011 00:39:47 +0000 (17:39 -0700)]
Thread state fixes.
Attaching a native thread should give you a thread in the kNative state.
To be able to run managed code when a thread detaches, we need to be in
the kRunnable state.
Change-Id: I9c8048469d0e2d2a53e8fd85261975bbffe16b4f
Ian Rogers [Sun, 25 Sep 2011 22:45:07 +0000 (15:45 -0700)]
Floating point callee save support in exception delivery.
Untested until we promote floating point values in the compiler.
Change-Id: I20fe66cb59e2f31b21043479dde898326aec668f
Elliott Hughes [Sun, 25 Sep 2011 21:04:59 +0000 (14:04 -0700)]
Merge "Improve our choices of exceptions to throw." into dalvik-dev
Ian Rogers [Sun, 25 Sep 2011 01:15:59 +0000 (18:15 -0700)]
Support for currently untested exceptions/errors.
Replace place holder implementations of exception/error code with code
that is likely mostly correct. Testing and creating detail messages are
TODO items for each of these exceptions/errors and warning are created
to reflect this need.
As we don't currently generate code to throw these exceptions, they are
untested.
Change-Id: I75876a9cca37892fa065eccdf34f9868b4142ec9
Elliott Hughes [Sun, 25 Sep 2011 17:46:35 +0000 (10:46 -0700)]
Improve our choices of exceptions to throw.
Change-Id: I81b22db4013fda9b0a982c16c403f0165ee4be8d
Elliott Hughes [Sat, 24 Sep 2011 02:30:41 +0000 (19:30 -0700)]
Implement java.lang.reflect.Constructor.constructNative.
Change-Id: Iefa92ad1bd89073d4bfa9a80b9e4f0dea90a5849
Brian Carlstrom [Sat, 24 Sep 2011 23:03:08 +0000 (16:03 -0700)]
Tolerant compilation of classes with missing super classes
Change-Id: If64f25ae36204ab2ea5499f27601696dea9d4016
buzbee [Sat, 24 Sep 2011 00:34:19 +0000 (17:34 -0700)]
assert to DCHECK conversion
Also replaced static function defs with a STATIC macro to make normally
hidden functions visible to DCHECK's traceback listing). Additionally,
added some portions of the new type & size inference mechanism (but not
taking advantage of them yet).
Change-Id: Ib42a08777f28ab879d0df37617e1b77e3f09ba52
Elliott Hughes [Sat, 24 Sep 2011 00:24:51 +0000 (17:24 -0700)]
Implement Class.getDeclared(Constructors|Fields|Methods).
This required making sure that a Method* that represents a constructor
has java.lang.reflect.Constructor as its class.
Change-Id: I25908845a2b8d686d5404ac584693db0edd5853c
Brian Carlstrom [Fri, 23 Sep 2011 00:16:54 +0000 (17:16 -0700)]
Add support for oat_process for use as a wrap.* launcher
Add test support for running Calculator
Change-Id: I7ec0681febe6f6c836452e8afb4c12a2ebfa0ea8
Ian Rogers [Sat, 24 Sep 2011 00:05:09 +0000 (17:05 -0700)]
Exception support for object allocation.
Strengthen asserts, no extra unit tests as expect good coverage on this
already.
Change-Id: Ie8786932667b70d20c0cdf69b4b6b721b6244ded
Ian Rogers [Fri, 23 Sep 2011 23:48:26 +0000 (16:48 -0700)]
Merge "Support for exceptions from array allocation." into dalvik-dev
Ian Rogers [Fri, 23 Sep 2011 23:27:54 +0000 (16:27 -0700)]
Support for exceptions from array allocation.
Adds support for exceptions during array allocation and checked array
allocation (used by filled-new-array). Adds more unit tests.
Change-Id: I3438b257a1cf19538d8b72529097a74347ac3b99
buzbee [Fri, 23 Sep 2011 23:04:19 +0000 (16:04 -0700)]
Merge "Fix dalvik vm reg to callee save mappings" into dalvik-dev
buzbee [Fri, 23 Sep 2011 22:49:27 +0000 (15:49 -0700)]
Fix dalvik vm reg to callee save mappings
Neglected to include fp regs promoted as a double.
Change-Id: I7ca6ad5e755c5d2e20c1c903cf41491d605f258e
Ian Rogers [Fri, 23 Sep 2011 21:16:35 +0000 (14:16 -0700)]
Exception support for CanPutArrayElementFromCode.
Also a unit test.
Change-Id: I6fb4b4180d36ea2d8447a9b4d5cf28cf410960cd
Elliott Hughes [Fri, 23 Sep 2011 21:49:35 +0000 (14:49 -0700)]
Merge "Class.isAssignableFrom and Class.isInstance." into dalvik-dev
Elliott Hughes [Fri, 23 Sep 2011 21:42:41 +0000 (14:42 -0700)]
Class.isAssignableFrom and Class.isInstance.
Change-Id: I5fd52a80a08cad1ca98f7e13a6cf56add952d8af
jeffhao [Fri, 23 Sep 2011 20:53:40 +0000 (13:53 -0700)]
Enabled access check for classes and methods in the verifier.
All checks should pass in frameworks. The only thing left in the
verifier is to tolerate classes/methods/fields that fail to resolve
initially.
Change-Id: I2afe0295bb16542259b2122a9056b3139d908871
Elliott Hughes [Fri, 23 Sep 2011 21:09:45 +0000 (14:09 -0700)]
Fix build.
Change-Id: Iafac241cac1b51639a7ef7c694f0abf5c1275e6d
Elliott Hughes [Thu, 22 Sep 2011 21:00:39 +0000 (14:00 -0700)]
Implement reflective method invocation.
Change-Id: Ib3af9d7e00bf226398610b5ac6efbfe3eb2d15e8
buzbee [Fri, 23 Sep 2011 19:46:19 +0000 (12:46 -0700)]
Add tables to map between callee saves and vregs
Also added function to return sp-relative offset for Dalvik
virtual registers using Method*
[Note: must be matched with corresponding libcore change to
reflect new field in Method]
Change-Id: Id739908c6232ce60763d8199bc05111e960da46e
Ian Rogers [Fri, 23 Sep 2011 19:01:44 +0000 (12:01 -0700)]
Merge "Add some stats to oatdump" into dalvik-dev
Ian Rogers [Fri, 23 Sep 2011 18:59:02 +0000 (11:59 -0700)]
Merge "Save/restore local table state on down calls." into dalvik-dev
Brian Carlstrom [Fri, 23 Sep 2011 18:42:01 +0000 (11:42 -0700)]
Add some stats to oatdump
Change-Id: I0370f96c2abf789f327bad2ad54f7bdbcce11431
Brian Carlstrom [Fri, 23 Sep 2011 17:45:07 +0000 (10:45 -0700)]
Reverts to track dalvik and libcore
Revert "Tracking removal of Method.NO_ANNOTATIONS static field from libcore"
This reverts commit
c6766ed17d27417bfce62c31b342b3faa47ada5d.
Revert "Implement Class.getDex."
This reverts commit
98fb41647a5664922a196fd1f6b343e6bad8e51e
Revert "Track libcore change."
This revert commit
c3d530c371d5c915f4d4545810d77d391dbbfec9
Change-Id: I7159af63f100fc9810e6c2e5ef18b0c4942acc8b
Ian Rogers [Fri, 23 Sep 2011 03:41:37 +0000 (20:41 -0700)]
Save/restore local table state on down calls.
Also add unit test.
Change-Id: Ia1dc54eaac20c4bbb1ca3d9ac2933d6ab0241261
Ian Rogers [Fri, 23 Sep 2011 03:06:48 +0000 (20:06 -0700)]
Merge "Stack overflow error and unit test." into dalvik-dev
Ian Rogers [Fri, 23 Sep 2011 01:57:50 +0000 (18:57 -0700)]
Stack overflow error and unit test.
Change-Id: Ie7198569207b1b87c50d986df002c551ad5d7d3a
Ian Rogers [Fri, 23 Sep 2011 00:07:28 +0000 (17:07 -0700)]
Merge "Abstract Method Error unit test and fixes." into dalvik-dev
Ian Rogers [Thu, 22 Sep 2011 21:16:31 +0000 (14:16 -0700)]
Abstract Method Error unit test and fixes.
Change-Id: I14015ffd9f8adca9d0b2d90b91811c920b13716d
jeffhao [Thu, 22 Sep 2011 23:53:18 +0000 (16:53 -0700)]
Merge "Fixes to allow the verifier to process frameworks." into dalvik-dev
jeffhao [Thu, 22 Sep 2011 23:42:56 +0000 (16:42 -0700)]
Fixes to allow the verifier to process frameworks.
I've disabled the access checks for class and method, which need some
fixing, but nothing in frameworks should be failing in the verifier
anymore.
Change-Id: Ic16a8627b6a5b74b385a1f30dbc937c2ced910a4
Ian Rogers [Thu, 22 Sep 2011 23:28:37 +0000 (16:28 -0700)]
Implement stub for initialize static storage base.
Also fix a race in thread list.
Change-Id: Ice35c2fa14e7a9a0585e89d558815ab99bbdd6b9
Elliott Hughes [Thu, 22 Sep 2011 22:24:13 +0000 (15:24 -0700)]
Implement Class.getDex.
Change-Id: Iefb1e21a364e3e3b9f32ffd6ba57b55cfaee8c3b
Jesse Wilson [Thu, 22 Sep 2011 20:52:20 +0000 (16:52 -0400)]
Move annotations to managed code.
Change-Id: I8491f5d8b489b6fb4f80d4cbca9a05c0cf47816d
Elliott Hughes [Thu, 22 Sep 2011 19:10:40 +0000 (12:10 -0700)]
Track libcore change.
Change-Id: Ibb4374008f2657b8ffd2ed08329d319151107d04
Brian Carlstrom [Thu, 22 Sep 2011 00:30:34 +0000 (17:30 -0700)]
Adding JNI code for dalvik.system.DexFile and java.lang.Class
Change-Id: I079c037db77aeaca0dec06660f7551f57adf2607
Ian Rogers [Tue, 20 Sep 2011 20:46:24 +0000 (13:46 -0700)]
Class cast, fill array and interface exception support.
This change uses the deliver exception mechanism to implement support
for a number of runtime exceptions. It also tidies up code in the
compiler and allocates a singular callee save method in the image.
Also adds a fix for JNI internal test where we weren't passing
Thread::Current() and that this value is now being used in generated code.
Change-Id: I57eefd9afe40e92fa3a7e737f1a2ed7e1094b5c1
Elliott Hughes [Thu, 22 Sep 2011 17:27:18 +0000 (10:27 -0700)]
Merge "Use regular JNI for initializing the boxing types." into dalvik-dev
Elliott Hughes [Thu, 22 Sep 2011 17:26:20 +0000 (10:26 -0700)]
Use regular JNI for initializing the boxing types.
Change-Id: I2ae94b7a9cbd2831fb73e58aa9f71e50edb78f87
buzbee [Thu, 22 Sep 2011 04:52:09 +0000 (21:52 -0700)]
Move null checks to bvector utility callers
It's generally ok to encounter basic blocks with no interesting
dataflow info, but better to skip in the callers of the utilities
than in the utilities themselves (to make it explicit).
Change-Id: I27b2c774381d4315d51436527ddf0378e5c05d32
buzbee [Wed, 21 Sep 2011 23:03:19 +0000 (16:03 -0700)]
Suspend check reworking (ready for rewiew)
I hate burning a register, but the cost of suspend checks was just too high
in our current environment. There are things that can be done in future
releases to avoid the register burn, but for now it's worthwhile.
The general strategy is to reserve r4 as a suspend check counter.
Rather than poll the thread suspendPending counter, we instead simply
decrement the counter register. When it rolls to zero, we check. For
now I'm just using the counter scheme on backwards branches - we always
poll on returns (which is already heavyweight enough that the extra cost
isn't especially noticable).
I've also added an optimization hint to the MIR in case we have enough
time to test and enable the existing loop analysis code that omits the
suspend check on smallish counted loops.
Change-Id: I82d8bad5882a4cf2ccff590942e2d1520d58969d
buzbee [Thu, 22 Sep 2011 01:40:28 +0000 (18:40 -0700)]
Merge "Restore Method* following invoke with > 20 args" into dalvik-dev
buzbee [Thu, 22 Sep 2011 01:28:43 +0000 (18:28 -0700)]
Restore Method* following invoke with > 20 args
In the case of a huge number of arguments, the invoke setup code
will call memcpy(), which trashes the caller saves. Need to restore
Method*, which had already been loaded into arg0/r0.
Change-Id: I3a9b74132fb407263afef2a103ccac071ea6a653
Elliott Hughes [Wed, 21 Sep 2011 02:42:01 +0000 (19:42 -0700)]
Field reflection.
Change-Id: I10ffddbbc20cb5b4bbe7df52fef721e12f4b852c
Brian Carlstrom [Wed, 21 Sep 2011 18:42:59 +0000 (11:42 -0700)]
Tracking removal of Method.NO_ANNOTATIONS static field from libcore
Change-Id: Iba14a194e3c9e05af04a3d1cd23b42990d77894e
Brian Carlstrom [Tue, 20 Sep 2011 03:20:38 +0000 (20:20 -0700)]
Adding oat_process
- Added oat_process, a version of app_process use to launch frameworks apps
- Added liboat_runtime, a version of libandroid_runtime that uses art instead of dvm
This is just a special makefile, frameworks/base/core/jni code is used for source
- Added support for build a boot.oat with the full BOOTCLASSPATH
The older smaller boat.oat is now core.oat
- Added mem_map code for making sure a requested memory region is available
Moved mem_map code to cc file to make easier to debug with smaller rebuild
- Moved oat base address to 0x6000000 as a work around to host addres conflict
- Added -Xms and -Xmx options to dex2oat to allow build specific memory options
- Fixed miranda method initialization problem found compiling full bootclasspath
- Made compiler.cc tolerant of verification errors found compiling full bootclasspath
- Bumped arena block alloc warning to avoid noise when compiling full bootclasspath
- Marked implicit GC unimplemented to fail fast
- Added --output argument to oatdump
- Made many object asserts tolerate access in IsErroneous state
now that verifier is failing validation of some classes during compilation
- Made runtime tolerate unknown access as short term solution for oat_process
- Workaround SSA issue to restore full bootclasspath compilation
- Added test-art-target-processs to excercise oat_process with "am"
"am" found bug where class_linker was using Method::GetClass and not ::GetDeclaringClass
Change-Id: I1a645a142b163e06bab9e72eb094ae1f1dbfbd97
buzbee [Wed, 21 Sep 2011 00:10:57 +0000 (17:10 -0700)]
Rework type & size inference, literal usage
Fixes a bug in the old type inference mechanism (wasn't properly
propogating type info across Phi & move nodes). Combined type and
size inferences passes.
Fixed long-standing bug in the code to load a special double-precision
immediate (would have been extremely difficult to hit this in the field).
Improved loading floating point immediates.
Change-Id: I1ec72edc3b25525f14d965089f8952d4f0294942
Elliott Hughes [Wed, 21 Sep 2011 00:08:25 +0000 (17:08 -0700)]
Throw exceptions from ClassLinker.
Change-Id: I0a00595d675af21c259639800c80dbd61ba721ff
Elliott Hughes [Tue, 20 Sep 2011 21:43:12 +0000 (14:43 -0700)]
Implement VMClassLoader's native methods.
Change-Id: I6e617f415e54ce29c3a0a470b58e79d3aaa0a4bf
Elliott Hughes [Tue, 20 Sep 2011 20:15:00 +0000 (13:15 -0700)]
Implement VMStack.getClosestUserClassLoader for art.
Change-Id: Ia26650984f289b1c5c63a9501f3304d970739a46
Elliott Hughes [Tue, 20 Sep 2011 02:47:10 +0000 (19:47 -0700)]
Implement most of VMStack and some of Zygote.
Change-Id: I07e18259a0452a2a9b077148f4f1ca67d3f63427