1 /* src/vm/vm.c - VM startup and shutdown functions
3 Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
4 C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 J. Wenninger, Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 Contact: cacao@cacaojvm.org
27 Authors: Christian Thalinger
29 Changes: Martin Platter
31 $Id: vm.c 4357 2006-01-22 23:33:38Z twisti $
44 #include "mm/memory.h"
45 #include "native/jni.h"
46 #include "native/native.h"
48 #if defined(ENABLE_THREADS)
49 # include "threads/native/threads.h"
52 #include "toolbox/util.h"
53 #include "vm/classcache.h"
54 #include "vm/exceptions.h"
55 #include "vm/finalizer.h"
56 #include "vm/global.h"
57 #include "vm/initialize.h"
58 #include "vm/options.h"
59 #include "vm/properties.h"
60 #include "vm/signallocal.h"
61 #include "vm/stringlocal.h"
64 #include "vm/jit/jit.h"
65 #include "vm/jit/asmpart.h"
67 #include "vm/jit/recompile.h"
69 #include "vm/jit/profile/profile.h"
70 #include "vm/rt-timing.h"
72 #if defined(ENABLE_JVMTI)
73 #include "native/jvmti/cacaodbg.h"
77 /* Invocation API variables ***************************************************/
79 _Jv_JavaVM *_Jv_jvm; /* denotes a Java VM */
80 _Jv_JNIEnv *_Jv_env; /* pointer to native method interface */
83 /* global variables ***********************************************************/
85 s4 vms = 0; /* number of VMs created */
87 bool vm_initializing = false;
88 bool vm_exiting = false;
90 #if defined(ENABLE_INTRP)
91 u1 *intrp_main_stack = NULL;
94 char *mainstring = NULL;
95 classinfo *mainclass = NULL;
97 char *specificmethodname = NULL;
98 char *specificsignature = NULL;
103 /* define heap sizes **********************************************************/
105 #define HEAP_MAXSIZE 128 * 1024 * 1024 /* default 128MB */
106 #define HEAP_STARTSIZE 2 * 1024 * 1024 /* default 2MB */
107 #define STACK_SIZE 64 * 1024 /* default 64kB */
110 /* define command line options ************************************************/
135 /* Java non-standard options */
158 #if defined(ENABLE_STATISTICS)
171 #if defined(ENABLE_VERIFIER)
173 #if defined(TYPECHECK_VERBOSE)
176 #endif /* defined(ENABLE_VERIFIER) */
179 /* optimization options */
181 #if defined(ENABLE_LOOP)
185 #if defined(ENABLE_IFCONV)
189 #if defined(ENABLE_LSRA)
193 #if defined(ENABLE_INLINING)
197 #if defined(ENABLE_INTRP)
198 /* interpreter options */
221 opt_struct opts[] = {
224 { "jar", false, OPT_JAR },
226 { "d32", false, OPT_D32 },
227 { "d64", false, OPT_D64 },
228 { "client", false, OPT_IGNORE },
229 { "server", false, OPT_IGNORE },
230 { "jvm", false, OPT_IGNORE },
231 { "hotspot", false, OPT_IGNORE },
233 { "classpath", true, OPT_CLASSPATH },
234 { "cp", true, OPT_CLASSPATH },
235 { "D", true, OPT_D },
236 { "version", false, OPT_VERSION },
237 { "showversion", false, OPT_SHOWVERSION },
238 { "fullversion", false, OPT_FULLVERSION },
239 { "help", false, OPT_HELP },
240 { "?", false, OPT_HELP },
241 { "X", false, OPT_X },
243 { "esa", false, OPT_ESA },
244 { "enablesystemassertions", false, OPT_ESA },
245 { "dsa", false, OPT_DSA },
246 { "disablesystemassertions", false, OPT_DSA },
248 { "noasyncgc", false, OPT_IGNORE },
249 #if defined(ENABLE_VERIFIER)
250 { "noverify", false, OPT_NOVERIFY },
252 { "v", false, OPT_VERBOSE1 },
253 { "verbose:", true, OPT_VERBOSE },
255 #if defined(ENABLE_VERIFIER) && defined(TYPECHECK_VERBOSE)
256 { "verbosetc", false, OPT_VERBOSETC },
258 #if defined(__ALPHA__)
259 { "noieee", false, OPT_NOIEEE },
261 { "softnull", false, OPT_SOFTNULL },
262 #if defined(ENABLE_STATISTICS)
263 { "time", false, OPT_TIME },
264 { "stat", false, OPT_STAT },
266 { "log", true, OPT_LOG },
267 { "c", true, OPT_CHECK },
268 { "l", false, OPT_LOAD },
269 { "eager", false, OPT_EAGER },
270 { "sig", true, OPT_SIGNATURE },
271 { "all", false, OPT_ALL },
272 #if defined(ENABLE_LOOP)
273 { "oloop", false, OPT_OLOOP },
275 #if defined(ENABLE_IFCONV)
276 { "ifconv", false, OPT_IFCONV },
278 #if defined(ENABLE_LSRA)
279 { "lsra", false, OPT_LSRA },
282 #if defined(ENABLE_INTRP)
283 /* interpreter options */
285 { "trace", false, OPT_TRACE },
286 { "static-supers", true, OPT_STATIC_SUPERS },
287 { "no-dynamic", false, OPT_NO_DYNAMIC },
288 { "no-replication", false, OPT_NO_REPLICATION },
289 { "no-quicksuper", false, OPT_NO_QUICKSUPER },
292 /* JVMTI Agent Command Line Options */
294 { "agentlib:", true, OPT_AGENTLIB },
295 { "agentpath:", true, OPT_AGENTPATH },
298 /* Java non-standard options */
300 { "Xjit", false, OPT_JIT },
301 { "Xint", false, OPT_INTRP },
302 { "Xbootclasspath:", true, OPT_BOOTCLASSPATH },
303 { "Xbootclasspath/a:", true, OPT_BOOTCLASSPATH_A },
304 { "Xbootclasspath/p:", true, OPT_BOOTCLASSPATH_P },
305 { "Xglibj:", true, OPT_GLIBJ },
308 { "Xdebug", false, OPT_DEBUG },
309 { "Xnoagent", false, OPT_NOAGENT },
310 { "Xrunjdwp", true, OPT_XRUNJDWP },
313 { "Xms", true, OPT_MS },
314 { "ms", true, OPT_MS },
315 { "Xmx", true, OPT_MX },
316 { "mx", true, OPT_MX },
317 { "Xss", true, OPT_SS },
318 { "ss", true, OPT_SS },
319 { "Xprof:", true, OPT_PROF_OPTION },
320 { "Xprof", false, OPT_PROF },
322 /* keep these at the end of the list */
324 #if defined(ENABLE_INLINING)
325 { "i", true, OPT_INLINING },
327 { "m", true, OPT_METHOD },
328 { "s", true, OPT_SHOW },
334 /* usage ***********************************************************************
336 Prints the correct usage syntax to stdout.
338 *******************************************************************************/
342 puts("Usage: cacao [-options] classname [arguments]");
343 puts(" (to run a class file)");
344 puts(" or cacao [-options] -jar jarfile [arguments]");
345 puts(" (to run a standalone jar file)\n");
347 puts("Java options:");
348 puts(" -d32 use 32-bit data model if available");
349 puts(" -d64 use 64-bit data model if available");
350 puts(" -client compatibility (currently ignored)");
351 puts(" -server compatibility (currently ignored)");
352 puts(" -jvm compatibility (currently ignored)");
353 puts(" -hotspot compatibility (currently ignored)\n");
355 puts(" -cp <path> specify a path to look for classes");
356 puts(" -classpath <path> specify a path to look for classes");
357 puts(" -D<name>=<value> add an entry to the property list");
358 puts(" -verbose[:class|gc|jni] enable specific verbose output");
359 puts(" -version print product version and exit");
360 puts(" -fullversion print jpackage-compatible product version and exit");
361 puts(" -showversion print product version and continue");
362 puts(" -help, -? print this help message");
363 puts(" -X print help on non-standard Java options");
364 puts(" -esa | -enablesystemassertions");
365 puts(" enable system assertions");
366 puts(" -dsa | -disablesystemassertions");
367 puts(" disable system assertions");
371 puts(" -agentlib:<agent-lib-name>=<options> library to load containg JVMTI agent");
372 puts (" for jdwp help use: -agentlib:jdwp=help");
373 puts(" -agentpath:<path-to-agent>=<options> path to library containg JVMTI agent");
376 puts("CACAO options:");
377 puts(" -v write state-information");
378 puts(" -verbose[:call|exception|jit]");
379 puts(" enable specific verbose output");
380 #ifdef TYPECHECK_VERBOSE
381 puts(" -verbosetc write debug messages while typechecking");
383 #if defined(__ALPHA__)
384 puts(" -noieee don't use ieee compliant arithmetic");
386 #if defined(ENABLE_VERIFIER)
387 puts(" -noverify don't verify classfiles");
389 puts(" -softnull use software nullpointer check");
390 #if defined(ENABLE_STATISTICS)
391 puts(" -time measure the runtime");
392 puts(" -stat detailed compiler statistics");
394 puts(" -log logfile specify a name for the logfile");
395 puts(" -c(heck)b(ounds) don't check array bounds");
396 puts(" s(ync) don't check for synchronization");
397 #if defined(ENABLE_LOOP)
398 puts(" -oloop optimize array accesses in loops");
400 puts(" -l don't start the class after loading");
401 puts(" -eager perform eager class loading and linking");
402 puts(" -all compile all methods, no execution");
403 puts(" -m compile only a specific method");
404 puts(" -sig specify signature for a specific method");
405 puts(" -s(how)... show...");
406 puts(" c(onstants) the constant pool");
407 puts(" m(ethods) class fields and methods");
408 puts(" u(tf) the utf - hash");
409 puts(" i(ntermediate) intermediate representation");
410 #if defined(ENABLE_DISASSEMBLER)
411 puts(" a(ssembler) disassembled listing");
412 puts(" e(xceptionstubs) disassembled exception stubs (only with -sa)");
413 puts(" n(ative) disassembled native stubs");
415 puts(" d(atasegment) data segment listing");
416 #if defined(ENABLE_INLINING)
417 puts(" -i n(line) activate inlining");
418 puts(" v(irtual) inline virtual methods (uses/turns rt option on)");
419 puts(" e(exception) inline methods with exceptions");
420 puts(" p(aramopt) optimize argument renaming");
421 puts(" o(utsiders) inline methods of foreign classes");
422 #endif /* defined(ENABLE_INLINING) */
423 #if defined(ENABLE_IFCONV)
424 puts(" -ifconv use if-conversion");
426 #if defined(ENABLE_LSRA)
427 puts(" -lsra use linear scan register allocation");
430 /* exit with error code */
436 static void Xusage(void)
438 #if defined(ENABLE_JIT)
439 puts(" -Xjit JIT mode execution (default)");
441 #if defined(ENABLE_INTRP)
442 puts(" -Xint interpreter mode execution");
444 puts(" -Xbootclasspath:<zip/jar files and directories separated by :>");
445 puts(" value is set as bootstrap class path");
446 puts(" -Xbootclasspath/a:<zip/jar files and directories separated by :>");
447 puts(" value is appended to the bootstrap class path");
448 puts(" -Xbootclasspath/p:<zip/jar files and directories separated by :>");
449 puts(" value is prepended to the bootstrap class path");
450 puts(" -Xglibj:<zip/jar files and directories separated by :>");
451 puts(" value is used as Java core library, but the");
452 puts(" hardcoded VM interface classes are prepended");
453 printf(" -Xms<size> set the initial size of the heap (default: %dMB)\n", HEAP_STARTSIZE / 1024 / 1024);
454 printf(" -Xmx<size> set the maximum size of the heap (default: %dMB)\n", HEAP_MAXSIZE / 1024 / 1024);
455 printf(" -Xss<size> set the thread stack size (default: %dkB)\n", STACK_SIZE / 1024);
456 puts(" -Xprof[:bb] collect and print profiling data");
457 #if defined(ENABLE_JVMTI)
458 /* -Xdebug option depend on gnu classpath JDWP options. options:
459 transport=dt_socket,address=<hostname:port>,server=(y|n),suspend(y|n) */
460 puts(" -Xdebug enable remote debugging\n");
461 puts(" -Xrunjdwp transport=[dt_socket|...],address=<hostname:port>,server=[y|n],suspend=[y|n]\n");
462 puts(" enable remote debugging\n");
465 /* exit with error code */
471 /* version *********************************************************************
473 Only prints cacao version information.
475 *******************************************************************************/
477 static void version(bool opt_exit)
479 puts("java version \""JAVA_VERSION"\"");
480 puts("CACAO version "VERSION"");
482 puts("Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,");
483 puts("C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,");
484 puts("E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,");
485 puts("J. Wenninger, Institut f. Computersprachen - TU Wien\n");
487 puts("This program is free software; you can redistribute it and/or");
488 puts("modify it under the terms of the GNU General Public License as");
489 puts("published by the Free Software Foundation; either version 2, or (at");
490 puts("your option) any later version.\n");
492 puts("This program is distributed in the hope that it will be useful, but");
493 puts("WITHOUT ANY WARRANTY; without even the implied warranty of");
494 puts("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU");
495 puts("General Public License for more details.\n");
497 puts("Configure/Build options:\n");
498 puts(" ./configure: "VERSION_CONFIGURE_ARGS"");
499 #if defined(__VERSION__)
500 puts(" CC : "VERSION_CC" ("__VERSION__")");
502 puts(" CC : "VERSION_CC"");
504 puts(" CFLAGS : "VERSION_CFLAGS"\n");
506 puts("Default variables:\n");
507 printf(" maximum heap size : %d\n", HEAP_MAXSIZE);
508 printf(" initial heap size : %d\n", HEAP_STARTSIZE);
509 printf(" stack size : %d\n", STACK_SIZE);
510 puts(" java.boot.class.path: "CACAO_VM_ZIP":"CLASSPATH_GLIBJ_ZIP"");
511 puts(" java.library.path : "CLASSPATH_LIBRARY_PATH"\n");
513 puts("Runtime variables:\n");
514 printf(" maximum heap size : %d\n", opt_heapmaxsize);
515 printf(" initial heap size : %d\n", opt_heapstartsize);
516 printf(" stack size : %d\n", opt_stacksize);
517 printf(" java.boot.class.path: %s\n", bootclasspath);
519 /* exit normally, if requested */
526 /* fullversion *****************************************************************
528 Prints a Sun compatible version information (required e.g. by
529 jpackage, www.jpackage.org).
531 *******************************************************************************/
533 static void fullversion(void)
535 puts("java full version \"cacao-"JAVA_VERSION"\"");
543 /* vm_create *******************************************************************
545 Creates a JVM. Called by JNI_CreateJavaVM.
547 *******************************************************************************/
549 bool vm_create(JavaVMInitArgs *vm_args)
558 #if defined(ENABLE_JVMTI)
560 char *libname, *agentarg;
561 bool jdwp,agentbypath;
562 jdwp = agentbypath = false;
565 /* check the JNI version requested */
567 switch (vm_args->version) {
568 case JNI_VERSION_1_1:
570 case JNI_VERSION_1_2:
571 case JNI_VERSION_1_4:
577 /* we only support 1 JVM instance */
582 /* set the VM starttime */
584 _Jv_jvm->starttime = util_current_time_millis();
586 /* get stuff from the environment *****************************************/
588 #if defined(DISABLE_GC)
589 nogc_init(HEAP_MAXSIZE, HEAP_STARTSIZE);
592 /* set the bootclasspath */
594 cp = getenv("BOOTCLASSPATH");
597 bootclasspath = MNEW(char, strlen(cp) + strlen("0"));
598 strcpy(bootclasspath, cp);
601 len = strlen(CACAO_VM_ZIP) +
603 strlen(CLASSPATH_GLIBJ_ZIP) +
606 bootclasspath = MNEW(char, len);
607 strcat(bootclasspath, CACAO_VM_ZIP);
608 strcat(bootclasspath, ":");
609 strcat(bootclasspath, CLASSPATH_GLIBJ_ZIP);
612 /* set the classpath */
614 cp = getenv("CLASSPATH");
617 classpath = MNEW(char, strlen(cp) + strlen("0"));
618 strcat(classpath, cp);
621 classpath = MNEW(char, strlen(".") + strlen("0"));
622 strcpy(classpath, ".");
626 /* interpret the options **************************************************/
634 opt_heapmaxsize = HEAP_MAXSIZE;
635 opt_heapstartsize = HEAP_STARTSIZE;
636 opt_stacksize = STACK_SIZE;
639 #if defined(ENABLE_JVMTI)
640 /* initialize JVMTI related **********************************************/
644 /* initialize properties before commandline handling */
646 if (!properties_init())
647 throw_cacao_exception_exit(string_java_lang_InternalError,
648 "Unable to init properties");
650 /* add some default properties */
652 properties_add("java.endorsed.dirs", ""CACAO_PREFIX"/jre/lib/endorsed");
655 /* iterate over all passed options */
657 while ((opt = options_get(opts, vm_args)) != OPT_DONE) {
667 #if SIZEOF_VOID_P == 8
668 puts("Running a 32-bit JVM is not supported on this platform.");
674 #if SIZEOF_VOID_P == 4
675 puts("Running a 64-bit JVM is not supported on this platform.");
681 /* forget old classpath and set the argument as new classpath */
682 MFREE(classpath, char, strlen(classpath));
684 classpath = MNEW(char, strlen(opt_arg) + strlen("0"));
685 strcpy(classpath, opt_arg);
689 for (j = 0; j < strlen(opt_arg); j++) {
690 if (opt_arg[j] == '=') {
692 properties_add(opt_arg, opt_arg + j + 1);
697 /* if no '=' is given, just create an empty property */
699 properties_add(opt_arg, "");
704 case OPT_BOOTCLASSPATH:
705 /* Forget default bootclasspath and set the argument as
706 new boot classpath. */
708 MFREE(bootclasspath, char, strlen(bootclasspath));
710 bootclasspath = MNEW(char, strlen(opt_arg) + strlen("0"));
711 strcpy(bootclasspath, opt_arg);
714 case OPT_BOOTCLASSPATH_A:
715 /* append to end of bootclasspath */
717 len = strlen(bootclasspath);
719 bootclasspath = MREALLOC(bootclasspath,
723 strlen(opt_arg) + strlen("0"));
725 strcat(bootclasspath, ":");
726 strcat(bootclasspath, opt_arg);
729 case OPT_BOOTCLASSPATH_P:
730 /* prepend in front of bootclasspath */
735 bootclasspath = MNEW(char, strlen(opt_arg) + strlen(":") +
738 strcpy(bootclasspath, opt_arg);
739 strcat(bootclasspath, ":");
740 strcat(bootclasspath, cp);
742 MFREE(cp, char, len);
746 /* use as Java core library, but prepend VM interface classes */
748 MFREE(bootclasspath, char, strlen(bootclasspath));
750 len = strlen(CACAO_VM_ZIP) +
755 bootclasspath = MNEW(char, len);
757 strcpy(bootclasspath, CACAO_VM_ZIP);
758 strcat(bootclasspath, ":");
759 strcat(bootclasspath, opt_arg);
762 #if defined(ENABLE_JVMTI)
764 /* this option exists only for compatibility reasons */
768 /* I don't know yet what Xnoagent should do. This is only for
769 compatiblity with eclipse - motse */
778 strlen(CACAO_LIBDIR) +
779 strlen("/libjdwp.so=") +
783 agentarg = MNEW(char, len);
785 strcpy(agentarg, CACAO_LIBDIR);
786 strcat(agentarg, "/libjdwp.so=");
787 strcat(agentarg, &opt_arg[1]);
804 c = opt_arg[strlen(opt_arg) - 1];
806 if ((c == 'k') || (c == 'K')) {
807 j = atoi(opt_arg) * 1024;
809 } else if ((c == 'm') || (c == 'M')) {
810 j = atoi(opt_arg) * 1024 * 1024;
817 else if (opt == OPT_MS)
818 opt_heapstartsize = j;
829 if (strcmp("class", opt_arg) == 0)
830 opt_verboseclass = true;
832 else if (strcmp("gc", opt_arg) == 0)
833 opt_verbosegc = true;
835 else if (strcmp("jni", opt_arg) == 0)
836 opt_verbosejni = true;
838 else if (strcmp("call", opt_arg) == 0)
839 opt_verbosecall = true;
841 else if (strcmp("jit", opt_arg) == 0) {
846 compileverbose = true;
848 else if (strcmp("exception", opt_arg) == 0)
849 opt_verboseexception = true;
852 #if defined(ENABLE_VERIFIER) && defined(TYPECHECK_VERBOSE)
854 opt_typecheckverbose = true;
863 case OPT_FULLVERSION:
867 case OPT_SHOWVERSION:
875 #if defined(ENABLE_VERIFIER)
885 #if defined(ENABLE_STATISTICS)
887 opt_getcompilingtime = true;
888 opt_getloadingtime = true;
901 for (j = 0; j < strlen(opt_arg); j++) {
902 switch (opt_arg[j]) {
917 makeinitializations = false;
926 opt_method = opt_arg;
927 makeinitializations = false;
931 opt_signature = opt_arg;
937 makeinitializations = false;
940 case OPT_SHOW: /* Display options */
941 for (j = 0; j < strlen(opt_arg); j++) {
942 switch (opt_arg[j]) {
944 showconstantpool = true;
956 opt_showintermediate = true;
957 compileverbose = true;
960 #if defined(ENABLE_DISASSEMBLER)
962 opt_showdisassemble = true;
963 compileverbose = true;
967 opt_showexceptionstubs = true;
971 opt_shownativestub = true;
976 opt_showddatasegment = true;
985 #if defined(ENABLE_LOOP)
991 #if defined(ENABLE_INLINING)
993 for (j = 0; j < strlen(opt_arg); j++) {
994 switch (opt_arg[j]) {
996 /* define in options.h; Used in main.c, jit.c
997 & inline.c inlining is currently
1001 inlinevirtuals = true;
1004 inlineexceptions = true;
1007 inlineparamopt = true;
1010 inlineoutsiders = true;
1017 #endif /* defined(ENABLE_INLINING) */
1019 #if defined(ENABLE_IFCONV)
1025 #if defined(ENABLE_LSRA)
1040 _Jv_jvm->Java_java_lang_VMClassLoader_defaultAssertionStatus = true;
1044 _Jv_jvm->Java_java_lang_VMClassLoader_defaultAssertionStatus = false;
1047 case OPT_PROF_OPTION:
1048 /* use <= to get the last \0 too */
1050 for (j = 0, k = 0; j <= strlen(opt_arg); j++) {
1051 if (opt_arg[j] == ',')
1054 if (opt_arg[j] == '\0') {
1055 if (strcmp("bb", opt_arg + k) == 0)
1059 printf("Unknown option: -Xprof:%s\n", opt_arg + k);
1063 /* set k to next char */
1075 #if defined(ENABLE_JIT)
1078 printf("-Xjit option not enabled.\n");
1084 #if defined(ENABLE_INTRP)
1087 printf("-Xint option not enabled.\n");
1092 #if defined(ENABLE_INTRP)
1093 case OPT_STATIC_SUPERS:
1094 opt_static_supers = atoi(opt_arg);
1097 case OPT_NO_DYNAMIC:
1098 opt_no_dynamic = true;
1101 case OPT_NO_REPLICATION:
1102 opt_no_replication = true;
1105 case OPT_NO_QUICKSUPER:
1106 opt_no_quicksuper = true;
1115 printf("Unknown option: %s\n",
1116 vm_args->options[opt_index].optionString);
1122 /* Now we have all options handled and we can print the version
1129 /* get the main class *****************************************************/
1131 if (opt_index < vm_args->nOptions) {
1132 mainstring = vm_args->options[opt_index++].optionString;
1134 /* Put the jar file into the classpath (if any). */
1136 if (opt_jar == true) {
1137 /* free old classpath */
1139 MFREE(classpath, char, strlen(classpath));
1141 /* put jarfile into classpath */
1143 classpath = MNEW(char, strlen(mainstring) + strlen("0"));
1145 strcpy(classpath, mainstring);
1148 /* replace .'s with /'s in classname */
1150 for (i = strlen(mainstring) - 1; i >= 0; i--)
1151 if (mainstring[i] == '.')
1152 mainstring[i] = '/';
1156 #if defined(ENABLE_JVMTI)
1158 jvmti_set_phase(JVMTI_PHASE_ONLOAD);
1159 jvmti_agentload(agentarg, agentbypath, &handle, &libname);
1162 MFREE(agentarg, char, strlen(agentarg));
1164 jvmti_set_phase(JVMTI_PHASE_PRIMORDIAL);
1170 /* initialize this JVM ****************************************************/
1172 vm_initializing = true;
1174 /* initialize the garbage collector */
1176 gc_init(opt_heapmaxsize, opt_heapstartsize);
1178 #if defined(ENABLE_INTRP)
1179 /* Allocate main thread stack on the Java heap. */
1182 intrp_main_stack = GCMNEW(u1, opt_stacksize);
1183 MSET(intrp_main_stack, 0, u1, opt_stacksize);
1187 #if defined(ENABLE_THREADS)
1191 /* initialize the string hashtable stuff: lock (must be done
1192 _after_ threads_preinit) */
1195 throw_main_exception_exit();
1197 /* initialize the utf8 hashtable stuff: lock, often used utf8
1198 strings (must be done _after_ threads_preinit) */
1201 throw_main_exception_exit();
1203 /* initialize the classcache hashtable stuff: lock, hashtable
1204 (must be done _after_ threads_preinit) */
1206 if (!classcache_init())
1207 throw_main_exception_exit();
1209 /* initialize the loader with bootclasspath (must be done _after_
1213 throw_main_exception_exit();
1215 suck_add_from_property("java.endorsed.dirs");
1216 suck_add(bootclasspath);
1218 /* initialize the memory subsystem (must be done _after_
1222 throw_main_exception_exit();
1224 /* initialize the finalizer stuff (must be done _after_
1227 if (!finalizer_init())
1228 throw_main_exception_exit();
1230 /* install architecture dependent signal handler used for exceptions */
1234 /* initialize the codegen subsystems */
1238 /* initializes jit compiler */
1242 /* machine dependent initialization */
1244 #if defined(ENABLE_JIT)
1245 # if defined(ENABLE_INTRP)
1255 /* initialize the loader subsystems (must be done _after_
1259 throw_main_exception_exit();
1262 throw_main_exception_exit();
1265 throw_main_exception_exit();
1267 if (!exceptions_init())
1268 throw_main_exception_exit();
1270 if (!builtin_init())
1271 throw_main_exception_exit();
1273 /* Initialize the JNI subsystem (must be done _before_
1274 threads_init, as threads_init can call JNI methods
1275 (e.g. NewGlobalRef). */
1278 throw_main_exception_exit();
1280 #if defined(ENABLE_THREADS)
1281 if (!threads_init())
1282 throw_main_exception_exit();
1285 /* That's important, otherwise we get into trouble, if the Runtime
1286 static initializer is called before (circular dependency. This
1287 is with classpath 0.09. Another important thing is, that this
1288 has to happen after initThreads!!! */
1290 if (!initialize_class(class_java_lang_System))
1291 throw_main_exception_exit();
1293 #if defined(ENABLE_PROFILING)
1294 /* initialize profiling */
1296 if (!profile_init())
1297 throw_main_exception_exit();
1300 #if defined(ENABLE_THREADS)
1301 /* initialize recompilation */
1303 if (!recompile_init())
1304 throw_main_exception_exit();
1306 /* finally, start the finalizer thread */
1308 if (!finalizer_start_thread())
1309 throw_main_exception_exit();
1311 /* start the recompilation thread (must be done before the
1312 profiling thread) */
1314 if (!recompile_start_thread())
1315 throw_main_exception_exit();
1317 # if defined(ENABLE_PROFILING)
1318 /* start the profile sampling thread */
1321 if (!profile_start_thread())
1322 throw_main_exception_exit();
1326 #if defined(ENABLE_JVMTI)
1328 /* add agent library to native library hashtable */
1329 native_hashtable_library_add(utf_new_char(libname), class_java_lang_Object->classloader, handle);
1333 /* increment the number of VMs */
1337 /* initialization is done */
1339 vm_initializing = false;
1341 /* everything's ok */
1347 /* vm_destroy ******************************************************************
1349 Unloads a Java VM and reclaims its resources.
1351 *******************************************************************************/
1353 s4 vm_destroy(JavaVM *vm)
1355 #if defined(ENABLE_THREADS)
1356 threads_join_all_threads();
1359 /* everything's ok */
1365 /* vm_exit *********************************************************************
1367 Calls java.lang.System.exit(I)V to exit the JavaVM correctly.
1369 *******************************************************************************/
1371 void vm_exit(s4 status)
1375 /* signal that we are exiting */
1379 assert(class_java_lang_System);
1380 assert(class_java_lang_System->state & CLASS_LOADED);
1382 #if defined(ENABLE_JVMTI)
1383 if (jvmti || (dbgcom!=NULL)) {
1384 jvmti_set_phase(JVMTI_PHASE_DEAD);
1385 if (jvmti) jvmti_agentunload();
1389 if (!link_class(class_java_lang_System))
1390 throw_main_exception_exit();
1392 /* call java.lang.System.exit(I)V */
1394 m = class_resolveclassmethod(class_java_lang_System,
1395 utf_new_char("exit"),
1397 class_java_lang_Object,
1401 throw_main_exception_exit();
1403 /* call the exit function with passed exit status */
1405 (void) vm_call_method(m, NULL, status);
1407 /* If we had an exception, just ignore the exception and exit with
1410 vm_shutdown(status);
1414 /* vm_shutdown *****************************************************************
1416 Terminates the system immediately without freeing memory explicitly
1417 (to be used only for abnormal termination).
1419 *******************************************************************************/
1421 void vm_shutdown(s4 status)
1424 #if defined(ENABLE_STATISTICS)
1425 || opt_getcompilingtime || opt_stat
1429 log_text("CACAO terminated by shutdown");
1430 dolog("Exit status: %d\n", (s4) status);
1434 #if defined(ENABLE_JVMTI)
1435 /* terminate cacaodbgserver */
1437 pthread_mutex_lock(&dbgcomlock);
1439 pthread_mutex_unlock(&dbgcomlock);
1440 jvmti_cacaodbgserver_quit();
1448 /* vm_exit_handler *************************************************************
1450 The exit_handler function is called upon program termination.
1452 ATTENTION: Don't free system resources here! Some threads may still
1453 be running as this is called from VMRuntime.exit(). The OS does the
1456 *******************************************************************************/
1458 void vm_exit_handler(void)
1460 #if !defined(NDEBUG)
1462 class_showmethods(mainclass);
1464 if (showconstantpool)
1465 class_showconstantpool(mainclass);
1470 # if defined(ENABLE_PROFILING)
1472 profile_printstats();
1474 #endif /* !defined(NDEBUG) */
1476 #if defined(ENABLE_RT_TIMING)
1477 rt_timing_print_time_stats(stderr);
1480 #if defined(ENABLE_CYCLES_STATS)
1481 builtin_print_cycles_stats(stderr);
1482 stacktrace_print_cycles_stats(stderr);
1486 #if defined(ENABLE_STATISTICS)
1487 || opt_getcompilingtime || opt_stat
1491 log_text("CACAO terminated");
1493 #if defined(ENABLE_STATISTICS)
1496 #ifdef TYPECHECK_STATISTICS
1497 typecheck_print_statistics(get_logfile());
1503 if (opt_getcompilingtime)
1505 #endif /* defined(ENABLE_STATISTICS) */
1507 /* vm_print_profile(stderr);*/
1511 /* vm_abort ********************************************************************
1513 Prints an error message and aborts the VM.
1515 *******************************************************************************/
1517 void vm_abort(const char *text, ...)
1521 /* print the log message */
1526 log_vprint(text, ap);
1531 /* now abort the VM */
1537 /* vm_vmargs_from_valist *******************************************************
1541 *******************************************************************************/
1543 static void vm_vmargs_from_valist(methodinfo *m, java_objectheader *o,
1544 vm_arg *vmargs, va_list ap)
1546 typedesc *paramtypes;
1549 paramtypes = m->parseddesc->paramtypes;
1551 /* if method is non-static fill first block and skip `this' pointer */
1556 /* the `this' pointer */
1557 vmargs[0].type = TYPE_ADR;
1558 vmargs[0].data.l = (u8) (ptrint) o;
1564 for (; i < m->parseddesc->paramcount; i++, paramtypes++) {
1565 switch (paramtypes->decltype) {
1566 /* primitive types */
1567 case PRIMITIVETYPE_BOOLEAN:
1568 case PRIMITIVETYPE_BYTE:
1569 case PRIMITIVETYPE_CHAR:
1570 case PRIMITIVETYPE_SHORT:
1571 case PRIMITIVETYPE_INT:
1572 vmargs[i].type = TYPE_INT;
1573 vmargs[i].data.l = (s8) va_arg(ap, s4);
1576 case PRIMITIVETYPE_LONG:
1577 vmargs[i].type = TYPE_LNG;
1578 vmargs[i].data.l = (s8) va_arg(ap, s8);
1581 case PRIMITIVETYPE_FLOAT:
1582 vmargs[i].type = TYPE_FLT;
1583 #if defined(__ALPHA__)
1584 /* this keeps the assembler function much simpler */
1586 vmargs[i].data.d = (jdouble) va_arg(ap, jdouble);
1588 vmargs[i].data.f = (jfloat) va_arg(ap, jdouble);
1592 case PRIMITIVETYPE_DOUBLE:
1593 vmargs[i].type = TYPE_DBL;
1594 vmargs[i].data.d = (jdouble) va_arg(ap, jdouble);
1598 vmargs[i].type = TYPE_ADR;
1599 vmargs[i].data.l = (u8) (ptrint) va_arg(ap, void*);
1606 /* vm_vmargs_from_jvalue *******************************************************
1610 *******************************************************************************/
1612 static void vm_vmargs_from_jvalue(methodinfo *m, java_objectheader *o,
1613 vm_arg *vmargs, jvalue *args)
1615 typedesc *paramtypes;
1619 paramtypes = m->parseddesc->paramtypes;
1621 /* if method is non-static fill first block and skip `this' pointer */
1626 /* the `this' pointer */
1627 vmargs[0].type = TYPE_ADR;
1628 vmargs[0].data.l = (u8) (ptrint) o;
1634 for (j = 0; i < m->parseddesc->paramcount; i++, j++, paramtypes++) {
1635 switch (paramtypes->decltype) {
1636 /* primitive types */
1637 case PRIMITIVETYPE_BOOLEAN:
1638 case PRIMITIVETYPE_BYTE:
1639 case PRIMITIVETYPE_CHAR:
1640 case PRIMITIVETYPE_SHORT:
1641 case PRIMITIVETYPE_INT:
1642 vmargs[i].type = TYPE_INT;
1643 vmargs[i].data.l = (s8) args[j].i;
1646 case PRIMITIVETYPE_LONG:
1647 vmargs[i].type = TYPE_LNG;
1648 vmargs[i].data.l = (s8) args[j].j;
1651 case PRIMITIVETYPE_FLOAT:
1652 vmargs[i].type = TYPE_FLT;
1653 #if defined(__ALPHA__)
1654 /* this keeps the assembler function much simpler */
1656 vmargs[i].data.d = (jdouble) args[j].f;
1658 vmargs[i].data.f = args[j].f;
1662 case PRIMITIVETYPE_DOUBLE:
1663 vmargs[i].type = TYPE_DBL;
1664 vmargs[i].data.d = args[j].d;
1668 vmargs[i].type = TYPE_ADR;
1669 vmargs[i].data.l = (u8) (ptrint) args[j].l;
1676 /* vm_call_method **************************************************************
1678 Calls a Java method with a variable number of arguments and returns
1681 *******************************************************************************/
1683 java_objectheader *vm_call_method(methodinfo *m, java_objectheader *o, ...)
1686 java_objectheader *ro;
1689 ro = vm_call_method_valist(m, o, ap);
1696 /* vm_call_method_valist *******************************************************
1698 Calls a Java method with a variable number of arguments, passed via
1699 a va_list, and returns an address.
1701 *******************************************************************************/
1703 java_objectheader *vm_call_method_valist(methodinfo *m, java_objectheader *o,
1708 java_objectheader *ro;
1711 /* mark start of dump memory area */
1713 dumpsize = dump_size();
1715 /* get number of Java method arguments */
1717 vmargscount = m->parseddesc->paramcount;
1719 /* allocate vm_arg array */
1721 vmargs = DMNEW(vm_arg, vmargscount);
1723 /* fill the vm_arg array from a va_list */
1725 vm_vmargs_from_valist(m, o, vmargs, ap);
1727 /* call the Java method */
1729 ro = vm_call_method_vmarg(m, vmargscount, vmargs);
1731 /* release dump area */
1733 dump_release(dumpsize);
1739 /* vm_call_method_jvalue *******************************************************
1741 Calls a Java method with a variable number of arguments, passed via
1742 a jvalue array, and returns an address.
1744 *******************************************************************************/
1746 java_objectheader *vm_call_method_jvalue(methodinfo *m, java_objectheader *o,
1751 java_objectheader *ro;
1754 /* mark start of dump memory area */
1756 dumpsize = dump_size();
1758 /* get number of Java method arguments */
1760 vmargscount = m->parseddesc->paramcount;
1762 /* allocate vm_arg array */
1764 vmargs = DMNEW(vm_arg, vmargscount);
1766 /* fill the vm_arg array from a va_list */
1768 vm_vmargs_from_jvalue(m, o, vmargs, args);
1770 /* call the Java method */
1772 ro = vm_call_method_vmarg(m, vmargscount, vmargs);
1774 /* release dump area */
1776 dump_release(dumpsize);
1782 /* vm_call_method_vmarg ********************************************************
1784 Calls a Java method with a variable number of arguments, passed via
1785 a vm_arg array, and returns an address.
1787 *******************************************************************************/
1789 java_objectheader *vm_call_method_vmarg(methodinfo *m, s4 vmargscount,
1792 java_objectheader *o;
1794 #if defined(ENABLE_JIT)
1795 # if defined(ENABLE_INTRP)
1797 o = intrp_asm_vm_call_method(m, vmargscount, vmargs);
1800 o = asm_vm_call_method(m, vmargscount, vmargs);
1802 o = intrp_asm_vm_call_method(m, vmargscount, vmargs);
1809 /* vm_call_method_int **********************************************************
1811 Calls a Java method with a variable number of arguments and returns
1814 *******************************************************************************/
1816 s4 vm_call_method_int(methodinfo *m, java_objectheader *o, ...)
1822 i = vm_call_method_int_valist(m, o, ap);
1829 /* vm_call_method_int_valist ***************************************************
1831 Calls a Java method with a variable number of arguments, passed via
1832 a va_list, and returns an integer (s4).
1834 *******************************************************************************/
1836 s4 vm_call_method_int_valist(methodinfo *m, java_objectheader *o, va_list ap)
1843 /* mark start of dump memory area */
1845 dumpsize = dump_size();
1847 /* get number of Java method arguments */
1849 vmargscount = m->parseddesc->paramcount;
1851 /* allocate vm_arg array */
1853 vmargs = DMNEW(vm_arg, vmargscount);
1855 /* fill the vm_arg array from a va_list */
1857 vm_vmargs_from_valist(m, o, vmargs, ap);
1859 /* call the Java method */
1861 i = vm_call_method_int_vmarg(m, vmargscount, vmargs);
1863 /* release dump area */
1865 dump_release(dumpsize);
1871 /* vm_call_method_int_jvalue ***************************************************
1873 Calls a Java method with a variable number of arguments, passed via
1874 a jvalue array, and returns an integer (s4).
1876 *******************************************************************************/
1878 s4 vm_call_method_int_jvalue(methodinfo *m, java_objectheader *o, jvalue *args)
1885 /* mark start of dump memory area */
1887 dumpsize = dump_size();
1889 /* get number of Java method arguments */
1891 vmargscount = m->parseddesc->paramcount;
1893 /* allocate vm_arg array */
1895 vmargs = DMNEW(vm_arg, vmargscount);
1897 /* fill the vm_arg array from a va_list */
1899 vm_vmargs_from_jvalue(m, o, vmargs, args);
1901 /* call the Java method */
1903 i = vm_call_method_int_vmarg(m, vmargscount, vmargs);
1905 /* release dump area */
1907 dump_release(dumpsize);
1913 /* vm_call_method_int_vmarg ****************************************************
1915 Calls a Java method with a variable number of arguments, passed via
1916 a vm_arg array, and returns an integer (s4).
1918 *******************************************************************************/
1920 s4 vm_call_method_int_vmarg(methodinfo *m, s4 vmargscount, vm_arg *vmargs)
1924 #if defined(ENABLE_JIT)
1925 # if defined(ENABLE_INTRP)
1927 i = intrp_asm_vm_call_method_int(m, vmargscount, vmargs);
1930 i = asm_vm_call_method_int(m, vmargscount, vmargs);
1932 i = intrp_asm_vm_call_method_int(m, vmargscount, vmargs);
1939 /* vm_call_method_long *********************************************************
1941 Calls a Java method with a variable number of arguments and returns
1944 *******************************************************************************/
1946 s8 vm_call_method_long(methodinfo *m, java_objectheader *o, ...)
1952 l = vm_call_method_long_valist(m, o, ap);
1959 /* vm_call_method_long_valist **************************************************
1961 Calls a Java method with a variable number of arguments, passed via
1962 a va_list, and returns a long (s8).
1964 *******************************************************************************/
1966 s8 vm_call_method_long_valist(methodinfo *m, java_objectheader *o, va_list ap)
1973 /* mark start of dump memory area */
1975 dumpsize = dump_size();
1977 /* get number of Java method arguments */
1979 vmargscount = m->parseddesc->paramcount;
1981 /* allocate vm_arg array */
1983 vmargs = DMNEW(vm_arg, vmargscount);
1985 /* fill the vm_arg array from a va_list */
1987 vm_vmargs_from_valist(m, o, vmargs, ap);
1989 /* call the Java method */
1991 l = vm_call_method_long_vmarg(m, vmargscount, vmargs);
1993 /* release dump area */
1995 dump_release(dumpsize);
2001 /* vm_call_method_long_jvalue **************************************************
2003 Calls a Java method with a variable number of arguments, passed via
2004 a jvalue array, and returns a long (s8).
2006 *******************************************************************************/
2008 s8 vm_call_method_long_jvalue(methodinfo *m, java_objectheader *o, jvalue *args)
2015 /* mark start of dump memory area */
2017 dumpsize = dump_size();
2019 /* get number of Java method arguments */
2021 vmargscount = m->parseddesc->paramcount;
2023 /* allocate vm_arg array */
2025 vmargs = DMNEW(vm_arg, vmargscount);
2027 /* fill the vm_arg array from a va_list */
2029 vm_vmargs_from_jvalue(m, o, vmargs, args);
2031 /* call the Java method */
2033 l = vm_call_method_long_vmarg(m, vmargscount, vmargs);
2035 /* release dump area */
2037 dump_release(dumpsize);
2043 /* vm_call_method_long_vmarg ***************************************************
2045 Calls a Java method with a variable number of arguments, passed via
2046 a vm_arg array, and returns a long (s8).
2048 *******************************************************************************/
2050 s8 vm_call_method_long_vmarg(methodinfo *m, s4 vmargscount, vm_arg *vmargs)
2054 #if defined(ENABLE_JIT)
2055 # if defined(ENABLE_INTRP)
2057 l = intrp_asm_vm_call_method_long(m, vmargscount, vmargs);
2060 l = asm_vm_call_method_long(m, vmargscount, vmargs);
2062 l = intrp_asm_vm_call_method_long(m, vmargscount, vmargs);
2069 /* vm_call_method_float ********************************************************
2071 Calls a Java method with a variable number of arguments and returns
2074 *******************************************************************************/
2076 float vm_call_method_float(methodinfo *m, java_objectheader *o, ...)
2082 f = vm_call_method_float_valist(m, o, ap);
2089 /* vm_call_method_float_valist *************************************************
2091 Calls a Java method with a variable number of arguments, passed via
2092 a va_list, and returns a float.
2094 *******************************************************************************/
2096 float vm_call_method_float_valist(methodinfo *m, java_objectheader *o,
2104 /* mark start of dump memory area */
2106 dumpsize = dump_size();
2108 /* get number of Java method arguments */
2110 vmargscount = m->parseddesc->paramcount;
2112 /* allocate vm_arg array */
2114 vmargs = DMNEW(vm_arg, vmargscount);
2116 /* fill the vm_arg array from a va_list */
2118 vm_vmargs_from_valist(m, o, vmargs, ap);
2120 /* call the Java method */
2122 f = vm_call_method_float_vmarg(m, vmargscount, vmargs);
2124 /* release dump area */
2126 dump_release(dumpsize);
2132 /* vm_call_method_float_jvalue *************************************************
2134 Calls a Java method with a variable number of arguments, passed via
2135 a jvalue array, and returns a float.
2137 *******************************************************************************/
2139 float vm_call_method_float_jvalue(methodinfo *m, java_objectheader *o,
2147 /* mark start of dump memory area */
2149 dumpsize = dump_size();
2151 /* get number of Java method arguments */
2153 vmargscount = m->parseddesc->paramcount;
2155 /* allocate vm_arg array */
2157 vmargs = DMNEW(vm_arg, vmargscount);
2159 /* fill the vm_arg array from a va_list */
2161 vm_vmargs_from_jvalue(m, o, vmargs, args);
2163 /* call the Java method */
2165 f = vm_call_method_float_vmarg(m, vmargscount, vmargs);
2167 /* release dump area */
2169 dump_release(dumpsize);
2175 /* vm_call_method_float_vmarg **************************************************
2177 Calls a Java method with a variable number of arguments and returns
2180 *******************************************************************************/
2182 float vm_call_method_float_vmarg(methodinfo *m, s4 vmargscount, vm_arg *vmargs)
2186 #if defined(ENABLE_JIT)
2187 # if defined(ENABLE_INTRP)
2189 f = intrp_asm_vm_call_method_float(m, vmargscount, vmargs);
2192 f = asm_vm_call_method_float(m, vmargscount, vmargs);
2194 f = intrp_asm_vm_call_method_float(m, vmargscount, vmargs);
2201 /* vm_call_method_double *******************************************************
2203 Calls a Java method with a variable number of arguments and returns
2206 *******************************************************************************/
2208 double vm_call_method_double(methodinfo *m, java_objectheader *o, ...)
2214 d = vm_call_method_double_valist(m, o, ap);
2221 /* vm_call_method_double_valist ************************************************
2223 Calls a Java method with a variable number of arguments, passed via
2224 a va_list, and returns a double.
2226 *******************************************************************************/
2228 double vm_call_method_double_valist(methodinfo *m, java_objectheader *o,
2236 /* mark start of dump memory area */
2238 dumpsize = dump_size();
2240 /* get number of Java method arguments */
2242 vmargscount = m->parseddesc->paramcount;
2244 /* allocate vm_arg array */
2246 vmargs = DMNEW(vm_arg, vmargscount);
2248 /* fill the vm_arg array from a va_list */
2250 vm_vmargs_from_valist(m, o, vmargs, ap);
2252 /* call the Java method */
2254 d = vm_call_method_double_vmarg(m, vmargscount, vmargs);
2256 /* release dump area */
2258 dump_release(dumpsize);
2264 /* vm_call_method_double_jvalue ************************************************
2266 Calls a Java method with a variable number of arguments, passed via
2267 a jvalue array, and returns a double.
2269 *******************************************************************************/
2271 double vm_call_method_double_jvalue(methodinfo *m, java_objectheader *o,
2279 /* mark start of dump memory area */
2281 dumpsize = dump_size();
2283 /* get number of Java method arguments */
2285 vmargscount = m->parseddesc->paramcount;
2287 /* allocate vm_arg array */
2289 vmargs = DMNEW(vm_arg, vmargscount);
2291 /* fill the vm_arg array from a va_list */
2293 vm_vmargs_from_jvalue(m, o, vmargs, args);
2295 /* call the Java method */
2297 d = vm_call_method_double_vmarg(m, vmargscount, vmargs);
2299 /* release dump area */
2301 dump_release(dumpsize);
2307 /* vm_call_method_double_vmarg *************************************************
2309 Calls a Java method with a variable number of arguments and returns
2312 *******************************************************************************/
2314 double vm_call_method_double_vmarg(methodinfo *m, s4 vmargscount,
2319 #if defined(ENABLE_JIT)
2320 # if defined(ENABLE_INTRP)
2322 d = intrp_asm_vm_call_method_double(m, vmargscount, vmargs);
2325 d = asm_vm_call_method_double(m, vmargscount, vmargs);
2327 d = intrp_asm_vm_call_method_double(m, vmargscount, vmargs);
2335 * These are local overrides for various environment variables in Emacs.
2336 * Please do not remove this and leave it at the end of the file, where
2337 * Emacs will automagically detect them.
2338 * ---------------------------------------------------------------------
2341 * indent-tabs-mode: t