OSDN Git Service

android-x86/dalvik.git
14 years agoam f2f7880a: Test and document our handling of nulls with getString().
Jesse Wilson [Thu, 25 Mar 2010 21:40:39 +0000 (14:40 -0700)]
am f2f7880a: Test and document our handling of nulls with getString().

Merge commit 'f2f7880a40aed1c8d9c27db49226e47396556aac' into dalvik-dev

* commit 'f2f7880a40aed1c8d9c27db49226e47396556aac':
  Test and document our handling of nulls with getString().

14 years agoTest and document our handling of nulls with getString().
Jesse Wilson [Thu, 25 Mar 2010 20:31:43 +0000 (13:31 -0700)]
Test and document our handling of nulls with getString().

Our behaviour is consistent with Crockford's.

The test confirms that the behaviour is consistent with the report
of that bug, which the submitter claims is not how it should behave.
http://code.google.com/p/android/issues/detail?id=7257

Change-Id: Ibace4bd995e3cbc8fb6c9dc509f8f4491865a647

14 years agoam d630700a: Merge "Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands"
Bill Buzbee [Thu, 25 Mar 2010 20:11:50 +0000 (13:11 -0700)]
am d630700a: Merge "Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands"

Merge commit 'd630700a9fbc6d317e0b4df73cbbc74a2c8fadaa' into dalvik-dev

* commit 'd630700a9fbc6d317e0b4df73cbbc74a2c8fadaa':
  Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands

14 years agoMerge "Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands"
Bill Buzbee [Thu, 25 Mar 2010 20:07:45 +0000 (13:07 -0700)]
Merge "Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands"

14 years agoApply https://issues.apache.org/jira/browse/HARMONY-4307.
Elliott Hughes [Thu, 25 Mar 2010 18:30:13 +0000 (11:30 -0700)]
Apply https://issues.apache.org/jira/browse/HARMONY-4307.

They didn't add a test for this; supposedly it fixed a flaky AWT test. But
the change looks plausible.

Change-Id: I358849a20d5e38d01d6c77a4c335002bb7bba095

14 years agoClean up a few toStrings.
Elliott Hughes [Thu, 25 Mar 2010 17:39:48 +0000 (10:39 -0700)]
Clean up a few toStrings.

I couldn't find any more that were using getClass() rather than
getClass().getName().

Change-Id: I30b375748d36bc36d1e6999349fc472496456746

14 years agoJit: Fix for 2542488 JIT codegen bug with overlapping wide operands
Bill Buzbee [Thu, 25 Mar 2010 17:38:34 +0000 (10:38 -0700)]
Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands

Change-Id: I7b922e223fe1f5242d1f3db1fa18f54aaed725af

14 years agoam ec7c8c98: Fix java.util.Random\'s constructors.
Elliott Hughes [Thu, 25 Mar 2010 17:25:17 +0000 (10:25 -0700)]
am ec7c8c98: Fix java.util.Random\'s constructors.

Merge commit 'ec7c8c98a4094580224eb9c400249c5c0984cf29' into dalvik-dev

* commit 'ec7c8c98a4094580224eb9c400249c5c0984cf29':
  Fix java.util.Random's constructors.

14 years agoFix java.util.Random's constructors.
Elliott Hughes [Thu, 25 Mar 2010 06:38:48 +0000 (23:38 -0700)]
Fix java.util.Random's constructors.

Subclasses rely on having their overridden setSeed called by Random's
constructors, and the RI actually documents this behavior. (The
documentation even changed between Java 5 and Java 6 to make it _more_
explicit.)

This patch keeps that part of I6239d93bb46876ef1c4a5e155a6dc1ac6fab4eae
that improved our randomness, but reverts the attempt to fix Random's
uncouth behavior.

Also a regression test so we don't try to fix Random again in future.

Bug: 2502231
Change-Id: Ieea1009145c74eac9475c0cd5066dabad20eb114

14 years agoam f87ab961: Merge "Don\'t leak memory on failed pipe or mutex init"
Kenny Root [Thu, 25 Mar 2010 02:40:12 +0000 (19:40 -0700)]
am f87ab961: Merge "Don\'t leak memory on failed pipe or mutex init"

Merge commit 'f87ab9616697b8bae08c5e8007cbdd0039a1f8ce' into dalvik-dev

* commit 'f87ab9616697b8bae08c5e8007cbdd0039a1f8ce':
  Don't leak memory on failed pipe or mutex init

14 years agoam 3d5d8736: Merge "Fix for the JIT blocking mode plus some code cleanup."
Ben Cheng [Thu, 25 Mar 2010 02:40:10 +0000 (19:40 -0700)]
am 3d5d8736: Merge "Fix for the JIT blocking mode plus some code cleanup."

Merge commit '3d5d87364d062734753bfd26336e96a7e8d03360' into dalvik-dev

* commit '3d5d87364d062734753bfd26336e96a7e8d03360':
  Fix for the JIT blocking mode plus some code cleanup.

14 years agoam c66affa4: Switch to VMWAIT while outputting trace data.
Andy McFadden [Thu, 25 Mar 2010 02:40:04 +0000 (19:40 -0700)]
am c66affa4: Switch to VMWAIT while outputting trace data.

Merge commit 'c66affa440de113df861928c528fcbbead2ead45' into dalvik-dev

* commit 'c66affa440de113df861928c528fcbbead2ead45':
  Switch to VMWAIT while outputting trace data.

14 years agoMerge "Don't leak memory on failed pipe or mutex init"
Kenny Root [Thu, 25 Mar 2010 00:07:15 +0000 (17:07 -0700)]
Merge "Don't leak memory on failed pipe or mutex init"

