OSDN Git Service

JNI direct buffer function speedup, part 3.
authorAndy McFadden <fadden@android.com>
Fri, 24 Jul 2009 22:28:16 +0000 (15:28 -0700)
committerAndy McFadden <fadden@android.com>
Fri, 24 Jul 2009 22:28:16 +0000 (15:28 -0700)
commit8e696dc0271299433cb3297e7aafc7bd0ee1b2b7
tree8332169917748e5195d117d74cb3ff44e88c7546
parent8e5c78470229fd2f5474574081eaa4a2286aafea
JNI direct buffer function speedup, part 3.

This caches the effective address in a new field in the base Buffer
object.  The first time something calls through one of the various
getEffectiveAddress calls, the value is set.  (This seemed easier than
chasing down the constructors and factories, and also prevents bit rot
on the "slow path" in the VM.)
libcore/nio/src/main/java/java/nio/Buffer.java
libcore/nio/src/main/java/java/nio/CharToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/DirectByteBuffer.java
libcore/nio/src/main/java/java/nio/DoubleToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/FloatToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/IntToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/LongToByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/MappedByteBufferAdapter.java
libcore/nio/src/main/java/java/nio/ShortToByteBufferAdapter.java
vm/Globals.h
vm/Jni.c