OSDN Git Service

android-x86/dalvik.git
14 years agoAdding expectations for a bunch of jtreg tests.
Jesse Wilson [Sat, 19 Dec 2009 01:21:50 +0000 (17:21 -0800)]
Adding expectations for a bunch of jtreg tests.

Although tedious, we found a real bug in the mix. This also removes some
of the noise from our test results.

14 years agoMerge change I1e941570
Android (Google) Code Review [Fri, 18 Dec 2009 18:40:43 +0000 (10:40 -0800)]
Merge change I1e941570

* changes:
  Depessimize string conversions.

14 years agoDepessimize string conversions.
Elliott Hughes [Fri, 18 Dec 2009 05:09:08 +0000 (21:09 -0800)]
Depessimize string conversions.

Why does this idiom persist? It's ugly, and it's the least efficient way to do
it. (I found the ones in DecimalFormatSymbols while invesigating why
"new SimpleDateFormat()" burns through so many StringBuilders. grep(1) found
the rest.)

The DocumentBuilderImpl removes an unnecessary level of indirection, since we
implement Character.toString in terms of String.valueOf. (I wouldn't have
bothered except this was the only use of Character.toString in the core
libraries, and I added it myself a few weeks ago.)

14 years agoMerge change I60383632
Android (Google) Code Review [Fri, 18 Dec 2009 18:17:03 +0000 (10:17 -0800)]
Merge change I60383632

* changes:
  Update luni package to Harmony r888752.

14 years agoMerge change I1ecd9dcd
Android (Google) Code Review [Fri, 18 Dec 2009 15:20:11 +0000 (07:20 -0800)]
Merge change I1ecd9dcd

* changes:
  Use writev() for DDMS packets.

14 years agoMerge change I83849e4a
Android (Google) Code Review [Fri, 18 Dec 2009 05:02:25 +0000 (21:02 -0800)]
Merge change I83849e4a

* changes:
  Improve our java.util.Locale documentation.

14 years agoImprove our java.util.Locale documentation.
Elliott Hughes [Thu, 17 Dec 2009 21:53:47 +0000 (13:53 -0800)]
Improve our java.util.Locale documentation.

Bug: http://code.google.com/p/android/issues/detail?id=5476

14 years agoRename dalvik_jtreg to dalvik_runner.
Jesse Wilson [Fri, 18 Dec 2009 02:54:54 +0000 (18:54 -0800)]
Rename dalvik_jtreg to dalvik_runner.

Now that it runs caliper and JUnit, the old name was awful clumsy.

14 years agoFixing clean to use rm -rf so it won't fail if the directory wasn't ever created.
Jesse Wilson [Fri, 18 Dec 2009 02:10:17 +0000 (18:10 -0800)]
Fixing clean to use rm -rf so it won't fail if the directory wasn't ever created.

Adding a --skip-clean option.
Adding a --device-runner-dir option to run off the SD card

14 years agoUse writev() for DDMS packets.
Andy McFadden [Fri, 18 Dec 2009 00:21:36 +0000 (16:21 -0800)]
Use writev() for DDMS packets.

The code was using the JDWP "expanding buffer" stuff, which is fine for
4-byte status messages but will be terrible for buffers of tracing and
profiling data.  Now we construct the header in a separate buffer.

14 years agoMerge change Ib1d8044e
Android (Google) Code Review [Fri, 18 Dec 2009 00:05:17 +0000 (16:05 -0800)]
Merge change Ib1d8044e

* changes:
  Jit: Briefly delay start of Jit'ng in attempt to avoid compiling init code

14 years agoJit: Briefly delay start of Jit'ng in attempt to avoid compiling init code
Bill Buzbee [Thu, 17 Dec 2009 22:55:21 +0000 (14:55 -0800)]
Jit: Briefly delay start of Jit'ng in attempt to avoid compiling init code

Via subjective manual side-by-side testing of jit vs. no-jit, the mterp
version looked like it tended to reach first screen on application launch
very slightly before the Jit version.  This change adds an old and
commonly-used Jit trick to delay jit startup in an attempt to avoid wasting
effort compiling initialization code.

Also, deletes some code no longer in use.

14 years agoMerge change Iac175b4f
Android (Google) Code Review [Thu, 17 Dec 2009 21:26:42 +0000 (13:26 -0800)]
Merge change Iac175b4f

* changes:
  Two minor JNI fixes.

14 years agoTwo minor JNI fixes.
Andy McFadden [Thu, 17 Dec 2009 19:21:09 +0000 (11:21 -0800)]
Two minor JNI fixes.

(1) In the CheckJNI return type scanner, don't assume that the caller's
class loader is already listed as an initiating loader for the type
being returned.

(2) Make sure the PlatformAddress class is initialized before calling
one of its static methods from NewDirectByteBuffer.

14 years agoCleaning up after each test to avoid exhausting disk space.
Jesse Wilson [Thu, 17 Dec 2009 19:12:33 +0000 (11:12 -0800)]
Cleaning up after each test to avoid exhausting disk space.
Moving tests to the local sdcard.

14 years agoMerge change Ice913bbd
Android (Google) Code Review [Thu, 17 Dec 2009 03:43:23 +0000 (19:43 -0800)]
Merge change Ice913bbd

* changes:
  Make java.lang.Character fast.

14 years agoMake java.lang.Character fast.
Elliott Hughes [Wed, 16 Dec 2009 23:37:18 +0000 (15:37 -0800)]
Make java.lang.Character fast.

This patch reinstates some of the upstream ASCII fast paths, adds some new
ones, and forwards all char overloads to the int methods (placing the fast
paths in the int overload), so using the int overload isn't automatically
3x slower than the char overload even for the same characters.

