This list is for developing apps with the Android SDK. Please visit
http://source.android.com to learn more about Android internals.

On Fri, Jun 1, 2012 at 6:00 AM, marie <marmoh...@gmail.com> wrote:
> Hi,
> In kaffe VM http://www.lamedoc.com/kaffe/classMethod_8h_source.html  i
> find this code :
>
> typedef struct _jmethodID {
>    Utf8Const*        name;
>    parsed_signature_t*    parsed_sig;
>    accessFlags        accflags;
>    long            idx;    /* Index into class->vtable */
>    u2            stacksz;
>    u2            localsz;
> ....}
>
> and in dalvik vm i find this one :
>
> struct Method {
>    /* the class we are a part of */
>    ClassObject*    clazz;
>
>    /* access flags; low 16 bits are defined by spec (could be u2?) */
>    u4              accessFlags;
>
>    /*
>     * For concrete virtual methods, this is the offset of the method
>     * in "vtable".
>     *
>     * For abstract methods in an interface class, this is the offset
>     * of the method in "iftable[n]->methodIndexArray".
>     */
>    u2             methodIndex;
>
>    /*
>     * Method bounds; not needed for an abstract method.
>     *
>     * For a native method, we compute the size of the argument list,
> and
>     * set "insSize" and "registerSize" equal to it.
>     */
>    u2              registersSize;  /* ins + locals */
>    u2              outsSize;
>    u2              insSize;
>
>    /* method name, e.g. "<init>" or "eatLunch" */
>    const char*     name;
>
>    /*
>     * Method prototype descriptor string (return and argument types).
>     *
>     * TODO: This currently must specify the DexFile as well as the
> proto_ids
>     * index, because generated Proxy classes don't have a DexFile.
> We can
>     * remove the DexFile* and reduce the size of this struct if we
> generate
>     * a DEX for proxies.
>     */
>    DexProto        prototype;
>
>    /* short-form method descriptor string */
>    const char*     shorty;
>
>    /*
>     * The remaining items are not used for abstract or native
> methods.
>     * (JNI is currently hijacking "insns" as a function pointer, set
>     * after the first call.  For internal-native this stays null.)
>     */
>
>    /* the actual code */
>    const u2*       insns;          /* instructions, in memory-
> mapped .dex */
>
>    /* cached JNI argument and return-type hints */
>    int             jniArgInfo;
>
>    /*
>     * Native method ptr; could be actual function or a JNI bridge.
> We
>     * don't currently discriminate between DalvikBridgeFunc and
>     * DalvikNativeFunc; the former takes an argument superset (i.e.
> two
>     * extra args) which will be ignored.  If necessary we can use
>     * insns==NULL to detect JNI bridge vs. internal native.
>     */
>    DalvikBridgeFunc nativeFunc;
>
>    /*
>     * Register map data, if available.  This will point into the DEX
> file
>     * if the data was computed during pre-verification, or into the
>     * linear alloc area if not.
>     */
>    const RegisterMap* registerMap;
>
>    /* set if method was called during method profiling */
>    bool            inProfile;};
>
> And I want to know what's the equivalent of "stacksz" in dalvik vm?
> thank you.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to