OSDN Git Service

Another round of scary indirect ref changes.
authorAndy McFadden <fadden@android.com>
Tue, 25 Aug 2009 14:19:34 +0000 (07:19 -0700)
committerAndy McFadden <fadden@android.com>
Tue, 25 Aug 2009 22:17:46 +0000 (15:17 -0700)
commitd5ab726b65d7271be261864c7e224fb90bfe06e0
treeac034def00831f08df2dc6778e7b1a09d7396177
parent0083d37b0e1c9e542f671cbca2e9db6819ecccba
Another round of scary indirect ref changes.

This change adds a not-really-working implementation to Jni.c, with
various changes #ifdefed throughout the code.  The ifdef is currently
disabled, so the old behavior should continue.  Eventually the old
version will be stripped out and the ifdefs removed.

This renames the stack's "localRefTop" field, which nudged a bunch of
code.  The name wasn't really right before (it's the *bottom* of the
local references), and it's even less right now.  This and one other
mterp-visible constant were changed, which caused some ripples through
mterp and the JIT, but the ifdeffing was limited to one in
asm-constants.h (and the constant is the same both ways, so toggling the
ifdef won't require rebuilding asm sources).

Some comments and arg names in ReferenceTable were updated for the
correct orientation of bottom vs. top.

Some adjustments were made to the JNI code, e.g. dvmCallMethod now needs
to understand if it needs to convert reference arguments from
local/global refs to pointers (it's called from various places
throughout the VM).
31 files changed:
vm/CheckJni.c
vm/Debugger.c
vm/Dvm.mk
vm/Globals.h
vm/Jni.c
vm/JniInternal.h
vm/ReferenceTable.c
vm/ReferenceTable.h
vm/SignalCatcher.c
vm/Thread.c
vm/Thread.h
vm/compiler/template/armv5te/TEMPLATE_INVOKE_METHOD_NATIVE.S
vm/compiler/template/armv5te/footer.S
vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S
vm/compiler/template/out/CompilerTemplateAsm-armv5te.S
vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S
vm/interp/Stack.c
vm/interp/Stack.h
vm/mterp/armv5te/footer.S
vm/mterp/c/gotoTargets.c
vm/mterp/common/asm-constants.h
vm/mterp/out/InterpAsm-armv4t.S
vm/mterp/out/InterpAsm-armv5te-vfp.S
vm/mterp/out/InterpAsm-armv5te.S
vm/mterp/out/InterpAsm-armv7-a.S
vm/mterp/out/InterpAsm-x86.S
vm/mterp/out/InterpC-allstubs.c
vm/mterp/out/InterpC-portdbg.c
vm/mterp/out/InterpC-portstd.c
vm/mterp/out/InterpC-x86.c
vm/mterp/x86/footer.S