See the bug for benchmark results. The ASCII speedups are between 2x and 4x.

Bug: 2295801

14 years agoFixed a bug int the new version of Long.reverse introduce in change Id6bd7c81.
Joshua Bloch [Thu, 17 Dec 2009 02:01:32 +0000 (18:01 -0800)]
Fixed a bug int the new version of Long.reverse introduce in change Id6bd7c81.
The corresponding code in Hacker's Delight is written in C, which supports
unsigned numbers. In Java, it's essential to use explicit unsigned shifts,
but I neglected to do so.  This bug was caught by jtreg test
java.lang.Long.BitTwiddle (which I wrote in 2003).  This preexisting
test serves as the regression test for this change.

14 years agoAdding some debugging to help figure out why our tests aren't completing.
Jesse Wilson [Thu, 17 Dec 2009 00:15:34 +0000 (16:15 -0800)]
Adding some debugging to help figure out why our tests aren't completing.

14 years agoMerge change I24ac537c
Android (Google) Code Review [Wed, 16 Dec 2009 21:33:04 +0000 (13:33 -0800)]
Merge change I24ac537c

* changes:
  Move VFP register save/restore routines from template to codegen.

14 years agoMove VFP register save/restore routines from template to codegen.
Ben Cheng [Wed, 16 Dec 2009 21:15:53 +0000 (13:15 -0800)]
Move VFP register save/restore routines from template to codegen.

Code in the template directory will occupy space in the code cache and is
invoked from JIT'ed code. Since these routines are only invoked from statically
compiled functions we can move them to the codegen directory which also has
arch-variant configurations.

14 years agoMerge change Id6bd7c81
Android (Google) Code Review [Wed, 16 Dec 2009 20:59:33 +0000 (12:59 -0800)]
Merge change Id6bd7c81

* changes:
  Rewrote all the toString and bit twiddling code in Integer and Long using state-of-the-art recipes.  The resulting code is much faster than what it replaced, as well as being more concise. While I was in the neighborhood I also cleaned up a few other things in the boxed primitives (TYPE fields, small-value caches, etc.).

14 years agoMaking helper threads daemons in the jtreg runner.
Jesse Wilson [Wed, 16 Dec 2009 18:35:06 +0000 (10:35 -0800)]
Making helper threads daemons in the jtreg runner.

Fixing a bug where we were attempting to execute errord out tests. And
renaming the testClasses to a testClasspath.

14 years agoUpdate luni package to Harmony r888752.
Jesse Wilson [Wed, 16 Dec 2009 01:00:02 +0000 (17:00 -0800)]
Update luni package to Harmony r888752.

    Conflicts:
     libcore/luni/META-INF/MANIFEST.MF
     libcore/luni/make/findbugs-exclude-filter.xml
     libcore/luni/src/main/java/java/io/BufferedOutputStream.java
     libcore/luni/src/main/java/java/io/BufferedReader.java
     libcore/luni/src/main/java/java/io/CharArrayReader.java
     libcore/luni/src/main/java/java/io/StringReader.java
     libcore/luni/src/main/java/java/lang/StrictMath.java
     libcore/luni/src/main/java/java/lang/ref/ReferenceQueue.java
     libcore/luni/src/main/java/java/net/Inet4Address.java
     libcore/luni/src/main/java/java/net/InetAddress.java
     libcore/luni/src/main/java/java/util/ArrayList.java
     libcore/luni/src/main/java/java/util/EnumSet.java
     libcore/luni/src/main/java/java/util/HugeEnumSet.java
     libcore/luni/src/main/java/org/apache/harmony/luni/internal/reflect/ProxyConstantPool.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/AbstractMemorySpy.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/DebugMemorySpy.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/Endianness.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/IFileSystem.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/IMemorySystem.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/INetworkSystem.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/IPlatformConstants.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSFileSystem.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSMemory.java
     libcore/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
     libcore/luni/src/main/java/org/apache/harmony/luni/util/InputStreamExposer.java
     libcore/luni/src/main/native/hyzip/shared/zipcache.c
     libcore/luni/src/main/native/hyzip/shared/zipsup.c
     libcore/luni/src/main/native/include/jni.h
     libcore/luni/src/main/native/include/jni_types.h
     libcore/luni/src/main/native/include/jvmti.h
     libcore/luni/src/main/native/include/jvmti_types.h
     libcore/luni/src/main/native/launcher/unix/main_hlp.c
     libcore/luni/src/main/native/luni/shared/OSNetworkSystem.c
     libcore/luni/src/main/native/luni/shared/file.c
     libcore/luni/src/main/native/luni/windows/makefile
     libcore/luni/src/test/api/unix/org/apache/harmony/luni/tests/java/io/UnixFileTest.java
     libcore/luni/src/test/java/tests/api/java/io/BufferedOutputStreamTest.java
     libcore/luni/src/test/java/tests/api/java/io/BufferedReaderTest.java
     libcore/luni/src/test/java/tests/api/java/io/SerializationStressTest.java
     libcore/luni/src/test/java/tests/api/java/net/SocketTest.java
     libcore/luni/src/test/java/tests/api/java/util/ArrayListTest.java
     libcore/luni/src/test/java/tests/api/java/util/EnumSetTest.java
     libcore/luni/src/test/java/tests/api/java/util/TimerTest.java

14 years agoMerge change Iadae8af9
Android (Google) Code Review [Wed, 16 Dec 2009 07:51:57 +0000 (23:51 -0800)]
Merge change Iadae8af9

