OSDN Git Service

android-x86/dalvik.git
13 years agoMerge "Fix dalvik test 089" into dalvik-dev
Andy McFadden [Tue, 22 Mar 2011 22:10:10 +0000 (15:10 -0700)]
Merge "Fix dalvik test 089" into dalvik-dev

13 years agoFix dalvik test 089
Andy McFadden [Tue, 22 Mar 2011 22:04:52 +0000 (15:04 -0700)]
Fix dalvik test 089

The local variable used to hold the field reference was a u2.

Also, removed the "don't include debug info" options from the build
script.

Change-Id: I14b0fd4ae5af8dcd52f4b22e6b8fe9f68fd7bc89

13 years agoRemove more dead SecurityManager cruft.
Elliott Hughes [Tue, 22 Mar 2011 20:34:40 +0000 (13:34 -0700)]
Remove more dead SecurityManager cruft.

(Requires corresponding libcore change.)

Change-Id: I86aac9dda6708173fd2b5a1c660ef20ea11fca03

13 years agoMerge "Fix up some JDWP stuff" into dalvik-dev
Andy McFadden [Tue, 22 Mar 2011 20:04:08 +0000 (13:04 -0700)]
Merge "Fix up some JDWP stuff" into dalvik-dev

13 years agoFix up some JDWP stuff
Andy McFadden [Fri, 18 Mar 2011 21:27:06 +0000 (14:27 -0700)]
Fix up some JDWP stuff

Notably:
- Claim to know about synthetic attributes (canGetSyntheticAttribute).
  Set an appropriate flag in the access flags of fields and methods.
  (Makes no difference that I can see in Eclipse.)
- Stop making copies of descriptor strings.  That ceased to be necessary
  after they were normalized in DEX (pre-1.0).
- Correct object type determination, especially w.r.t. the specially-
  tagged types (strings, threads, classloaders, etc).
- Handle a FIELD_ONLY mod (not tested).
- Added a bit of debugging stuff.

Change-Id: I5651b5b76d904a9edbd051e039423795faaa1650

13 years agoMerge "Use the more pervasive /bin/sh instead." into dalvik-dev
Carl Shapiro [Tue, 22 Mar 2011 18:43:26 +0000 (11:43 -0700)]
Merge "Use the more pervasive /bin/sh instead." into dalvik-dev

13 years agoMerge "Make sure both options objects get created." into dalvik-dev
Dan Bornstein [Tue, 22 Mar 2011 03:54:32 +0000 (20:54 -0700)]
Merge "Make sure both options objects get created." into dalvik-dev

13 years agoMake sure both options objects get created.
Dan Bornstein [Tue, 22 Mar 2011 03:51:47 +0000 (20:51 -0700)]
Make sure both options objects get created.

Previously, the new DexOptions object would only get created when
calling dx as a command directly, but not when it was used as a
library (via a call to Main.run()).

Change-Id: Ie4f37ff9140539a4f2c7af50228ac6eaf6bebe05

13 years agoUse the more pervasive /bin/sh instead.
Carl Shapiro [Tue, 22 Mar 2011 03:09:32 +0000 (20:09 -0700)]
Use the more pervasive /bin/sh instead.

Because there is nothing bash specific in this file there is no
reason to specify that bash be used.

Change-Id: I41cdf4bcfa883d13bb75fffc61ad982252c936bc

13 years agoMerge "Add a missing strings.h include for strcasecmp." into dalvik-dev
Carl Shapiro [Tue, 22 Mar 2011 00:26:35 +0000 (17:26 -0700)]
Merge "Add a missing strings.h include for strcasecmp." into dalvik-dev

13 years agoAdd a missing strings.h include for strcasecmp.
Carl Shapiro [Tue, 22 Mar 2011 00:23:56 +0000 (17:23 -0700)]
Add a missing strings.h include for strcasecmp.

Change-Id: I06949c34d8ce0f48fa905d3a03d87de81e47e2f9

13 years agoMerge "Remove HeapWorker.h from Dalvik.h." into dalvik-dev
Carl Shapiro [Mon, 21 Mar 2011 23:47:54 +0000 (16:47 -0700)]
Merge "Remove HeapWorker.h from Dalvik.h." into dalvik-dev

13 years agoMerge "Remove TEST_VM_IN_ECLAIR." into dalvik-dev
Carl Shapiro [Mon, 21 Mar 2011 23:32:12 +0000 (16:32 -0700)]
Merge "Remove TEST_VM_IN_ECLAIR." into dalvik-dev