14 years agoDon't leak memory on failed pipe or mutex init
Kenny Root [Thu, 25 Mar 2010 00:01:22 +0000 (17:01 -0700)]
Don't leak memory on failed pipe or mutex init

SSL allocation might fail on pipe or mutex creation, so free allocated
memory when that happens.

Change-Id: Ibe3813cb652db1e880e3acf0dc1fa37fbe0ad455

14 years agoMerge "Add Java 6's getAvailableLocales/getInstance to DateFormatSymbols and DecimalF...
Elliott Hughes [Wed, 24 Mar 2010 23:23:29 +0000 (16:23 -0700)]
Merge "Add Java 6's getAvailableLocales/getInstance to DateFormatSymbols and DecimalFormatSymbols." into dalvik-dev

14 years agoAdd Java 6's getAvailableLocales/getInstance to DateFormatSymbols and DecimalFormatSy...
Elliott Hughes [Wed, 24 Mar 2010 21:04:55 +0000 (14:04 -0700)]
Add Java 6's getAvailableLocales/getInstance to DateFormatSymbols and DecimalFormatSymbols.

This patch also improves the documentation of all getAvailableLocales methods
to clarify exactly what "available" means. Note that at the moment, many of
our implementations just return Locale.getAvailableLocales. It turns out that
ICU does the same in most cases, but I'll come back in a separate patch and
add code so we just pass these down to ICU, and wash our hands of the matter.

I've rewritten DateFormatSymbols.equals, which was very wrong. The time zone
names comparison had an invalid optimization, and its slow-path loop was wrong
too: it only ever tested values against themselves, which isn't likely to have
been the author's intention.

I've added toString overrides to DateFormatSymbols and DecimalFormatSymbols,
because I need them every time I work on these classes.