* changes:
  Updating Caliper runner to correspond with caliper r20091215

14 years agoUpdating Caliper runner to correspond with caliper r20091215
Jesse Wilson [Wed, 16 Dec 2009 02:59:27 +0000 (18:59 -0800)]
Updating Caliper runner to correspond with caliper r20091215

14 years agoRewrote all the toString and bit twiddling code in Integer and Long using
Joshua Bloch [Tue, 15 Dec 2009 00:32:33 +0000 (16:32 -0800)]
Rewrote all the toString and bit twiddling code in Integer and Long using
state-of-the-art recipes.  The resulting code is much faster than what it
replaced, as well as being more concise. While I was in the neighborhood
I also cleaned up a few other things in the boxed primitives (TYPE fields,
small-value caches, etc.).

Addressed review comments.

14 years agoFix our test runner to look inside source files for package declarations.
Elliott Hughes [Wed, 16 Dec 2009 00:27:08 +0000 (16:27 -0800)]
Fix our test runner to look inside source files for package declarations.

The relevant libcore .java files were all under test/java/ directories, but
that's not generally true, and not true in the specific case of caliper's
benchmarks.

14 years agoFix dalvik_jtreg build.
Elliott Hughes [Tue, 15 Dec 2009 23:50:08 +0000 (15:50 -0800)]
Fix dalvik_jtreg build.

Use the same technique frameworks/base uses when building external/apache-http
to build the dalvik_jtreg dependencies. This is ugly, but seems to keep the
host and device builds off each others' toes.

14 years agoMerge change I326caaa3
Android (Google) Code Review [Tue, 15 Dec 2009 23:46:19 +0000 (15:46 -0800)]
Merge change I326caaa3

* changes:
  Fix our SSLSession implementations to call valueUnbound on remove.

14 years agoFix our SSLSession implementations to call valueUnbound on remove.
Elliott Hughes [Tue, 15 Dec 2009 23:32:28 +0000 (15:32 -0800)]
Fix our SSLSession implementations to call valueUnbound on remove.

This addresses the other problem from the following abandoned change:
  https://android-git.corp.google.com/g/4743

14 years agoMerge change Id2be5eb7
Android (Google) Code Review [Tue, 15 Dec 2009 23:26:27 +0000 (15:26 -0800)]
Merge change Id2be5eb7

* changes:
  Eclipse doesn't like that this class' directory didn't match its package.

14 years agoam 61fdb24e: (-s ours) am 173411f7: Temporarily omit libcore tests that fail when...
Brett Chabot [Tue, 15 Dec 2009 23:06:05 +0000 (15:06 -0800)]
am 61fdb24e: (-s ours) am 173411f7: Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.

Merge commit '61fdb24e732f0effb72c70491845a497e99faae1'

* commit '61fdb24e732f0effb72c70491845a497e99faae1':
  Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.

14 years agoEclipse doesn't like that this class' directory didn't match its package.
Elliott Hughes [Tue, 15 Dec 2009 22:13:27 +0000 (14:13 -0800)]
Eclipse doesn't like that this class' directory didn't match its package.

Resolve in favor of the package declaration.

14 years agoFix OpenSSLSessionImpl.getCreationTime and getLastAccessedTime.
Elliott Hughes [Tue, 15 Dec 2009 21:06:11 +0000 (13:06 -0800)]
Fix OpenSSLSessionImpl.getCreationTime and getLastAccessedTime.

This addresses one part of this abandoned change from ursg:
  https://android-git.corp.google.com/g/4743

I've also tidied up the native method names to use the harmony "-Impl"
convention, removed useless methods that just forward to a native method,
and removed dead code. I've canonicalized some of the duplication too,
but I want to go through the rest of out OpenSSL code before I really start
trying to remove the duplication.

When this is submitted, I'll fix the other (unrelated) bug the abandoned
change addressed.

14 years agoam 173411f7: Temporarily omit libcore tests that fail when run in CTS harness. DO...
Brett Chabot [Tue, 15 Dec 2009 18:59:23 +0000 (10:59 -0800)]
am 173411f7: Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.

Merge commit '173411f7a11c81bef07adc28c66ce4c417df67ff' into eclair-plus-aosp

* commit '173411f7a11c81bef07adc28c66ce4c417df67ff':
  Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.

14 years agoMerge commit 'goog/eclair-plus-aosp'
Android Git Automerger [Tue, 15 Dec 2009 08:44:44 +0000 (00:44 -0800)]
Merge commit 'goog/eclair-plus-aosp'

14 years agoTemporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.
Brett Chabot [Mon, 14 Dec 2009 23:49:13 +0000 (15:49 -0800)]
Temporarily omit libcore tests that fail when run in CTS harness. DO NOT MERGE.

Bug 2155700

Change-Id: Ib0f9d363842d713ce3e07cdd303078c5c3e518c9

14 years agoMerge change I1d96b51e
Android (Google) Code Review [Mon, 14 Dec 2009 22:35:24 +0000 (14:35 -0800)]
Merge change I1d96b51e

* changes:
  Merge branch 'archive_888752' into archive_dalvik

14 years agoMerge change Icf57d5da
Android (Google) Code Review [Mon, 14 Dec 2009 22:33:06 +0000 (14:33 -0800)]
Merge change Icf57d5da

* changes:
  Merge branch 'logging_888752' into logging_dalvik

14 years agoMerge change Ie84afdff
Android (Google) Code Review [Mon, 14 Dec 2009 22:25:09 +0000 (14:25 -0800)]
Merge change Ie84afdff

* changes:
  Support running caliper with the jtreg runner. This is an early first look; we'll need to fix a few things before the UI for this is nice.

