• Andy McFadden's avatar
    Another round of scary indirect ref changes. · d5ab726b
    Andy McFadden authored
    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).
    d5ab726b
ReferenceTable.h 3.64 KB