13 years agoRemove TEST_VM_IN_ECLAIR.
Carl Shapiro [Mon, 21 Mar 2011 23:25:34 +0000 (16:25 -0700)]
Remove TEST_VM_IN_ECLAIR.

Change-Id: I819a15680a50ea2d53fce6f8ebae01bc7d88fecb

13 years agoRemove HeapWorker.h from Dalvik.h.
Carl Shapiro [Mon, 21 Mar 2011 22:57:35 +0000 (15:57 -0700)]
Remove HeapWorker.h from Dalvik.h.

This is no longer a public interface.

Change-Id: I4830be24d5042d841796da14ea402a369c97a2e2

13 years agoMerge "Update version number." into dalvik-dev
Dan Bornstein [Mon, 21 Mar 2011 22:38:51 +0000 (15:38 -0700)]
Merge "Update version number." into dalvik-dev

13 years agoUpdate version number.
Dan Bornstein [Mon, 21 Mar 2011 22:33:59 +0000 (15:33 -0700)]
Update version number.

Change-Id: Id000377c913927e56a7e9e1732ff24f52bc25970

13 years agoMerge "Clarify the comments some more." into dalvik-dev
Dan Bornstein [Mon, 21 Mar 2011 22:31:30 +0000 (15:31 -0700)]
Merge "Clarify the comments some more." into dalvik-dev

13 years agoClarify the comments some more.
Dan Bornstein [Mon, 21 Mar 2011 22:31:04 +0000 (15:31 -0700)]
Clarify the comments some more.

Change-Id: I39e10b20e38f1792efa5dc4458c5cf0e8614f731

13 years agoMerge "Clarify / correct comments." into dalvik-dev
Dan Bornstein [Mon, 21 Mar 2011 22:19:45 +0000 (15:19 -0700)]
Merge "Clarify / correct comments." into dalvik-dev

13 years agoClarify / correct comments.
Dan Bornstein [Mon, 21 Mar 2011 22:19:11 +0000 (15:19 -0700)]
Clarify / correct comments.

Change-Id: I67861a0253a97a462be42cbd1b3c7ac02f8e5352

13 years agoMerge "Move finalization out of the VM." into dalvik-dev
Carl Shapiro [Mon, 21 Mar 2011 20:58:59 +0000 (13:58 -0700)]
Merge "Move finalization out of the VM." into dalvik-dev

13 years agoMove finalization out of the VM.
Carl Shapiro [Mon, 21 Mar 2011 20:35:24 +0000 (13:35 -0700)]
Move finalization out of the VM.

This change introduces a new reference class whose referent
points to instances requiring finalization.  This makes the
finalization of objects possible using a reference queue and
a dedicated thread which removes objects from the queue.

Change-Id: I0ff6dd272f00ca08c6ed3aa667bf766a039a944e

13 years agoAdd opcode-emission backward compatibility.
Dan Bornstein [Thu, 17 Mar 2011 01:00:19 +0000 (18:00 -0700)]
Add opcode-emission backward compatibility.

This makes it so that when you pass dx --target-api=N, where N is an
API level representing Honeycomb or earlier, dx will not emit any of
the new extended opcodes.