14 years agoMerge branch 'logging_888752' into logging_dalvik
Jesse Wilson [Thu, 10 Dec 2009 00:29:30 +0000 (16:29 -0800)]
Merge branch 'logging_888752' into logging_dalvik

Conflicts:
     libcore/logging/META-INF/MANIFEST.MF
     libcore/logging/src/main/java/java/util/logging/LogManager.java
     libcore/logging/src/main/java/java/util/logging/Logger.java
     libcore/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java

14 years agoDon't assume debugger wants all exceptions.
Andy McFadden [Sat, 5 Dec 2009 00:36:08 +0000 (16:36 -0800)]
Don't assume debugger wants all exceptions.

The JDWP implementation in the VM keeps a list of the objects that the
debugger knows about, and prevents the GC from collecting them (which
isn't strictly necessary, but it's a whole lot easier than doing it
right).  Because of the way it's implemented, it actually ended up
keeping track of all thrown exceptions, even if the debugger wasn't
interested in hearing about them.

With this change we now do a "late" registration of the exception
object, preventing exception-happy code from filling memory when the
debugger is attached.

14 years agoMerge change I11aa1bb5
Android (Google) Code Review [Fri, 11 Dec 2009 20:36:03 +0000 (12:36 -0800)]
Merge change I11aa1bb5

* changes:
  Jit: Fix 083-jit-regressions test to omit non-deterministic output

14 years agoJit: Fix 083-jit-regressions test to omit non-deterministic output
Bill Buzbee [Fri, 11 Dec 2009 17:01:12 +0000 (09:01 -0800)]
Jit: Fix 083-jit-regressions test to omit non-deterministic output

14 years agoMerge change I4c691d1a
Android (Google) Code Review [Fri, 11 Dec 2009 15:28:04 +0000 (07:28 -0800)]
Merge change I4c691d1a

* changes:
  Minor CheckJNI tweak.

14 years agoMerge change I909ce240
Android (Google) Code Review [Fri, 11 Dec 2009 15:27:44 +0000 (07:27 -0800)]
Merge change I909ce240

* changes:
  Iterate in JNI thread exit check.

14 years agoSupport running caliper with the jtreg runner. This is an early first look;
Jesse Wilson [Tue, 8 Dec 2009 23:43:05 +0000 (15:43 -0800)]
Support running caliper with the jtreg runner. This is an early first look;
we'll need to fix a few things before the UI for this is nice.

14 years agoIterate in JNI thread exit check.
Andy McFadden [Fri, 11 Dec 2009 00:38:30 +0000 (16:38 -0800)]
Iterate in JNI thread exit check.

The Dalvik VM includes a helpful check that kicks and screams if a thread
exits without detaching from the VM first.  It manages this with a pthread
TLS destructor.  This is handy, but it will interfere with anyone who
wants to use a TLS destructor to initiate the thread detach.

With this change, we now iterate a couple of times to allow other
destructors a chance to detach the thread before we get snippy.

For 2319072.

14 years agoMinor CheckJNI tweak.
Andy McFadden [Thu, 10 Dec 2009 23:11:18 +0000 (15:11 -0800)]
Minor CheckJNI tweak.

Check for "L;" class names, e.g. "Ljava/lang/String;", in CheckJNI.  If
we see one passed in, give a specific failure message instead of just
allowing the inevitable NoClassDefFoundError to propagate back.

Also, add a message string to the pre-formed NoClassDefFoundError used
by the bootstrap class loader so that it's obvious where it comes from.

14 years agoam 2859440d: am c51439a5: Fix a bug where, in static synchronized methods that had...
Dan Bornstein [Thu, 10 Dec 2009 23:14:59 +0000 (15:14 -0800)]
am 2859440d: am c51439a5: Fix a bug where, in static synchronized methods that had no other uses of registers (no locals, no parameters, no method calls with arguments), v0 would be used both to hold the object being synchronized on and to hold a caught exception.

Merge commit '2859440d31dcb5de958d32a6012c1f8b3c509344'

* commit '2859440d31dcb5de958d32a6012c1f8b3c509344':
  Fix a bug where, in static synchronized methods that had no other uses

14 years agoam c51439a5: Fix a bug where, in static synchronized methods that had no other uses...
Dan Bornstein [Thu, 10 Dec 2009 23:09:50 +0000 (15:09 -0800)]
am c51439a5: Fix a bug where, in static synchronized methods that had no other uses of registers (no locals, no parameters, no method calls with arguments), v0 would be used both to hold the object being synchronized on and to hold a caught exception.

Merge commit 'c51439a513d4cc3c2be4a7cce7b3e9ae480fd5c2' into eclair-mr2-plus-aosp

* commit 'c51439a513d4cc3c2be4a7cce7b3e9ae480fd5c2':
  Fix a bug where, in static synchronized methods that had no other uses

14 years agoMerge change I9388fbfd
Android (Google) Code Review [Thu, 10 Dec 2009 23:07:49 +0000 (15:07 -0800)]
Merge change I9388fbfd

* changes:
  More java.io.File cleanup.

14 years agoMore java.io.File cleanup.
Elliott Hughes [Thu, 10 Dec 2009 21:18:35 +0000 (13:18 -0800)]
More java.io.File cleanup.

Make File.list (and friends) cost one JNI call instead of four,
and move the conversion of UTF-8 byte sequences into the JNI, so
it returns String[] instead of byte[][].

Switch to readdir_r(3) so we don't need the JNI to be "static
synchronized".

Remove fixed-length buffers from the native code.

