* src/vmcore/options.c (opt_verbosethreads): Added.
[cacao.git] / src / vmcore / options.c
index 19c7329fbb74f31fda788326755b1e047f1eb62a..4f31ef465bcf360293f20c1b99243b9bbe4dd920 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: options.c 7356 2007-02-14 11:00:28Z twisti $
+   $Id: options.c 7894 2007-05-10 14:04:05Z twisti $
 
 */
 
 
 #include "config.h"
 
-#include <string.h>
+#if defined(HAVE_STRING_H)
+# include <string.h>
+#endif
+
+#include <limits.h>
 
 #include "vm/types.h"
 
@@ -75,6 +79,7 @@ bool opt_verbosejni       = false;
 bool opt_verbosecall      = false;      /* trace all method invocation        */
 bool opt_verboseexception = false;
 bool opt_verbosememory    = false;
+bool opt_verbosethreads   = false;
 
 bool showmethods = false;
 bool showconstantpool = false;
@@ -93,14 +98,7 @@ bool opt_showintermediate   = false;    /* generate intermediate code listing */
 bool opt_showexceptionstubs = false;
 bool opt_shownativestub     = false;
 
-bool useinlining = false;      /* use method inlining                        */
-bool inlinevirtuals = false;   /* inline unique virtual methods              */
-bool inlineexceptions = false; /* inline methods, that contain excptions     */
-bool inlineparamopt = false;   /* optimize parameter passing to inlined methods */
-bool inlineoutsiders = false;  /* inline methods, that are not member of the invoker's class */
-
 bool checkbounds = true;       /* check array bounds                         */
-bool checknull = true;         /* check null pointers                        */
 bool opt_noieee = false;       /* don't implement ieee compliant floats      */
 bool checksync = true;         /* do synchronization                         */
 #if defined(ENABLE_LOOP)
@@ -125,6 +123,23 @@ bool opt_prof_bb = false;
 #endif
 
 
+/* inlining options ***********************************************************/
+
+#if defined(ENABLE_INLINING)
+bool opt_inlining = false;
+#if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
+s4 opt_replace_verbose = 0;
+s4 opt_inline_debug_min_size = 0;
+s4 opt_inline_debug_max_size = INT_MAX;
+s4 opt_inline_debug_end_counter = INT_MAX;
+bool opt_inline_debug_all = false;
+#endif /* defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG) */
+#if !defined(NDEBUG)
+bool opt_inline_debug_log = false;
+#endif /* !defined(NDEBUG) */
+#endif /* defined(ENABLE_INLINING) */
+
+
 /* optimization options *******************************************************/
 
 #if defined(ENABLE_IFCONV)
@@ -188,7 +203,13 @@ s4 options_get(opt_struct *opts, JavaVMInitArgs *vm_args)
                                opt_index++;
 
                                if (opt_index < vm_args->nOptions) {
+
+#if defined(HAVE_STRDUP)
                                        opt_arg = strdup(vm_args->options[opt_index].optionString);
+#else
+# error !HAVE_STRDUP
+#endif
+
                                        opt_index++;
                                        return opts[i].value;
                                }
@@ -207,7 +228,13 @@ s4 options_get(opt_struct *opts, JavaVMInitArgs *vm_args)
                                if (strlen(option + 1) > l) {
                                        if (memcmp(option + 1, opts[i].name, l) == 0) {
                                                opt_index++;
+
+#if defined(HAVE_STRDUP)
                                                opt_arg = strdup(option + 1 + l);
+#else
+# error !HAVE_STRDUP
+#endif
+
                                                return opts[i].value;
                                        }
                                }