I've made the constants in DecimalFormatSymbols static final, and given them
idiomatic names. (I still think we might benefit from breaking these into
separate fields, as in the serialized form, but that's a separate issue.)

Finally, and unrelatedly, I've added a comment to BreakIteratorProvider that
I missed in my last change to that file.

Change-Id: I5d6cb30f9afdb502d38353d8a624dc2f0fef41ac

14 years agoMerge "Fix for the JIT blocking mode plus some code cleanup."
Ben Cheng [Wed, 24 Mar 2010 22:49:50 +0000 (15:49 -0700)]
Merge "Fix for the JIT blocking mode plus some code cleanup."

14 years agoFix for the JIT blocking mode plus some code cleanup.
Ben Cheng [Wed, 24 Mar 2010 22:24:19 +0000 (15:24 -0700)]
Fix for the JIT blocking mode plus some code cleanup.

Bug: 2517606
Change-Id: I2b5aa92ceaf23d484329330ae20de5966704280b

14 years agoShow current values of mutexes in thread dump.
Andy McFadden [Wed, 24 Mar 2010 20:35:19 +0000 (13:35 -0700)]
Show current values of mutexes in thread dump.

Experimental feature; may or may not be useful.  Dump the current value
of half a dozen VM mutexes.  This will tell us if they're unlocked,
locked, or contended-for at the point somebody does a thread dump.  For
example, when the GC notices the HeapWorker watchdog has expired:

  I/dalvikvm( 2828): DALVIK THREADS:
  I/dalvikvm( 2828): (mutexes: tll=0 tsl=0 tscl=0 ghl=1 hwl=1 hwll=0)

In this case, gcHeapLock and heapWorkerLock are held, the rest are not.

If this turns out to be useful we can put more effort into the output
format.  The pthread lib doesn't insert the thread ID unless you're
using recursive or errorcheck mutexes, which (for performance reasons)
we try not to use.

Change-Id: I272534d8c9db6340cfc23bfdddb47beefc2efbfb

14 years agoSwitch to VMWAIT while outputting trace data.
Andy McFadden [Wed, 24 Mar 2010 20:03:08 +0000 (13:03 -0700)]
Switch to VMWAIT while outputting trace data.

One of the traces from a monkey run suggests we stalled out during the
open/write/close part of writing the trace data.  To reduce the chances
of spin-on-suspending here we now switch to VMWAIT during the I/O.

For bug 2541030.

Change-Id: Ice832988213741976917fdd36afa12a694a42e81

14 years agoImprove the ThreadGroup documentation.
Elliott Hughes [Wed, 24 Mar 2010 01:06:35 +0000 (18:06 -0700)]
Improve the ThreadGroup documentation.

(Because I was asked a question about ThreadGroup today, and the answer is
always "don't use ThreadGroup"...)

Change-Id: Ibaa2f1830e1fe435c9712f3b08506639b9521b9e

14 years agoMerge "Remove explicit 8192 arguments to BufferedReader and friends." into dalvik-dev
Elliott Hughes [Wed, 24 Mar 2010 00:41:53 +0000 (17:41 -0700)]
Merge "Remove explicit 8192 arguments to BufferedReader and friends." into dalvik-dev

14 years agoam b7b9be13: Merge "Improve java.net.InetAddress.getLocalHost documentation."
Elliott Hughes [Tue, 23 Mar 2010 23:31:13 +0000 (16:31 -0700)]
am b7b9be13: Merge "Improve java.net.InetAddress.getLocalHost documentation."

Merge commit 'b7b9be1343b59b429b6de9b28ffffbbbde8478c2' into dalvik-dev

* commit 'b7b9be1343b59b429b6de9b28ffffbbbde8478c2':
  Improve java.net.InetAddress.getLocalHost documentation.

14 years agoRemove explicit 8192 arguments to BufferedReader and friends.
Elliott Hughes [Tue, 23 Mar 2010 23:26:01 +0000 (16:26 -0700)]
Remove explicit 8192 arguments to BufferedReader and friends.

These were clearly added just to shut up our own warning, and are now
unnecessary and misleading to future maintainers.

There's one barely-related change: InputStreamReader and OutputStreamWriter
are very similar, and this patch makes them more similar, and adds a few
missing modifiers from their fields.

Change-Id: I959011f914ff215e92bbfa41c1bac66465803685

14 years agoMerge "Improve java.net.InetAddress.getLocalHost documentation."
Elliott Hughes [Tue, 23 Mar 2010 23:23:02 +0000 (16:23 -0700)]
Merge "Improve java.net.InetAddress.getLocalHost documentation."

14 years agoMerge "Fix --debug-port to --debug in vogar usage" into dalvik-dev
Brian Carlstrom [Tue, 23 Mar 2010 23:09:29 +0000 (16:09 -0700)]
Merge "Fix --debug-port to --debug in vogar usage" into dalvik-dev

14 years agoFix --debug-port to --debug in vogar usage
Brian Carlstrom [Tue, 23 Mar 2010 23:05:10 +0000 (16:05 -0700)]
Fix --debug-port to --debug in vogar usage

Change-Id: I012100578caa4f5768b7926b4fbe489c80f8d32b

14 years agoMerge "Remove the "default buffer size" warnings." into dalvik-dev
Elliott Hughes [Tue, 23 Mar 2010 22:45:12 +0000 (15:45 -0700)]
Merge "Remove the "default buffer size" warnings." into dalvik-dev

14 years agoRemove the "default buffer size" warnings.
Elliott Hughes [Tue, 23 Mar 2010 22:22:02 +0000 (15:22 -0700)]
Remove the "default buffer size" warnings.

Everyone seems to agree these have outlived their usefulness.

Change-Id: Ia2a53ffa1f9498333b4b2d51d5c1db488b89abaf

14 years agoam 02388cf1: Jit: disable for Sapphire.
Bill Buzbee [Tue, 23 Mar 2010 21:55:08 +0000 (14:55 -0700)]
am 02388cf1: Jit: disable for Sapphire.

Merge commit '02388cf18a87ba0243cddc6ccf3eaf8668118723' into dalvik-dev

* commit '02388cf18a87ba0243cddc6ccf3eaf8668118723':
  Jit: disable for Sapphire.

14 years agoJit: disable for Sapphire.
Bill Buzbee [Tue, 23 Mar 2010 21:34:11 +0000 (14:34 -0700)]
Jit: disable for Sapphire.

Change-Id: I3c48f239ef9a83fac1ef05d18ea1b00ab27879ff

14 years agoImprove java.net.InetAddress.getLocalHost documentation.
Elliott Hughes [Tue, 23 Mar 2010 21:21:27 +0000 (14:21 -0700)]
Improve java.net.InetAddress.getLocalHost documentation.

Bug: 1518707
Change-Id: I741a7a28325320949e84e997e6a49d3356c9a308

14 years agoam d4e0952b: Further refinements to "kill other thread".
Andy McFadden [Tue, 23 Mar 2010 20:01:33 +0000 (13:01 -0700)]
am d4e0952b: Further refinements to "kill other thread".

Merge commit 'd4e0952b73f9054adcc927a1c12699ba63f1672a' into dalvik-dev

* commit 'd4e0952b73f9054adcc927a1c12699ba63f1672a':
  Further refinements to "kill other thread".

14 years agoFurther refinements to "kill other thread".
Andy McFadden [Tue, 23 Mar 2010 19:34:43 +0000 (12:34 -0700)]
Further refinements to "kill other thread".

Switched from SIGSEGV to SIGSTKFLT.  Otherwise it looks like we're
seg-faulting in code that was actually executing just fine.

Ignore SIGSEGV before returning.  This avoids creating a second dump
when dvmAbort() is called.  (If the caller's stack trace were at all
interesting, we wouldn't be here, and we can do without the log spam.)

Added some more details to the logging.

For bug 2517042.

Change-Id: Ifff7fd75d6dbf7e3663152787f8921dda215fe40

14 years agoMerge "Revert the removal of java.nio.NIOAccess, which frameworks/base/ uses." into...
Elliott Hughes [Tue, 23 Mar 2010 00:56:03 +0000 (17:56 -0700)]
Merge "Revert the removal of java.nio.NIOAccess, which frameworks/base/ uses." into dalvik-dev

14 years agoRevert the removal of java.nio.NIOAccess, which frameworks/base/ uses.
Elliott Hughes [Tue, 23 Mar 2010 00:50:33 +0000 (17:50 -0700)]
Revert the removal of java.nio.NIOAccess, which frameworks/base/ uses.

This was removed in https://android-git.corp.google.com/g/45796, but turns
out to be used. I think we can do better in the long term, but right now
this just removes some of the duplication from the original, and adds
comments explaining where it's used.

Bug: 2535509
Change-Id: Ie8e717537b8b8c70c8689f2dbb2c3a38501ecc57

14 years agoMerge "Add the Java 6 java.text.spi and java.util.spi interfaces." into dalvik-dev
Elliott Hughes [Tue, 23 Mar 2010 00:00:55 +0000 (17:00 -0700)]
Merge "Add the Java 6 java.text.spi and java.util.spi interfaces." into dalvik-dev

14 years agoAdd the Java 6 java.text.spi and java.util.spi interfaces.
Elliott Hughes [Mon, 22 Mar 2010 23:36:58 +0000 (16:36 -0700)]
Add the Java 6 java.text.spi and java.util.spi interfaces.

We don't currently use these, and don't necessarily plan to. Full support
would have a run-time cost, and it's not obvious that it would be particularly
useful.

Code search can't actually find any users of this stuff in the wild outside
of the various VM implementations and their test suites.

Bug: 2497395
Change-Id: Ie25aef73ece6d1fd169fdcb7b2f847761d77914d

14 years agoam 64ee717b: Jit: Re-enable for Sapphire
Bill Buzbee [Mon, 22 Mar 2010 22:43:25 +0000 (15:43 -0700)]
am 64ee717b: Jit: Re-enable for Sapphire

Merge commit '64ee717be7cf4aad64371e73cfd180aa4d85dd07' into dalvik-dev

* commit '64ee717be7cf4aad64371e73cfd180aa4d85dd07':
  Jit: Re-enable for Sapphire

14 years agoJit: Re-enable for Sapphire
Bill Buzbee [Mon, 22 Mar 2010 20:59:45 +0000 (13:59 -0700)]
Jit: Re-enable for Sapphire

Change-Id: Icbfd8781756c2c7cde88140ed40766e29448b1ff

14 years agoRemove all remaining "@since Android" tags.
Elliott Hughes [Mon, 22 Mar 2010 19:26:38 +0000 (12:26 -0700)]
Remove all remaining "@since Android" tags.

I've fixed a few typos, and removed a few of the more egregiously nonsensical
or incorrect comments that were nearby.

Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697

14 years agoAdd Java 6's java.util.Arrays changes.
Elliott Hughes [Mon, 22 Mar 2010 18:16:46 +0000 (11:16 -0700)]
Add Java 6's java.util.Arrays changes.

I've kept our binary search implementation and just generalized the
interface.

I've gone out of my way to preserve exception priority. I know we don't
agree that it's necessary, but it is important if we want to be able to
run other people's tests. If someone wants to write a new high-quality
test suite (which would be a great thing to have), we should remove the
hacks. (I've commented them.) Otherwise, I've gone out of my way to keep
the near-duplicates forced on us by Java's primitive type system as
identical as possible.

This passes all harmony and jtreg tests.

Change-Id: I91fbf707dac76124c6dbe59b0b30b7ded9a69529

14 years agoMerge "Java 6 java.nio.Buffer changes." into dalvik-dev
Elliott Hughes [Fri, 19 Mar 2010 23:23:09 +0000 (16:23 -0700)]
Merge "Java 6 java.nio.Buffer changes." into dalvik-dev

14 years agoJava 6 java.nio.Buffer changes.
Elliott Hughes [Fri, 19 Mar 2010 23:06:18 +0000 (16:06 -0700)]
Java 6 java.nio.Buffer changes.

We no longer need the duplicated lower-quality documentation on
each subclass, and the NIOAccess class turns out to be unused.

Bug: 2497395
Change-Id: Ib7ce8f51aac2b78bf56fff4526af1c2c8818e277

14 years agoam e9f1038c: Merge "Use pthread_kill(3) instead of kill(2)."
Andy McFadden [Fri, 19 Mar 2010 22:40:13 +0000 (15:40 -0700)]
am e9f1038c: Merge "Use pthread_kill(3) instead of kill(2)."

Merge commit 'e9f1038c3e71dba123532c62741257867d68e08b' into dalvik-dev

* commit 'e9f1038c3e71dba123532c62741257867d68e08b':
  Use pthread_kill(3) instead of kill(2).

14 years agoMerge "Use pthread_kill(3) instead of kill(2)."
Andy McFadden [Fri, 19 Mar 2010 22:35:40 +0000 (15:35 -0700)]
Merge "Use pthread_kill(3) instead of kill(2)."

14 years agoMerge "Remove a superfluous declaration (left over from when DexClassLoader was dupli...
Dan Bornstein [Fri, 19 Mar 2010 22:21:55 +0000 (15:21 -0700)]
Merge "Remove a superfluous declaration (left over from when DexClassLoader was duplicated from PathClassLoader)." into dalvik-dev

14 years agoUse pthread_kill(3) instead of kill(2).
Andy McFadden [Fri, 19 Mar 2010 22:18:57 +0000 (15:18 -0700)]
Use pthread_kill(3) instead of kill(2).

Another swing at useful native traces.  pthread_kill(3) uses tkill(2)
instead of kill(2), so we may have a better chance of the signal landing
on the right thread.

For bug 2517042.

Change-Id: I62871c1e21b11442ea52c861397674f1644f4da9

14 years agoTrack Java 6's BreakIterator API changes.
Elliott Hughes [Fri, 19 Mar 2010 21:49:47 +0000 (14:49 -0700)]
Track Java 6's BreakIterator API changes.

Bug: 2497395
Change-Id: Iaef75bbd946bebe6201b5f52564bcaf8a4d0e56e

14 years agoClean up the Java side of the ICU interface a bit.
Elliott Hughes [Fri, 19 Mar 2010 01:25:22 +0000 (18:25 -0700)]
Clean up the Java side of the ICU interface a bit.

My original intention was just to add the missing "final" on a few classes,
but our BreakIterator implementation struck me as excessively bloated and
confusing.

Change-Id: I2d2dccafe8ec91124f3c83909c9ec647cc2d51e2

14 years agoRemove a superfluous declaration (left over from when DexClassLoader was
Dan Bornstein [Fri, 19 Mar 2010 21:01:59 +0000 (14:01 -0700)]
Remove a superfluous declaration (left over from when DexClassLoader was
duplicated from PathClassLoader).

Change-Id: Iaf3e8a5b23df1a8bbf670bf6d6045fffef6c8fcb

14 years agoam 7713b900: Merge "Fixing namespace+prefix mode in Expat and removing optional field...
Jesse Wilson [Fri, 19 Mar 2010 20:50:30 +0000 (13:50 -0700)]
am 7713b900: Merge "Fixing namespace+prefix mode in Expat and removing optional fields from callbacks."

Merge commit '7713b900d12c7a46334db46b33fbe848167189dd' into dalvik-dev

* commit '7713b900d12c7a46334db46b33fbe848167189dd':
  Fixing namespace+prefix mode in Expat and removing optional fields from callbacks.

14 years agoMerge "Fixing namespace+prefix mode in Expat and removing optional fields from callba...
Jesse Wilson [Fri, 19 Mar 2010 20:39:28 +0000 (13:39 -0700)]
Merge "Fixing namespace+prefix mode in Expat and removing optional fields from callbacks."

14 years agoFixing namespace+prefix mode in Expat and removing optional fields from callbacks.
Jesse Wilson [Fri, 19 Mar 2010 19:51:43 +0000 (12:51 -0700)]
Fixing namespace+prefix mode in Expat and removing optional fields from callbacks.

The first part is related to bug 6632:
  http://code.google.com/p/android/issues/detail?id=6632

I added these optional fields back when I was originally updating
the XML parser for Froyo. I've decided to remove them to simplify
migrating between Android and the RI. It should also save some
object allocations.

Note that the RI v5 and the RI v6 behave differently for optional
values on attributes; this motivated me to add the otherwise
unfortunate assertOneOf() method to the testcase. (We behave more
like RI v6, which is to supply the values upon request)

Change-Id: Icfa5d29976a86bf194b3ed7c0d9e2275c3bff9dd

14 years agoAdded flags to the vm:
Barry Hayes [Wed, 17 Mar 2010 19:12:39 +0000 (12:12 -0700)]
Added flags to the vm:
-Xgc:[no]preverify
-Xgc:[no]postverify
to run verify routines over the heap pre- and post-gc.

Changed the Verify.h interface. It now publishes an entry point for
verifying a HeapBitmap, rather than the HeapBitmap callback.

Added a dvmHeapSuspendAndVerify to Heap.h for verification outside of
the GC.

Added callbacks before and after GC, under the locks, under flag control.
Processing of properties to produce flags is in a different project,
frameworks/base

Change-Id: I3f3896583fe9e7239bbe2f374d7ed4c5dd5d3e82

14 years agoMerge "The "referent" field of java.lang.ref.Reference objects is NOT included in...
Barry Hayes [Fri, 19 Mar 2010 19:57:52 +0000 (12:57 -0700)]
Merge "The "referent" field of java.lang.ref.Reference objects is NOT included in ifieldRefCount. See Class.c precacheReferenceOffsets for this amusing bit of VM trivia." into dalvik-dev

14 years agoThe "referent" field of java.lang.ref.Reference objects is NOT
Barry Hayes [Fri, 19 Mar 2010 17:10:59 +0000 (10:10 -0700)]
The "referent" field of java.lang.ref.Reference objects is NOT
included in ifieldRefCount.
See Class.c precacheReferenceOffsets for this amusing bit of VM trivia.

Added an explicit VERIFY_REFERENCE of the Reference.referent field for
subclasses of Reference.

Change-Id: Ibc8a059ffb353d60b681af1d3a5520c2443d3864

14 years agoam e073b0e8: Move String creation outside O(n^2) path in LogManager
Bjorn Bringert [Fri, 19 Mar 2010 17:08:00 +0000 (10:08 -0700)]
am e073b0e8: Move String creation outside O(n^2) path in LogManager

Merge commit 'e073b0e86ea089a08685202f78fe446cd03b3d49' into dalvik-dev

* commit 'e073b0e86ea089a08685202f78fe446cd03b3d49':
  Move String creation outside O(n^2) path in LogManager

14 years agoMove String creation outside O(n^2) path in LogManager
Bjorn Bringert [Fri, 19 Mar 2010 11:22:40 +0000 (11:22 +0000)]
Move String creation outside O(n^2) path in LogManager

This more than halves the number of Strings and StringBuilders created
when constructing a GoogleHttpClient and executing a single
HTTP request.

Bug http://b/issue?id=2529141

Change-Id: Ia8268fd692b08cf82e4abbffe1459e461e9f7e68

14 years agoMerge "Add's Java 6's DecimalFormat.setRoundingMode (et cetera)." into dalvik-dev
Elliott Hughes [Fri, 19 Mar 2010 01:12:07 +0000 (18:12 -0700)]
Merge "Add's Java 6's DecimalFormat.setRoundingMode (et cetera)." into dalvik-dev

14 years agoAdd's Java 6's DecimalFormat.setRoundingMode (et cetera).
Elliott Hughes [Fri, 19 Mar 2010 00:00:07 +0000 (17:00 -0700)]
Add's Java 6's DecimalFormat.setRoundingMode (et cetera).

Format and NumberFormat's bogusly-public constructors became protected with
Java 6. DecimalFormat gained more control over rounding behavior. There's a
slight mismatch with our ICU4C-based implementation in that ICU4C doesn't
support RoundingMode.UNNECESSARY, so I've had to fake that (but I doubt it's
used much, if at all).

I've pulled out the obviously Android-specific tests from the harmony
DecimalFormatTest.java, but I've only brought back the rounding mode changes
from the current harmony code to avoid the new tests' dependencies. I've also
added one new test of my own, to check that setMaximumFractionDigits affects
rounding as it should (since the harmony tests don't test this, and it's
somewhat subtle).

Bug: 2497395
Change-Id: Ifafc8bb051e078ead988073281f5c33f0aeb130a

14 years agoam 94e57f7b: Merge "Increase sleep delays on debug thread kill."
Andy McFadden [Fri, 19 Mar 2010 00:05:40 +0000 (17:05 -0700)]
am 94e57f7b: Merge "Increase sleep delays on debug thread kill."

Merge commit '94e57f7bb8e60210e379bfea29471db059a7edca' into dalvik-dev

* commit '94e57f7bb8e60210e379bfea29471db059a7edca':
  Increase sleep delays on debug thread kill.

14 years agoMerge "Increase sleep delays on debug thread kill."
Andy McFadden [Thu, 18 Mar 2010 23:57:30 +0000 (16:57 -0700)]
Merge "Increase sleep delays on debug thread kill."

14 years agoIncrease sleep delays on debug thread kill.
Andy McFadden [Thu, 18 Mar 2010 23:27:14 +0000 (16:27 -0700)]
Increase sleep delays on debug thread kill.

It appears the delays between the signals were insufficient for a busy
system.  This increases the timeouts to larger values, which may or may
not be sufficient.  What's really needed here is a way to monitor
debuggerd's activity, but that seems like a lot of work for what this
wants to accomplish.

Also, set gDvm.nativeDebuggerActive to true to prevent the heapworker
watchdog timeout from firing.  (Either somebody is going to attach a
debugger soon, or the process is going to die, so it's reasonable to
do here.)

Change-Id: Ic92590499871860ef766147eeaa6efc7afb4acdc

14 years agoMerge "Add Java 6's Scanner.reset and fix RuleBasedCollator's javadoc." into dalvik-dev
Elliott Hughes [Thu, 18 Mar 2010 20:41:41 +0000 (13:41 -0700)]
Merge "Add Java 6's Scanner.reset and fix RuleBasedCollator's javadoc." into dalvik-dev

14 years agoAdd Java 6's Scanner.reset and fix RuleBasedCollator's javadoc.
Elliott Hughes [Thu, 18 Mar 2010 18:31:16 +0000 (11:31 -0700)]
Add Java 6's Scanner.reset and fix RuleBasedCollator's javadoc.

(The harmony ScannerTest.java is quite different from ours, and doesn't test
this trivial method anyway.)

Bug: 2497395
Change-Id: I8b2b3db7233f766ef70bfdbfdcdfbd0f23e4bdb4

14 years agoam 253eebd3: Drop needless parens from Javadoc.
Jesse Wilson [Thu, 18 Mar 2010 18:25:12 +0000 (11:25 -0700)]
am 253eebd3: Drop needless parens from Javadoc.

Merge commit '253eebd34a7a4a30b20cbfd42dbfd7117af8a154' into dalvik-dev

* commit '253eebd34a7a4a30b20cbfd42dbfd7117af8a154':
  Drop needless parens from Javadoc.

14 years agoam 1573a78e: Merge "Javadoc for JSONArray."
Jesse Wilson [Thu, 18 Mar 2010 18:20:17 +0000 (11:20 -0700)]
am 1573a78e: Merge "Javadoc for JSONArray."

Merge commit '1573a78ed4898aaf4a38abf6ea0ab1254459282b' into dalvik-dev

* commit '1573a78ed4898aaf4a38abf6ea0ab1254459282b':
  Javadoc for JSONArray.

14 years agoDrop needless parens from Javadoc.
Jesse Wilson [Thu, 18 Mar 2010 18:18:42 +0000 (11:18 -0700)]
Drop needless parens from Javadoc.

Although this violates my longstanding style preference, it agrees
with almighty JJB's official ArrayList, which is Good Enough For Me.

Change-Id: I7b608c12e04d0b7789bfcabeab4b7347ad22baca

14 years agoMerge "Javadoc for JSONArray."
Jesse Wilson [Thu, 18 Mar 2010 18:14:45 +0000 (11:14 -0700)]
Merge "Javadoc for JSONArray."

14 years agoJavadoc for JSONArray.
Jesse Wilson [Thu, 18 Mar 2010 06:50:48 +0000 (23:50 -0700)]
Javadoc for JSONArray.

Change-Id: I3aced2607b48210f76887e0d42b591c098ce5db7

14 years agoam 58ece73d: Bug fix for JIT peephole optimization.
Ben Cheng [Thu, 18 Mar 2010 16:37:50 +0000 (09:37 -0700)]
am 58ece73d: Bug fix for JIT peephole optimization.

Merge commit '58ece73d25c78a05b94c820c5ec65b8a2edca81f' into dalvik-dev

* commit '58ece73d25c78a05b94c820c5ec65b8a2edca81f':
  Bug fix for JIT peephole optimization.

14 years agoBug fix for JIT peephole optimization.
Ben Cheng [Thu, 18 Mar 2010 06:32:26 +0000 (23:32 -0700)]
Bug fix for JIT peephole optimization.

Bug: 2520500
Change-Id: I36dbd8b3a6d13c40f9735df4918ab02b5f053b07

14 years agoMerge "Add Java 6's Logger.GLOBAL_LOGGER_NAME field." into dalvik-dev
Elliott Hughes [Wed, 17 Mar 2010 23:41:34 +0000 (16:41 -0700)]
Merge "Add Java 6's Logger.GLOBAL_LOGGER_NAME field." into dalvik-dev

14 years agoam 31275264: Fixing 10 of the XPath failures caused by a malformed Document.
Jesse Wilson [Wed, 17 Mar 2010 23:36:36 +0000 (16:36 -0700)]
am 31275264: Fixing 10 of the XPath failures caused by a malformed Document.

Merge commit '312752642a4539788952260fc517d286f6a6202e' into dalvik-dev

* commit '312752642a4539788952260fc517d286f6a6202e':
  Fixing 10 of the XPath failures caused by a malformed Document.

14 years agoAdd Java 6's Logger.GLOBAL_LOGGER_NAME field.
Elliott Hughes [Wed, 17 Mar 2010 23:28:07 +0000 (16:28 -0700)]
Add Java 6's Logger.GLOBAL_LOGGER_NAME field.

Also deprecated Logger.global.

Bug: 2497395
Change-Id: I28e5f83116277430c4eb0773b238670c0dd80847

14 years agoAdd Java 6's new PipedReader/PipedInputStream constructors.
Elliott Hughes [Wed, 17 Mar 2010 22:54:54 +0000 (15:54 -0700)]
Add Java 6's new PipedReader/PipedInputStream constructors.

Also bring back the latest harmony java6 branch tests, and modify them to pass
with our deliberate [spec-compliant] exception changes.

Bug: 2497395
Change-Id: Ifb3f9bf48f8eec4120f9e59b03beb3969cfe0cd3

14 years agoFixing 10 of the XPath failures caused by a malformed Document.
Jesse Wilson [Wed, 17 Mar 2010 23:16:15 +0000 (16:16 -0700)]
Fixing 10 of the XPath failures caused by a malformed Document.

See bug 2518858.

This makes our XPath implementation fail the exact same tests
as the RI's. (which we assume is also based on Apache Xalan)

Change-Id: I9a98323113c95609651e948ad11113f84ccd87ec

14 years agoFixing an import of a JUnit class that isn't available in dalvik-dev.
Jesse Wilson [Wed, 17 Mar 2010 21:52:33 +0000 (14:52 -0700)]
Fixing an import of a JUnit class that isn't available in dalvik-dev.

14 years agoMerge "Add Java 6's ObjectStreamClass.lookupAny." into dalvik-dev
Elliott Hughes [Wed, 17 Mar 2010 19:02:09 +0000 (12:02 -0700)]
Merge "Add Java 6's ObjectStreamClass.lookupAny." into dalvik-dev

14 years agoam f6976780: Merge "Exercising our XPath implementation with 279 of Jaxen\'s tests."
Jesse Wilson [Wed, 17 Mar 2010 18:46:54 +0000 (11:46 -0700)]
am f6976780: Merge "Exercising our XPath implementation with 279 of Jaxen\'s tests."

Merge commit 'f6976780647c6b9bb168cc7a9c5c8f4ce1425caf' into dalvik-dev

* commit 'f6976780647c6b9bb168cc7a9c5c8f4ce1425caf':
  Exercising our XPath implementation with 279 of Jaxen's tests.

14 years agoMerge "Exercising our XPath implementation with 279 of Jaxen's tests."
Jesse Wilson [Wed, 17 Mar 2010 18:42:23 +0000 (11:42 -0700)]
Merge "Exercising our XPath implementation with 279 of Jaxen's tests."

14 years agoAdd Java 6's ObjectStreamClass.lookupAny.
Elliott Hughes [Wed, 17 Mar 2010 18:42:16 +0000 (11:42 -0700)]
Add Java 6's ObjectStreamClass.lookupAny.

Also bring back the latest harmony java6 tests. We fail two of these tests,
but this is not a regression caused by this patch: our existing code fails
the same tests in the same way, so we already had the bugs and just didn't
know.

Bug: 2497395
Change-Id: I70412cdea747c30ea8d19a55d2ae5e73d3c59c1a

14 years agoam 82ebe52a: Merge "Javadocs for JSONObject."
Jesse Wilson [Wed, 17 Mar 2010 18:24:53 +0000 (11:24 -0700)]
am 82ebe52a: Merge "Javadocs for JSONObject."

Merge commit '82ebe52a3e4ee91ccbef38d241b2b1fd9409a03e' into dalvik-dev

* commit '82ebe52a3e4ee91ccbef38d241b2b1fd9409a03e':
  Javadocs for JSONObject.

14 years agoMerge "Javadocs for JSONObject."
Jesse Wilson [Wed, 17 Mar 2010 18:18:15 +0000 (11:18 -0700)]
Merge "Javadocs for JSONObject."

14 years agoJavadocs for JSONObject.
Jesse Wilson [Wed, 17 Mar 2010 06:41:33 +0000 (23:41 -0700)]
Javadocs for JSONObject.

Change-Id: I5ec9df6a3a9baac8f4f498890cd35feff774737a

14 years agoMerge "misc DalvikRunner changes" into dalvik-dev
Brian Carlstrom [Wed, 17 Mar 2010 16:23:40 +0000 (09:23 -0700)]
Merge "misc DalvikRunner changes" into dalvik-dev

14 years agoMerge "Add Java 6's PrintStream.clearError/PrintWriter.clearError methods." into...
Elliott Hughes [Wed, 17 Mar 2010 04:01:49 +0000 (21:01 -0700)]
Merge "Add Java 6's PrintStream.clearError/PrintWriter.clearError methods." into dalvik-dev

14 years agoAdd Java 6's PrintStream.clearError/PrintWriter.clearError methods.
Elliott Hughes [Wed, 17 Mar 2010 01:02:50 +0000 (18:02 -0700)]
Add Java 6's PrintStream.clearError/PrintWriter.clearError methods.

Also bring back the latest harmony java6 branch tests.

Bug: 2497395
Change-Id: I242e9a7d0446b46faaa5b28e0348806e999d8fdf

14 years agoFix "run-core-tests.sh" to work again.
Elliott Hughes [Wed, 17 Mar 2010 00:33:15 +0000 (17:33 -0700)]
Fix "run-core-tests.sh" to work again.

cshapiro was complaining about this the other week, and I needed it today.
We should fix the duplication, but Android's crippled shell makes that
awkward, and this is the simplest thing that lets us carry on working...

Change-Id: I4c1a764d6069ba55a021631acdc4d6a665df0089

14 years agoMerge "Add Java 6's java.io.Console." into dalvik-dev
Elliott Hughes [Wed, 17 Mar 2010 00:31:41 +0000 (17:31 -0700)]
Merge "Add Java 6's java.io.Console." into dalvik-dev

14 years agoAdd Java 6's java.io.Console.
Elliott Hughes [Tue, 16 Mar 2010 23:43:17 +0000 (16:43 -0700)]
Add Java 6's java.io.Console.

This is actually functional, if you're in the mood to "adb shell".

The implementation is based on harmony's, but with the initialization and
native code rewritten, with readPassword responsible for echoing a newline (so
we don't have to play silly tricks with the ECHONL flag), and a vastly
simplified ConsoleReader class. I've also rewritten the documentation.

Change-Id: I902b47fb27a8fdb2d6f067bb905ee02c6a10e454

14 years agoExercising our XPath implementation with 279 of Jaxen's tests.
Jesse Wilson [Tue, 16 Mar 2010 23:52:54 +0000 (16:52 -0700)]
Exercising our XPath implementation with 279 of Jaxen's tests.

Both our implementation and the RIv6 fail 29 tests, 17 of which are
"could not find function" failures regarding our common lack of
support for the evaluate(), document(), upper-case() and lower-case()
functions.

In addition, our implementation fails 10 additional tests:
  xml/moreover.xml / /child::node() "expected:<1> but was:<3>"
  xml/simple.xml / string() "expected:<abd> but was:<"
  xml/web.xml / /child::node() "expected:<web-app> but was:<>"
  xml/web.xml / child::node() "expected:<web-app> but was:<>"
  xml/web.xml / name(/child::node()) "expected:<web-app> but was:<>"
  xml/web.xml / name(/child::node()) "expected:<web-app> but was:<>"
  xml/web.xml / name(/node()) "expected:<web-app> but was:<>"
  xml/web.xml / name(child::node()) "expected:<web-app> but was:<>"
  xml/web.xml / name(node()) "expected:<web-app> but was:<>"
  xml/web.xml /* name(../child::node()) "expected:<web-app> but was:<>"

Change-Id: Icb4695bbf826fd8f1c1ffae5e857169ff551f75e

14 years agomisc DalvikRunner changes
Brian Carlstrom [Fri, 12 Mar 2010 21:27:03 +0000 (13:27 -0800)]
misc DalvikRunner changes

Summary:
- "vogar --debug-port <port>" now overrides --timeout-seconds to be zero
  to prevent timeouts during interactive debugging
- "vogar --timeout-seconds 0" now disables timeout
  as a side-effect of the previous change
- "vogar" no longer defaults to "javac -Xmaxerrs 1"
  This is to make using vogar's output more useful when iteratively developing tests.
  continuous build needs to use "vogar --javac-arg -Xmaxerrs --javac-arg 1"
- "vogar --ident ''" allows disabling of output formating
  This prevents output parsing problems for Emacs *compilation* buffers

Change-Id: I599590c9c4fe3c57524af5c4d7f2be2e30ad4685

14 years agoam 9fa39c91: Add missing macro SIGNATURE_BREAKPOINT.
Ben Cheng [Tue, 16 Mar 2010 23:30:00 +0000 (16:30 -0700)]
am 9fa39c91: Add missing macro SIGNATURE_BREAKPOINT.

Merge commit '9fa39c91c885a05ce544d0899089212321413c13' into dalvik-dev

* commit '9fa39c91c885a05ce544d0899089212321413c13':
  Add missing macro SIGNATURE_BREAKPOINT.

14 years agoAdd missing macro SIGNATURE_BREAKPOINT.
Ben Cheng [Tue, 16 Mar 2010 23:20:48 +0000 (16:20 -0700)]
Add missing macro SIGNATURE_BREAKPOINT.

Change-Id: I9e450b7b2ff34a3609a99bf8fe11e3efa88ccc30

14 years agoam 79cea5c9: Merge "Implement signature-based breakpoint for the JIT compiler."
Ben Cheng [Tue, 16 Mar 2010 23:20:43 +0000 (16:20 -0700)]
am 79cea5c9: Merge "Implement signature-based breakpoint for the JIT compiler."

Merge commit '79cea5c97267e0b3e35e0c2b70e2662aa533f200' into dalvik-dev

* commit '79cea5c97267e0b3e35e0c2b70e2662aa533f200':
  Implement signature-based breakpoint for the JIT compiler.

14 years agoMerge "Implement signature-based breakpoint for the JIT compiler."
Ben Cheng [Tue, 16 Mar 2010 23:16:08 +0000 (16:16 -0700)]
Merge "Implement signature-based breakpoint for the JIT compiler."

14 years agoam 288de8e6: Merge "Replace a use of index with strchr."
Carl Shapiro [Tue, 16 Mar 2010 23:14:08 +0000 (16:14 -0700)]
am 288de8e6: Merge "Replace a use of index with strchr."

Merge commit '288de8e67b5a2c2e6a19372a2b99f17ca17de2fa' into dalvik-dev

* commit '288de8e67b5a2c2e6a19372a2b99f17ca17de2fa':
  Replace a use of index with strchr.

14 years agoMerge "Replace a use of index with strchr."
Carl Shapiro [Tue, 16 Mar 2010 23:08:38 +0000 (16:08 -0700)]
Merge "Replace a use of index with strchr."