Fix leaks by introducing a "proper" native container (similar to
std::forward_list). We should still investigate either using
std::vector or passing in an ArrayList<String> and using JNI to
call ArrayList.add, but this is a step forward from the old
code anyway.

Bug: 2281992

14 years agoam 78199efa: am 39c5899d: Preflight cleanup of Ropper.java for style, whitespace...
Dan Bornstein [Thu, 10 Dec 2009 22:43:23 +0000 (14:43 -0800)]
am 78199efa: am 39c5899d: Preflight cleanup of Ropper.java for style, whitespace, etc., before doing some more drastic modifications. Also, bumped up the version number, rather than making changes first and then forgetting that important detail.

Merge commit '78199efa7615ac896c9a116737bb87f3724ead0b'

* commit '78199efa7615ac896c9a116737bb87f3724ead0b':
  Preflight cleanup of Ropper.java for style, whitespace, etc., before doing

14 years agoFix a bug where, in static synchronized methods that had no other uses
Dan Bornstein [Thu, 10 Dec 2009 22:37:32 +0000 (14:37 -0800)]
Fix a bug where, in static synchronized methods that had no other uses
of registers (no locals, no parameters, no method calls with arguments),
v0 would be used both to hold the object being synchronized on and to hold
a caught exception.

The result was code that, if an exception was thrown through it, would
in turn throw an IllegalMonitorStateException, as the vm would be
asked to monitor-exit the exception object and not the monitor-entered
class.

Dx test 062 has a couple new cases to cover this case as well as the
parallel instance method case (not that the latter was problematic,
but I like the symmetry).

14 years agoam 39c5899d: Preflight cleanup of Ropper.java for style, whitespace, etc., before...
Dan Bornstein [Thu, 10 Dec 2009 22:24:02 +0000 (14:24 -0800)]
am 39c5899d: Preflight cleanup of Ropper.java for style, whitespace, etc., before doing some more drastic modifications. Also, bumped up the version number, rather than making changes first and then forgetting that important detail.

Merge commit '39c5899d0359c386815f5f72991a3a2573135dbd' into eclair-mr2-plus-aosp

* commit '39c5899d0359c386815f5f72991a3a2573135dbd':
  Preflight cleanup of Ropper.java for style, whitespace, etc., before doing

14 years agoPreflight cleanup of Ropper.java for style, whitespace, etc., before doing
Dan Bornstein [Thu, 10 Dec 2009 21:32:09 +0000 (13:32 -0800)]
Preflight cleanup of Ropper.java for style, whitespace, etc., before doing
some more drastic modifications. Also, bumped up the version number, rather
than making changes first and then forgetting that important detail.

14 years agoThe disabled code was too late to make eclair, and there were some
Barry Hayes [Wed, 28 Oct 2009 22:32:19 +0000 (15:32 -0700)]
The disabled code was too late to make eclair, and there were some
bugs on x86, now fixed.

Let's get this into master for some burn-in.

14 years agoRemove arrayClass from ClassObject. It seems to get only dozens of hits in
Barry Hayes [Fri, 30 Oct 2009 16:36:08 +0000 (09:36 -0700)]
Remove arrayClass from ClassObject. It seems to get only dozens of hits in
all of Zygote start-up.

There doesn't seem to be a measurable difference in the time printed in:
I/Zygote  ( 2247): ...preloaded 1147 classes in NNNNms.

14 years agoMerge change I5f6d073a
Android (Google) Code Review [Thu, 10 Dec 2009 20:51:37 +0000 (12:51 -0800)]
Merge change I5f6d073a

* changes:
  Jit: Save/restore callee-save floating point registers at interpreter entry/exit

14 years agoJit: Save/restore callee-save floating point registers at interpreter entry/exit
Bill Buzbee [Tue, 8 Dec 2009 20:37:13 +0000 (12:37 -0800)]
Jit: Save/restore callee-save floating point registers at interpreter entry/exit

14 years agoam b2c70f2c: (-s ours) am 4d9f9384: DO NOT MERGE - Reduce spin-on-suspend complaints.
Andy McFadden [Thu, 10 Dec 2009 02:40:18 +0000 (18:40 -0800)]
am b2c70f2c: (-s ours) am 4d9f9384: DO NOT MERGE - Reduce spin-on-suspend complaints.

Merge commit 'b2c70f2cb70cd3dbdd12b2581447ed1e70a30992'

* commit 'b2c70f2cb70cd3dbdd12b2581447ed1e70a30992':
  DO NOT MERGE - Reduce spin-on-suspend complaints.

14 years agoam 0f6512c7: am 3f77d012: Merge change I2ca00c90 into eclair-mr2
Elliott Hughes [Thu, 10 Dec 2009 02:40:13 +0000 (18:40 -0800)]
am 0f6512c7: am 3f77d012: Merge change I2ca00c90 into eclair-mr2

Merge commit '0f6512c7b4dd17177a7fdb521ca440d87b4230ad'

* commit '0f6512c7b4dd17177a7fdb521ca440d87b4230ad':
  Fix dalvik test 063.

14 years agoMerge branch 'archive_888752' into archive_dalvik
Jesse Wilson [Thu, 10 Dec 2009 02:24:19 +0000 (18:24 -0800)]
Merge branch 'archive_888752' into archive_dalvik

