* src/vm/method.cpp (method_load): Loads LocalVariableTable attribute.
[cacao.git] / src / vm / method.hpp
index 7d3b81a475b9bea710b62779a1812bcd2d4ab3a0..6ab842c92f923112802a98e9a62588e10d165555 100644 (file)
@@ -30,7 +30,8 @@
 
 typedef struct methodinfo          methodinfo; 
 typedef struct raw_exception_entry raw_exception_entry;
-typedef struct lineinfo            lineinfo; 
+typedef struct lineinfo            lineinfo;
+typedef struct localvarinfo        localvarinfo;
 typedef struct method_assumption   method_assumption;
 typedef struct method_worklist     method_worklist;
 typedef struct codeinfo            codeinfo;
@@ -73,7 +74,7 @@ struct methodinfo {                 /* method structure                       */
 #endif
 
        methoddesc   *parseddesc;       /* parsed descriptor                      */
-                            
+
        classinfo    *clazz;            /* class, the method belongs to           */
        s4            vftblindex;       /* index of method in virtual function    */
                                        /* table (if it is a virtual method)      */
@@ -91,6 +92,11 @@ struct methodinfo {                 /* method structure                       */
        u2            linenumbercount;  /* number of linenumber attributes        */
        lineinfo     *linenumbers;      /* array of lineinfo items                */
 
+#if defined(ENABLE_JAVASE) && defined(ENABLE_JVMTI)
+       uint16_t      localvarcount;    /* number of local variable attributes    */
+       localvarinfo* localvars;        /* array of localvarinfo items            */
+#endif
+
        u1           *stubroutine;      /* stub for compiling or calling natives  */
        codeinfo     *code;             /* current code of this method            */
 
@@ -160,6 +166,17 @@ struct lineinfo {
 };
 
 
+/* localvarinfo ***************************************************************/
+
+struct localvarinfo {
+       uint16_t start_pc;
+       uint16_t length;
+       utf*     name;
+       utf*     descriptor;
+       uint16_t index;
+};
+
+
 /* global variables ***********************************************************/
 
 extern methodinfo *method_java_lang_reflect_Method_invoke;