N is currently baked into the code as 12 or larger being
post-Honeycomb, but it is subject to change if there are more revs of
the API under the Honeycomb umbrella (which wouldn't be surprising).

Bug: 4094709
Change-Id: Iaf5177f179b22586bcf806ecb53de20b6e989777

13 years agoMerge "Extend a trace with a backward branch into a loop." into dalvik-dev
Ben Cheng [Sun, 20 Mar 2011 02:22:31 +0000 (19:22 -0700)]
Merge "Extend a trace with a backward branch into a loop." into dalvik-dev

13 years agoresolved conflicts for merge of 9553565f to dalvik-dev
buzbee [Sat, 19 Mar 2011 18:26:41 +0000 (11:26 -0700)]
resolved conflicts for merge of 9553565f to dalvik-dev

Change-Id: Id2bc916aa838d21f4d248206e5182b00bcd19791

13 years agoMerge "x86: restore standard stack frame layout and fix stack alignment."
Bill Buzbee [Sat, 19 Mar 2011 17:16:14 +0000 (10:16 -0700)]
Merge "x86: restore standard stack frame layout and fix stack alignment."

13 years agoExtend a trace with a backward branch into a loop.
Ben Cheng [Thu, 17 Mar 2011 00:19:06 +0000 (17:19 -0700)]
Extend a trace with a backward branch into a loop.

When seeing a trace that ends with a backward branch, exhaust all code
blocks reachable from that trace and try to identify if there exists a
non-nested loop. If the derived loop is found to be too complex or only
acyclic code is seen, revert to the original compilation mechanism to
translate a simple trace.

This CL uses the whole-method parser/dataflow analysis framework to
identify such loops. No optimization/codegen are performed yet.

Bug: 4086718

Change-Id: I19ed3ee53ea1cbda33940c533de8e9220e647156

13 years agoRemove an unused DalvikNativeMethod.
Elliott Hughes [Fri, 18 Mar 2011 17:57:13 +0000 (10:57 -0700)]
Remove an unused DalvikNativeMethod.

Bug: 3107501
Change-Id: I9aa3f8b87d7d6d7a4d02e2a4a75b539864c2d4eb

13 years agoam b4bb7f73: Add a \'dalvik\' shell script to launch dalvikvm on the host.
Jesse Wilson [Fri, 18 Mar 2011 00:31:21 +0000 (17:31 -0700)]
am b4bb7f73: Add a \'dalvik\' shell script to launch dalvikvm on the host.

* commit 'b4bb7f73210fef6c3e252e25970d7fdff1b04286':
  Add a 'dalvik' shell script to launch dalvikvm on the host.

13 years agoBug fix for dominance frontier calculation in SSA transformation.
Ben Cheng [Fri, 18 Mar 2011 00:17:42 +0000 (17:17 -0700)]
Bug fix for dominance frontier calculation in SSA transformation.

The comparison should be based on the immediate dominator instead of
the whole dominator set.

Change-Id: Id5130051f5dd13c3b486200c520fdc64d207c10e

13 years agoAdd a 'dalvik' shell script to launch dalvikvm on the host.
Jesse Wilson [Thu, 17 Mar 2011 23:58:18 +0000 (16:58 -0700)]
Add a 'dalvik' shell script to launch dalvikvm on the host.

Change-Id: I44ba2752b593a92c62872318cd8ac17185f52871
http://b/4128077

13 years agoMerge "Fix the order in which natives are registered." into dalvik-dev
Elliott Hughes [Thu, 17 Mar 2011 23:08:22 +0000 (16:08 -0700)]
Merge "Fix the order in which natives are registered." into dalvik-dev

13 years agoFix the order in which natives are registered.
Elliott Hughes [Thu, 17 Mar 2011 22:42:53 +0000 (15:42 -0700)]
Fix the order in which natives are registered.

All the core libraries want from JniHelp during registration is
jniRegisterNativeMethods. JniHelp, though, wants java.io.FileDescriptor from
the core libraries. So we should get to go first.

Bug: 3107501
Change-Id: I9604a3a04343c78577610aa7adf40a1f7d82eeeb

13 years agoMerge "Register allocator uses single reg for each local when possible." into dalvik-dev
jeffhao [Thu, 17 Mar 2011 20:26:43 +0000 (13:26 -0700)]
Merge "Register allocator uses single reg for each local when possible." into dalvik-dev

13 years agoAdd support for pre-dexed libraries to dx.
Jesse Wilson [Thu, 17 Mar 2011 02:38:47 +0000 (19:38 -0700)]
Add support for pre-dexed libraries to dx.

http://b/4090053

Change-Id: Ifb8b9230939cb2a72a767128f79cbfbd042e95a6

13 years agoRegister allocator uses single reg for each local when possible.
jeffhao [Thu, 17 Mar 2011 01:16:52 +0000 (18:16 -0700)]
Register allocator uses single reg for each local when possible.

Changes the register allocator to try much harder to map all SSA regs
associated with a local variable to the same register. Also, the
register allocator won't try to reuse parameter space for locals
like it used to, which would often lead to many unnecessary moves.

Change-Id: Ie012072015993204ef4b3f4e74a0eb94fdb10bc1

13 years agoMerge "Don't emit multiple copies of annotations when merging dex files." into dalvik-dev
Jesse Wilson [Thu, 17 Mar 2011 00:49:10 +0000 (17:49 -0700)]
Merge "Don't emit multiple copies of annotations when merging dex files." into dalvik-dev

13 years agoDon't emit multiple copies of annotations when merging dex files.
Jesse Wilson [Wed, 16 Mar 2011 21:22:51 +0000 (14:22 -0700)]
Don't emit multiple copies of annotations when merging dex files.

This change requires all annotations to be loaded into memory
so they can be sorted. There does not appear to be a required
order to the annotations in .dex files. Loading annotations also
requires loading encoded values, which makes this into a large
refactoring.

Change-Id: Ib7e2656c595018be4e9936eb84a22f1c1de56750
http://b/4090053

13 years agoMerge "Add --target-api=N option to dx." into dalvik-dev
Dan Bornstein [Wed, 16 Mar 2011 23:57:36 +0000 (16:57 -0700)]
Merge "Add --target-api=N option to dx." into dalvik-dev

13 years agoAdd --target-api=N option to dx.
Dan Bornstein [Wed, 16 Mar 2011 23:32:31 +0000 (16:32 -0700)]
Add --target-api=N option to dx.

This change adds the option and plumbs it into where it
needs to go, but doesn't add any code to take action on it.
That will come in a follow-up.

Bug: 4094709
Change-Id: I9c796e176e125b0bcee18af56d9e6da802dfa081

13 years agoMerge "Clean up ArrayStoreException some more." into dalvik-dev
Dan Bornstein [Wed, 16 Mar 2011 21:26:26 +0000 (14:26 -0700)]
Merge "Clean up ArrayStoreException some more." into dalvik-dev

13 years agoClean up ArrayStoreException some more.
Dan Bornstein [Wed, 16 Mar 2011 19:10:17 +0000 (12:10 -0700)]
Clean up ArrayStoreException some more.

Each of the four variants thrown by the VM now has a
descriptively-named function defined in Exception.c, and the messages
uniformly use human-oriented class names instead of the internal
"[[Lfoo/bar/Baz;" forms.

Bug: 3500987
Change-Id: I747315e36005c6d352116ce6a8af9d49c622f59a

13 years agoMerge "Update CheckJNI implementation" into dalvik-dev
Andy McFadden [Wed, 16 Mar 2011 19:03:35 +0000 (12:03 -0700)]
Merge "Update CheckJNI implementation" into dalvik-dev

13 years agoUpdate CheckJNI implementation
Andy McFadden [Wed, 16 Mar 2011 18:19:55 +0000 (11:19 -0700)]
Update CheckJNI implementation

This implements a couple of "TODO" items that affect CheckJNI and
indirect references.  It also adds guards that were missing around
some tests that examine objects on the heap.

Change-Id: If80d19dafb3043aa1a1d287a660ae48c86c4baa0

13 years agoCorrect the reported index.
Dan Bornstein [Wed, 16 Mar 2011 18:23:57 +0000 (11:23 -0700)]
Correct the reported index.

When asked to copy an incompatible reference, System.arraycopy() would
complain about the nth element it was to copy, and not the absolute
index of that element.

Change-Id: I0f4a159b96fbedf083c3add57d2e20ee750d70fe

13 years agoMerge "Clean up dvmFindReferenceMembers()." into dalvik-dev
Dan Bornstein [Wed, 16 Mar 2011 16:53:14 +0000 (09:53 -0700)]
Merge "Clean up dvmFindReferenceMembers()." into dalvik-dev

13 years agoClean up ref table dump
Andy McFadden [Wed, 16 Mar 2011 00:04:42 +0000 (17:04 -0700)]
Clean up ref table dump

We were using the in-heap size as a sort key and a display item,
but the sizes of objects aren't all that interesting -- usually,
if the table is being dumped, it's because we ran into an object
count limitation rather than a total size limitation.

This largely eliminates the display of object sizes.  We show array
element counts for array objects.

Bug 3447435

Change-Id: I3bf31ed45317336ce9a41f058cce8eba88e58cc8

13 years agoClean up dvmFindReferenceMembers().
Dan Bornstein [Tue, 15 Mar 2011 23:47:46 +0000 (16:47 -0700)]
Clean up dvmFindReferenceMembers().

Change-Id: I175ec22ca3bfe8bb99846b1fdb33d2b65ce01407

13 years agoMerge "Fix bugs in instruction parsing for incremental dx." into dalvik-dev
Jesse Wilson [Tue, 15 Mar 2011 23:36:25 +0000 (16:36 -0700)]
Merge "Fix bugs in instruction parsing for incremental dx." into dalvik-dev

13 years agoMerge "Further init-time cleanup." into dalvik-dev
Dan Bornstein [Tue, 15 Mar 2011 23:36:16 +0000 (16:36 -0700)]
Merge "Further init-time cleanup." into dalvik-dev

13 years agoFurther init-time cleanup.
Dan Bornstein [Tue, 15 Mar 2011 23:06:17 +0000 (16:06 -0700)]
Further init-time cleanup.

* The initialization is now fail-fast, since (a) failure is rare, and
  (b) making it tolerate multiple failures both is pretty pointless
  and would require a lot of code.

* The string offset verification code is now more cleanly factored
  out.

Change-Id: I4e7b5ee4a0f3e0874b9206b2f105d6de37b4a919

13 years agoMerge "Unify reference table dump" into dalvik-dev
Andy McFadden [Tue, 15 Mar 2011 22:54:43 +0000 (15:54 -0700)]
Merge "Unify reference table dump" into dalvik-dev

13 years agoUnify reference table dump
Andy McFadden [Tue, 15 Mar 2011 20:47:09 +0000 (13:47 -0700)]
Unify reference table dump

Merge ReferenceTable and IndirectRefTable debugging-dump functions.

Bug 3447435

Change-Id: I154a84b1910d10cf68b62b079da6bd1e5475222f

13 years agoFix bugs in instruction parsing for incremental dx.
Jesse Wilson [Tue, 15 Mar 2011 21:19:33 +0000 (14:19 -0700)]
Fix bugs in instruction parsing for incremental dx.

Change-Id: I9557e835e846d42689786833395eecdbbbe6174c
http://b/3447216

13 years agoClean up method reference/offset initialization.
Dan Bornstein [Tue, 15 Mar 2011 21:13:07 +0000 (14:13 -0700)]
Clean up method reference/offset initialization.

Similar to my previous few changes, all of the method lookups got
pulled into one of two new table-driven functions,
initDirectMethodReferences() and initVirtualMethodOffsets().

Change-Id: I382dce9e0b39c9a6f5c90ad49a4a859c5fb2cf42

13 years agoClean up constructor reference initialization.
Dan Bornstein [Tue, 15 Mar 2011 17:38:37 +0000 (10:38 -0700)]
Clean up constructor reference initialization.

Similar to my previous couple of changes, all of the constructor
lookups got pulled into a new table-driven function,
initConstructorReferences().

Change-Id: Ic74b45fa67cc9295e7d34559e1a30254de98a33c

13 years agoMerge "Clean up field offset initialization." into dalvik-dev
Dan Bornstein [Tue, 15 Mar 2011 17:07:44 +0000 (10:07 -0700)]
Merge "Clean up field offset initialization." into dalvik-dev

13 years agoClean up field offset initialization.
Dan Bornstein [Tue, 15 Mar 2011 00:15:05 +0000 (17:15 -0700)]
Clean up field offset initialization.

All of the field offset calculations got pulled into a new
table-driven function, initFieldOffsets().

Change-Id: Iba1e57aa1ed3b84c56fb4b0171e7d97cd9d40712

13 years agoam c73d12f6: dalvik: remove LOCAL_PRELINK_MODULE
Iliyan Malchev [Tue, 15 Mar 2011 00:08:49 +0000 (17:08 -0700)]
am c73d12f6: dalvik: remove LOCAL_PRELINK_MODULE

* commit 'c73d12f67a1c115be59f4d84505d72883d416631':
  dalvik: remove LOCAL_PRELINK_MODULE

13 years agoMerge "Replace jumbo opcodes in certain circumstances" into dalvik-dev
Andy McFadden [Mon, 14 Mar 2011 22:40:40 +0000 (15:40 -0700)]
Merge "Replace jumbo opcodes in certain circumstances" into dalvik-dev

13 years agodalvik: remove LOCAL_PRELINK_MODULE
Iliyan Malchev [Mon, 14 Mar 2011 21:02:05 +0000 (14:02 -0700)]
dalvik: remove LOCAL_PRELINK_MODULE

Change-Id: I1d5652a0380138dc6cddd9f0ba926ff7a131d44b
Signed-off-by: Iliyan Malchev <malchev@google.com>
13 years agoReplace jumbo opcodes in certain circumstances
Andy McFadden [Sat, 12 Mar 2011 01:05:33 +0000 (17:05 -0800)]
Replace jumbo opcodes in certain circumstances

With this change we will start using some dexopt-generated "jumbo"
opcodes for volatile field accesses and calls to Object.<init>.  These
are necessary for correctness.

Fixed a bug that could prevent volatile fields in huge objects from
being handled correctly.

Also, return "void" from some functions whose return value is never
examined.

Change-Id: I2a7fc66b59953ed3a6f4ac507873101de5d101d5

13 years agoMerge "Remove outdated asserts." into dalvik-dev
Carl Shapiro [Mon, 14 Mar 2011 20:49:09 +0000 (13:49 -0700)]
Merge "Remove outdated asserts." into dalvik-dev

13 years agoMerge "Clean up class reference initialization." into dalvik-dev
Dan Bornstein [Mon, 14 Mar 2011 20:00:37 +0000 (13:00 -0700)]
Merge "Clean up class reference initialization." into dalvik-dev

13 years agoClean up class reference initialization.
Dan Bornstein [Mon, 14 Mar 2011 19:32:03 +0000 (12:32 -0700)]
Clean up class reference initialization.

All of the class reference initialization got pulled into
a new table-driven function, initClassReferences().

Change-Id: If3a07c486fb83ac29a0ca48856c13ab079051bc0

13 years agoMerge "Add trace description dump routine for debugging" into dalvik-dev
buzbee [Mon, 14 Mar 2011 19:29:58 +0000 (12:29 -0700)]
Merge "Add trace description dump routine for debugging" into dalvik-dev

13 years agoAdd trace description dump routine for debugging
buzbee [Mon, 14 Mar 2011 19:25:24 +0000 (12:25 -0700)]
Add trace description dump routine for debugging

New dvmJitDumpTraceDescription prints out a trace descriptor.

Change-Id: I613fe17cf75e4ee26ad976b15c2cf89ce4552192

13 years agoRemove outdated asserts.
Carl Shapiro [Mon, 14 Mar 2011 19:09:34 +0000 (12:09 -0700)]
Remove outdated asserts.

Previously, the GcHeap structure was allocated, somewhat confusingly,
on the garbage collected heap.  Two asserts checked that the address
of the GcHeap structure, before being deallocated, was inside garbage
collected heap.  The GcHeap structure is now allocated on the malloc
heap and these assertions are no longer valid.

Change-Id: Ia031d116e94cf1e731315bb90077df8a82e41c55

13 years agoMerge "Collate the initial class creation code." into dalvik-dev
Dan Bornstein [Mon, 14 Mar 2011 18:22:17 +0000 (11:22 -0700)]
Merge "Collate the initial class creation code." into dalvik-dev

13 years agoMerge "Print class/method info for virtual callsites in JIT verbose mode." into dalvi...
Ben Cheng [Mon, 14 Mar 2011 18:22:08 +0000 (11:22 -0700)]
Merge "Print class/method info for virtual callsites in JIT verbose mode." into dalvik-dev

13 years agoCollate the initial class creation code.
Dan Bornstein [Mon, 14 Mar 2011 18:00:35 +0000 (11:00 -0700)]
Collate the initial class creation code.

This is just a minor shuffling of code to make it easier to
find the code that does the creation of the first classes
(first objects really) as the vm is starting up.

Change-Id: I053c5ebeea4c1808fe975dc387a9e53294ba93fe

13 years agoPrint class/method info for virtual callsites in JIT verbose mode.
Ben Cheng [Mon, 14 Mar 2011 18:16:21 +0000 (11:16 -0700)]
Print class/method info for virtual callsites in JIT verbose mode.

For example:
chaining cell (predicted): Ljava/lang/Object;getClass

Change-Id: Ia53340baab87d6b744fc7189b141737a4a54cc42

13 years agoMerge "Free the slot data when freeing an indirect reference table." into dalvik-dev
Carl Shapiro [Sat, 12 Mar 2011 02:14:11 +0000 (18:14 -0800)]
Merge "Free the slot data when freeing an indirect reference table." into dalvik-dev

13 years agoMerge "Add a predicate that returns true for addresses contained by the heap." into...
Carl Shapiro [Sat, 12 Mar 2011 02:13:46 +0000 (18:13 -0800)]
Merge "Add a predicate that returns true for addresses contained by the heap." into dalvik-dev

13 years agoMerge "Do not allocate native objects on the managed heap." into dalvik-dev
Carl Shapiro [Sat, 12 Mar 2011 02:12:41 +0000 (18:12 -0800)]
Merge "Do not allocate native objects on the managed heap." into dalvik-dev

13 years agoClarify a comment.
Dan Bornstein [Sat, 12 Mar 2011 01:57:13 +0000 (17:57 -0800)]
Clarify a comment.

Per suggestion during code review of previous patch.

Change-Id: I9bf88d3127f32036c1668ad03ffc491947a4f696

13 years agoAdd a predicate that returns true for addresses contained by the heap.
Carl Shapiro [Sat, 12 Mar 2011 01:54:58 +0000 (17:54 -0800)]
Add a predicate that returns true for addresses contained by the heap.

Change-Id: Iaa2978c59fc314563555b14f53bdc28be6b71cc4

13 years agoFree the slot data when freeing an indirect reference table.
Carl Shapiro [Sat, 12 Mar 2011 01:40:40 +0000 (17:40 -0800)]
Free the slot data when freeing an indirect reference table.

Change-Id: I96e342a57c77f53c212535d4ed563c22718d4bd0

13 years agoDo not allocate native objects on the managed heap.
Carl Shapiro [Wed, 9 Mar 2011 01:09:25 +0000 (17:09 -0800)]
Do not allocate native objects on the managed heap.

Descriptors for the managed heap were being allocated in the managed
heap using mspace-malloc.  With this change we use an ordinary malloc
to allocate those objects instead.

13 years agoMerge "Fix bugs in incremental dx." into dalvik-dev
Jesse Wilson [Sat, 12 Mar 2011 00:55:51 +0000 (16:55 -0800)]
Merge "Fix bugs in incremental dx." into dalvik-dev

13 years agoFix bugs in incremental dx.
Jesse Wilson [Fri, 11 Mar 2011 22:27:41 +0000 (14:27 -0800)]
Fix bugs in incremental dx.

The compaction code used to merge a dex with itself. This caused
problems because annotations would be duplicated. Now the dex is
merged with an empty dex. I've changed the section default from
-1 to 0 to make the empty dex trivial to construct.

It also had a correctness problem where we were using the wrong
offsets when merging indexed values. Move the offsets out of the
loop so they aren't reset.

Change-Id: Ibcf24de8f96c2c525ca2e2ac44550239e3cf689e
http://b/3447216

13 years agoMerge "Verifier allows certain errors so they can fail at runtime." into dalvik-dev
jeffhao [Sat, 12 Mar 2011 00:53:31 +0000 (16:53 -0800)]
Merge "Verifier allows certain errors so they can fail at runtime." into dalvik-dev

13 years agoMerge "Clean up how primitive types are handled." into dalvik-dev
Dan Bornstein [Sat, 12 Mar 2011 00:49:32 +0000 (16:49 -0800)]
Merge "Clean up how primitive types are handled." into dalvik-dev

13 years agoam ce52ba38: Build libdexdump_static.
Ying Wang [Sat, 12 Mar 2011 00:47:01 +0000 (16:47 -0800)]
am ce52ba38: Build libdexdump_static.

* commit 'ce52ba385f7f84cd47fdf004640de8f53181114d':
  Build libdexdump_static.

13 years agoClean up how primitive types are handled.
Dan Bornstein [Fri, 11 Mar 2011 20:58:05 +0000 (12:58 -0800)]
Clean up how primitive types are handled.

The PrimitiveType enum got "promoted" to libdex, and I added a
few helper functions there. I also quashed the idea that there
is some sort of canonical ordering of the enumerated values.

In the vm (per se), I made PrimitiveType uses where it had assumed
an ordering instead switch(). This mostly made things much simpler.

I also split out the array of type classes in Globals.h into
individual ClassObject*s. This mostly made things simpler, but the gc
got a tiny bit of extra cruft because of it.

Finally, I made it so that the type classes get created explicitly
during vm startup, instead of happening implicitly the first time
they're accessed. This both simplified the code and, in particular,
made it so that the type classes didn't have to be declared volatile.

There are still a couple of related items that could stand to be
cleaned up, but I think what's here is enough for one patch.

Change-Id: Id14a6dfdb200abce9f30911c330ba32d9c2a4c3f

13 years agoVerifier allows certain errors so they can fail at runtime.
jeffhao [Sat, 12 Mar 2011 00:07:48 +0000 (16:07 -0800)]
Verifier allows certain errors so they can fail at runtime.

Specifically, this relaxes array typing in the absense of local variable
info.

Change-Id: I1b1aeb64a0842be3cffe70c02418444457abe972

13 years agoBuild libdexdump_static.
Ying Wang [Fri, 11 Mar 2011 23:49:56 +0000 (15:49 -0800)]
Build libdexdump_static.

Which will be used in libdexdumpjni.

Change-Id: I7431fdcd006b4c4cf92e3565265830a39ccf3084

13 years agoMerge "Clean up stale cases" into dalvik-dev
Andy McFadden [Fri, 11 Mar 2011 21:15:08 +0000 (13:15 -0800)]
Merge "Clean up stale cases" into dalvik-dev

13 years agoClean up stale cases
Andy McFadden [Fri, 11 Mar 2011 20:37:24 +0000 (12:37 -0800)]
Clean up stale cases

Substitution of "volatile" ops was once done by the verifier, which
meant the verifier could see them.  This is no longer the case, so we
don't need to be handling them.

Change-Id: I6e4cd24dd65a1c28d4e5ee781be6e3499562a05b

13 years agoMerge "Extract more reference inits." into dalvik-dev
Dan Bornstein [Fri, 11 Mar 2011 17:42:02 +0000 (09:42 -0800)]
Merge "Extract more reference inits." into dalvik-dev

13 years agoMerge "Add volatile/jumbo opcodes" into dalvik-dev
Andy McFadden [Fri, 11 Mar 2011 15:40:53 +0000 (07:40 -0800)]
Merge "Add volatile/jumbo opcodes" into dalvik-dev

13 years agoExtract more reference inits.
Dan Bornstein [Fri, 11 Mar 2011 01:22:22 +0000 (17:22 -0800)]
Extract more reference inits.

In this case, the primitive array reference initialization got made
un-lazy and now happens consistently and early during vm
initialization.

Change-Id: I7477e31554bbde02dd5fc96bd7aff4af5cdac513

13 years agoRemove the stopAtPrivileged argument.
Dan Bornstein [Fri, 11 Mar 2011 00:16:11 +0000 (16:16 -0800)]
Remove the stopAtPrivileged argument.

It's superfluous now.

Change-Id: I23a3319285eab4858c9dd649aebe22df4139fe28

13 years agoAdd volatile/jumbo opcodes
Andy McFadden [Thu, 10 Mar 2011 22:12:48 +0000 (14:12 -0800)]
Add volatile/jumbo opcodes

This adds 12 dexopt-generated "volatile/jumbo" instructions, to
be used for replacing appropriate get/put ops, plus a jumbo
replacement for invoke-object-init/range.

The new instructions are defined but not yet used.  For x86 and
x86-atom, C stubs are selected.

Also, guarded macro args used in arithmetic expressions in header.S.

Bug 3403118

Change-Id: I283cea053d1cee1d70c3715df3e71177e8b8d3b2

13 years agoKill off the doPrivileged() special case code.
Dan Bornstein [Thu, 10 Mar 2011 23:57:40 +0000 (15:57 -0800)]
Kill off the doPrivileged() special case code.

We've already deprecated / disabled much of the rest of the intra-VM
security manager code, and so this code serves no real purpose anymore.

Change-Id: Ic75abc20c446d12022d19ad8807abd34f918a14b

13 years agoPull the Reference setup code into InitRefs.c.
Dan Bornstein [Thu, 10 Mar 2011 21:02:43 +0000 (13:02 -0800)]
Pull the Reference setup code into InitRefs.c.

The idea here is to make it obvious in the setup code that Reference
has to be set up specially, to make it less likely that it will get
erroneously combined with the other setup code in the future.

Since the class Reference itself isn't used, I took the opportunity
to just remove it from Globals.h.

Change-Id: I301c0ac2032e78e1e57cc3065eb0baa77f0d346f

13 years agoMerge "Clean up UtfString.c, two ways." into dalvik-dev
Dan Bornstein [Thu, 10 Mar 2011 20:46:33 +0000 (12:46 -0800)]
Merge "Clean up UtfString.c, two ways." into dalvik-dev

13 years agoClean up UtfString.c, two ways.
Dan Bornstein [Thu, 10 Mar 2011 19:32:05 +0000 (11:32 -0800)]
Clean up UtfString.c, two ways.

The class and member init code got pulled out, and put it into
InitRefs.c (for further cleansing in a future change).

The instance creation code got refactored a bit, to keep things
simpler and tidier.

Change-Id: I22d8abff141ea889b3455a1cebcf51e333cd8c92

13 years agoMerge "Handle relocatable class objects in JIT'ed code." into dalvik-dev
Ben Cheng [Thu, 10 Mar 2011 19:17:04 +0000 (11:17 -0800)]
Merge "Handle relocatable class objects in JIT'ed code." into dalvik-dev