Conflicts:
     libcore/archive/build.xml
     libcore/archive/src/main/java/java/util/jar/JarFile.java
     libcore/archive/src/main/java/java/util/zip/GZIPInputStream.java
     libcore/archive/src/main/java/java/util/zip/Inflater.java
     libcore/archive/src/main/java/java/util/zip/InflaterInputStream.java
     libcore/archive/src/main/java/java/util/zip/ZipEntry.java
     libcore/archive/src/main/java/java/util/zip/ZipFile.java
     libcore/archive/src/main/java/java/util/zip/ZipInputStream.java
     libcore/archive/src/main/java/org/apache/harmony/archive/internal/nls/Messages.java
     libcore/archive/src/main/java/org/apache/harmony/archive/internal/nls/messages.properties
     libcore/archive/src/main/native/archive/unix/exports.txt
     libcore/archive/src/main/native/archive/unix/makefile
     libcore/archive/src/main/native/archive/windows/makefile
     libcore/archive/src/main/native/archive_copyright.c
     libcore/archive/src/main/native/jarfile.c
     libcore/archive/src/main/native/java_util_zip_Deflater.c
     libcore/archive/src/main/native/zip.c
     libcore/archive/src/main/native/zipcache.c
     libcore/archive/src/main/native/zlib/unix/makefile
     libcore/archive/src/main/native/zlib/windows/makefile
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/AllTests.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarInputStreamTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarOutputStreamTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/ManifestTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/Pack200Test.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterOutputStreamTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipEntryTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
     libcore/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java

14 years agoImplement DTDHandler support for ExpatParser.
Elliott Hughes [Thu, 10 Dec 2009 00:05:29 +0000 (16:05 -0800)]
Implement DTDHandler support for ExpatParser.

Every time a third-party developer gets their DefaultHandler method signatures
wrong (making it impossible for us to call them), they see this in the log and
complain that SAX parsing is broken on Android:

  WARN/ExpatReader(704): DTD handlers aren't supported.

This patch adds that support -- even though no-one wants it -- so we can get
rid of the irrelevant log message.

14 years agoam 4d9f9384: DO NOT MERGE - Reduce spin-on-suspend complaints.
Andy McFadden [Wed, 9 Dec 2009 23:59:48 +0000 (15:59 -0800)]
am 4d9f9384: DO NOT MERGE - Reduce spin-on-suspend complaints.

Merge commit '4d9f9384999b14acc996ed621e1205b389845f13' into eclair-mr2-plus-aosp

* commit '4d9f9384999b14acc996ed621e1205b389845f13':
  DO NOT MERGE - Reduce spin-on-suspend complaints.

14 years agoam 3f77d012: Merge change I2ca00c90 into eclair-mr2
Elliott Hughes [Wed, 9 Dec 2009 23:40:55 +0000 (15:40 -0800)]
am 3f77d012: Merge change I2ca00c90 into eclair-mr2

Merge commit '3f77d0127a34798cfede935331c10c1e57ec0ff7' into eclair-mr2-plus-aosp

* commit '3f77d0127a34798cfede935331c10c1e57ec0ff7':
  Fix dalvik test 063.

14 years agoFix java.util.Formatter formatting of -0.0.
Elliott Hughes [Wed, 9 Dec 2009 08:44:31 +0000 (00:44 -0800)]
Fix java.util.Formatter formatting of -0.0.

The active ingredient here is the two changes to stop comparing longValue
with doubleValue and formatting the long if the two compare equal. This
causes us to lose the sign of 0 (because there's no long -0, but -0.0d == 0).
Instead, we explicitly test for boxed Double and Float arguments (because
the number of integral types is larger, they get the "else" clause).

The other changes are just minor cosmetic changes made as I followed the code.

Bug found by jtreg, so no new test.

14 years agoDO NOT MERGE - Reduce spin-on-suspend complaints.
Andy McFadden [Thu, 3 Dec 2009 01:03:41 +0000 (17:03 -0800)]
DO NOT MERGE - Reduce spin-on-suspend complaints.

The first complaint is popping up too quickly, and the pile of log
messages it emits aren't helping the process do real work.  This
skips the complaining if we just finished the first (0.25 sec) sleep.

(merged back from master)

14 years agoMerge change I7bdddfb1
Android (Google) Code Review [Wed, 9 Dec 2009 00:34:19 +0000 (16:34 -0800)]
Merge change I7bdddfb1

* changes:
  Improve the FileNotFoundExceptions thrown by OSFileSystem.open.

14 years agoImprove the FileNotFoundExceptions thrown by OSFileSystem.open.
Elliott Hughes [Tue, 8 Dec 2009 23:41:35 +0000 (15:41 -0800)]
Improve the FileNotFoundExceptions thrown by OSFileSystem.open.

When I improved the internals of java.io.File, I failed to keep
OSFileSystem.open (which uses the internals of java.io.File) in
sync, leading to misleading error reporting. java.io.File's
internals now include a trailing NUL, which is useful for the
native code but confuses Java if it tries to decode the byte[]
as a UTF-8 sequence.

This patch fixes the bug and also improves OSFileSystem.open's
error reporting to include the reason for the failure.

Bug: 2313271

14 years agoam 66cbe5b1: am bf1bb914: am 4a888b09: Two exception-related tweaks: (1) Make the...
Dan Bornstein [Tue, 8 Dec 2009 22:51:58 +0000 (14:51 -0800)]
am 66cbe5b1: am bf1bb914: am 4a888b09: Two exception-related tweaks: (1) Make the dynamic exception construction mechanism be able to handle exception constructors that take Object instead of String. (2) Add a convenience in JNIHelp to throw RuntimeExceptions.

Merge commit '66cbe5b10e3bd9f7b3c262a2ec8a3c11087baa80'

* commit '66cbe5b10e3bd9f7b3c262a2ec8a3c11087baa80':
  Two exception-related tweaks: (1) Make the dynamic exception construction

14 years agoFix build.
Elliott Hughes [Tue, 8 Dec 2009 21:20:29 +0000 (13:20 -0800)]
Fix build.

14 years agoMerge change I8cdf9790
Android (Google) Code Review [Tue, 8 Dec 2009 21:04:55 +0000 (13:04 -0800)]
Merge change I8cdf9790

* changes:
  Take Locale into account in java.util.Formatter uppercase conversions.

14 years agoTake Locale into account in java.util.Formatter uppercase conversions.
Elliott Hughes [Tue, 8 Dec 2009 19:52:21 +0000 (11:52 -0800)]
Take Locale into account in java.util.Formatter uppercase conversions.

(This is an RI incompatibility, but Sun accepts that the RI's behavior is a
bug.)

Bug: 2301938

14 years agoMerge change Id40223ec
Android (Google) Code Review [Tue, 8 Dec 2009 15:21:26 +0000 (07:21 -0800)]
Merge change Id40223ec

* changes:
  Convert an assert() into a real test.

14 years agoMerge change I2ca00c90 into eclair-mr2
Android (Google) Code Review [Tue, 8 Dec 2009 01:32:14 +0000 (17:32 -0800)]
Merge change I2ca00c90 into eclair-mr2

* changes:
  Fix dalvik test 063.

14 years agoFix dalvik test 063.
Elliott Hughes [Tue, 8 Dec 2009 01:20:53 +0000 (17:20 -0800)]
Fix dalvik test 063.

Avoid a race by sleeping so the code we're examining gets to run before we
query its state.

Bug: 2310700

14 years agoam bf1bb914: am 4a888b09: Two exception-related tweaks: (1) Make the dynamic exceptio...
Dan Bornstein [Tue, 8 Dec 2009 01:02:10 +0000 (17:02 -0800)]
am bf1bb914: am 4a888b09: Two exception-related tweaks: (1) Make the dynamic exception construction mechanism be able to handle exception constructors that take Object instead of String. (2) Add a convenience in JNIHelp to throw RuntimeExceptions.

Merge commit 'bf1bb914a62c65eb8304ce1d86e8ff2dd4f5c79b' into eclair-mr2-plus-aosp

* commit 'bf1bb914a62c65eb8304ce1d86e8ff2dd4f5c79b':
  Two exception-related tweaks: (1) Make the dynamic exception construction

14 years agoam 4a888b09: Two exception-related tweaks: (1) Make the dynamic exception constructio...
Dan Bornstein [Tue, 8 Dec 2009 00:58:08 +0000 (16:58 -0800)]
am 4a888b09: Two exception-related tweaks: (1) Make the dynamic exception construction mechanism be able to handle exception constructors that take Object instead of String. (2) Add a convenience in JNIHelp to throw RuntimeExceptions.

Merge commit '4a888b09be2ade9fc5bb0137f702b3be889679a9' into eclair-plus-aosp

* commit '4a888b09be2ade9fc5bb0137f702b3be889679a9':
  Two exception-related tweaks: (1) Make the dynamic exception construction

14 years agoam 4a888b09: Two exception-related tweaks: (1) Make the dynamic exception constructio...
Dan Bornstein [Tue, 8 Dec 2009 00:57:31 +0000 (16:57 -0800)]
am 4a888b09: Two exception-related tweaks: (1) Make the dynamic exception construction mechanism be able to handle exception constructors that take Object instead of String. (2) Add a convenience in JNIHelp to throw RuntimeExceptions.

Merge commit '4a888b09be2ade9fc5bb0137f702b3be889679a9' into eclair-mr2

* commit '4a888b09be2ade9fc5bb0137f702b3be889679a9':
  Two exception-related tweaks: (1) Make the dynamic exception construction

14 years agoTwo exception-related tweaks: (1) Make the dynamic exception construction
Dan Bornstein [Mon, 7 Dec 2009 23:46:23 +0000 (15:46 -0800)]
Two exception-related tweaks: (1) Make the dynamic exception construction
mechanism be able to handle exception constructors that take Object instead
of String. (2) Add a convenience in JNIHelp to throw RuntimeExceptions.

Change-Id: Ie5ce680c30043a4b186e59d7c8883666648b2c87

14 years agoConvert an assert() into a real test.
Andy McFadden [Mon, 7 Dec 2009 23:35:51 +0000 (15:35 -0800)]
Convert an assert() into a real test.

We occasionally see an assertion failure on some debug builds that
indicates a thread is being examined by the GC while still running.
This turns the assertion into an always-enabled test with verbose
logging and a VM abort.

14 years agoMerge change I78b1acb6
Android (Google) Code Review [Mon, 7 Dec 2009 21:26:09 +0000 (13:26 -0800)]
Merge change I78b1acb6

* changes:
  More java.io.File cleanup.

14 years agoMore java.io.File cleanup.
Elliott Hughes [Sun, 6 Dec 2009 04:27:37 +0000 (20:27 -0800)]
More java.io.File cleanup.

Remove the duplication between the various list and listFiles methods.
This also makes the variants that take a filter no less efficient than
those that don't, for the special case of the null filter.

The upstream code sometimes assumed returned filenames were UTF-8, and
at other times assumed returned filenames were in the platform encoding.
The new code always uses UTF-8, to match filenames sent to the operating
system, which were and are always sent as UTF-8 byte sequences.

This patch does not alter the native listImpl method. That's for the
next patch.

A couple of unrelated cosmetic changes have been made in this patch:
declarations of native methods have been moved next to the methods
they implement, and a minor simplification has been made to the
documentation of isAbsolute.

Bug: 2281992

14 years agoMerge change I01c5bfe3
Android (Google) Code Review [Mon, 7 Dec 2009 18:21:42 +0000 (10:21 -0800)]
Merge change I01c5bfe3

* changes:
  Jit: 2nd attempt at fix for [Issue 2302318] Crash during spin-on-suspend

14 years agoJit: 2nd attempt at fix for [Issue 2302318] Crash during spin-on-suspend
Bill Buzbee [Fri, 4 Dec 2009 21:17:36 +0000 (13:17 -0800)]
Jit: 2nd attempt at fix for [Issue 2302318] Crash during spin-on-suspend

Logic on the 1st attempt was a little off, preventing some invokes from
getting chaining cells.

14 years agoMerge change I76f1dbe7
Android (Google) Code Review [Sun, 6 Dec 2009 03:47:49 +0000 (19:47 -0800)]
Merge change I76f1dbe7

* changes:
  More java.io.File cleanup.

14 years agoMore java.io.File cleanup.
Elliott Hughes [Sat, 5 Dec 2009 18:49:20 +0000 (10:49 -0800)]
More java.io.File cleanup.

Mostly cosmetic: improve documentation, factor out the code to join two
strings into a path, put fields in canonical order, defer to String (which
might be able to perform optimizations we can't), simplify the path
cleaning code.

Also remove more unused Windows support (since our File is already totally
broken on Windows anyway).

Bug: 2281992

14 years agoImprove TimeZone documentation.
Elliott Hughes [Sat, 5 Dec 2009 17:47:23 +0000 (09:47 -0800)]
Improve TimeZone documentation.

We can't do anything about the RI's unfortunate choice of method names,
but improving our documentation might help reduce the confusion they
cause.

Bug: 2244560

14 years agoMerge change I97af6ec8
Android (Google) Code Review [Sat, 5 Dec 2009 17:15:50 +0000 (09:15 -0800)]
Merge change I97af6ec8

* changes:
  More java.io.File cleanup.

14 years agoMore java.io.File cleanup.
Elliott Hughes [Fri, 4 Dec 2009 23:06:58 +0000 (15:06 -0800)]
More java.io.File cleanup.

Two changes:

1. Change the createNewFile JNI to match the Java interface, so we can lose the
glue. (Also make the Java/JNI names match, and sort the table of native method
names alphabetically.)

2. Fix the caching of the path byte sequence so we're caching the exact byte
sequence we want to hand to JNI. Also switch to caching the byte[] at
construction time, rather than hiding it behind an accessor.

There's a deliberate functional change here too: previously we were inconsistent
about which encoding was in use. Sometimes it was explicitly UTF-8, other times
the default platform encoding (which happens to be UTF-8 on Android). Now we
always use UTF-8. (But note that the File.list methods, which I haven't got to
yet, still return a mix of UTF-8 and platform-encoded strings.)

Bug: 2281992

14 years agoMerge change Ia8ff1644
Android (Google) Code Review [Sat, 5 Dec 2009 00:32:24 +0000 (16:32 -0800)]
Merge change Ia8ff1644

* changes:
  Fix two trivial Formatter bugs (found by jtreg).

14 years agoFix two trivial Formatter bugs (found by jtreg).
Elliott Hughes [Fri, 4 Dec 2009 01:24:54 +0000 (17:24 -0800)]
Fix two trivial Formatter bugs (found by jtreg).

jtreg complains that we allow "%<%" and "%<n". This patch disallows
the special "last argument" case to conversions that don't take
arguments.

We also reject explicitly-numbered arguments such as "%123$n" or
"%123$%" (whether or not a corresponding argument was provided) though
the RI ignores such errors. I've modified the harmony tests to stop
passing unused argument indexes to %n and %%.

This fixes about 80 jtreg complaints (the java/util/Formatter/Basic test is
generated by shell script and seems to accidentally repeat many of the same
tests over and over).

This patch also includes a little more tidying for readability, but
no other functional changes.

14 years agoMerge change I9bb3f193
Android (Google) Code Review [Fri, 4 Dec 2009 22:43:30 +0000 (14:43 -0800)]
Merge change I9bb3f193

* changes:
  Add new(-ish) Dalvik opcodes to Opcodes.java.

14 years agoAdd new(-ish) Dalvik opcodes to Opcodes.java.
Andy McFadden [Fri, 4 Dec 2009 21:43:01 +0000 (13:43 -0800)]
Add new(-ish) Dalvik opcodes to Opcodes.java.

This is a public API change.

14 years agoMerge change I85442b60
Android (Google) Code Review [Fri, 4 Dec 2009 21:04:35 +0000 (13:04 -0800)]
Merge change I85442b60

* changes:
    Android ICU4.2.1 upgrade.   For detail of dalvik changes, please see:   https://docs.google.com/a/google.com/View?docid=0AfZlO7RuiBh5Y2NmMjdndmJfNDVmNWM2cGY0NQ&hl=en

14 years agoReverting [master] Change I85dd4a66: (platform/dalvik)
Bill Buzbee [Fri, 4 Dec 2009 20:39:42 +0000 (12:39 -0800)]
Reverting [master] Change I85dd4a66: (platform/dalvik)

14 years agoam ca77c603: am a7745f97: Remove "unused" opcodes from API.
Andy McFadden [Fri, 4 Dec 2009 19:30:04 +0000 (11:30 -0800)]
am ca77c603: am a7745f97: Remove "unused" opcodes from API.

Merge commit 'ca77c6035fcce6ed9653ee1bed1753bff99e3d89'

* commit 'ca77c6035fcce6ed9653ee1bed1753bff99e3d89':
  Remove "unused" opcodes from API.