1 /* vm/global.h - global definitions
3 Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
4 R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
5 C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
6 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., 59 Temple Place - Suite 330, Boston, MA
25 Contact: cacao@complang.tuwien.ac.at
27 Authors: Reinhard Grafl
35 $Id: global.h 1959 2005-02-19 11:46:27Z carolyn $
47 /* additional data types ******************************************************/
49 typedef void *voidptr; /* generic pointer */
50 typedef void (*functionptr) (void); /* generic function pointer */
52 typedef int bool; /* boolean data type */
58 /* include some data structures ***********************************************/
63 /* resolve typedef cycles *****************************************************/
65 typedef struct java_objectheader java_objectheader;
66 typedef struct classinfo classinfo;
67 typedef struct _vftbl vftbl_t;
68 typedef u1* methodptr;
69 typedef struct fieldinfo fieldinfo;
70 typedef struct exceptiontable exceptiontable;
71 typedef struct methodinfo methodinfo;
72 typedef struct lineinfo lineinfo;
73 typedef struct arraydescriptor arraydescriptor;
76 /* additional includes ********************************************************/
78 #include "toolbox/list.h"
79 #include "vm/jit/inline/sets.h"
82 /* define some cacao paths ****************************************************/
84 #define CACAO_LIBRARY_PATH "/jre/lib/"ARCH_DIR"/"
85 #define CACAO_RT_JAR_PATH "/jre/lib/rt.jar"
86 #define CACAO_EXT_DIR "/jre/lib/ext"
89 #define STATISTICS /* if enabled collects program statistics */
92 * SIZE_FROM_CLASSINFO toggles between the bitmap_based and the new method
93 * of determining the sizes of objects on the heap.
95 #define SIZE_FROM_CLASSINFO
98 * CACAO_TYPECHECK activates typechecking (part of bytecode verification)
100 #define CACAO_TYPECHECK
103 * TYPECHECK_STACK_COMPCAT activates full checking of computational
104 * categories for stack manipulations (POP,POP2,SWAP,DUP,DUP2,DUP_X1,
105 * DUP2_X1,DUP_X2,DUP2_X2).
107 #define TYPECHECK_STACK_COMPCAT
110 * Macros for configuration of the typechecking code
112 * TYPECHECK_STATISTICS activates gathering statistical information.
113 * TYPEINFO_DEBUG activates debug checks and debug helpers in typeinfo.c
114 * TYPECHECK_DEBUG activates debug checks in typecheck.c
115 * TYPEINFO_DEBUG_TEST activates the typeinfo test at startup.
116 * TYPECHECK_VERBOSE_IMPORTANT activates important debug messages
117 * TYPECHECK_VERBOSE activates all debug messages
119 #ifdef CACAO_TYPECHECK
120 /*#define TYPECHECK_STATISTICS
121 #define TYPEINFO_DEBUG
122 #define TYPECHECK_DEBUG
123 #define TYPEINFO_DEBUG_TEST
124 #define TYPECHECK_VERBOSE
125 #define TYPECHECK_VERBOSE_IMPORTANT*/
126 #if defined(TYPECHECK_VERBOSE) || defined(TYPECHECK_VERBOSE_IMPORTANT)
127 #define TYPECHECK_VERBOSE_OPT
132 /* if we have threads disabled this one is not defined ************************/
134 #if !defined(USE_THREADS)
135 #define THREADSPECIFIC
139 /* immediate data union */
152 #define PRIMITIVETYPE_COUNT 9 /* number of primitive types */
154 /* CAUTION: Don't change the numerical values! These constants are
155 * used as indices into the primitive type table.
157 #define PRIMITIVETYPE_INT 0
158 #define PRIMITIVETYPE_LONG 1
159 #define PRIMITIVETYPE_FLOAT 2
160 #define PRIMITIVETYPE_DOUBLE 3
161 #define PRIMITIVETYPE_BYTE 4
162 #define PRIMITIVETYPE_CHAR 5
163 #define PRIMITIVETYPE_SHORT 6
164 #define PRIMITIVETYPE_BOOLEAN 7
165 #define PRIMITIVETYPE_VOID 8
168 #define MAX_ALIGN 8 /* most generic alignment for JavaVM values */
171 /* basic data types ***********************************************************/
173 /* CAUTION: jit/jit.h relies on these numerical values! */
174 #define TYPE_INT 0 /* the JavaVM types must numbered in the */
175 #define TYPE_LONG 1 /* same order as the ICMD_Ixxx to ICMD_Axxx */
176 #define TYPE_FLOAT 2 /* instructions (LOAD and STORE) */
177 #define TYPE_DOUBLE 3 /* integer, long, float, double, address */
178 #define TYPE_ADDRESS 4 /* all other types can be numbered arbitrarly */
183 /* Java class file constants **************************************************/
185 #define MAGIC 0xCAFEBABE
186 #define MAJOR_VERSION 48
187 #define MINOR_VERSION 0
189 #define CONSTANT_Class 7
190 #define CONSTANT_Fieldref 9
191 #define CONSTANT_Methodref 10
192 #define CONSTANT_InterfaceMethodref 11
193 #define CONSTANT_String 8
194 #define CONSTANT_Integer 3
195 #define CONSTANT_Float 4
196 #define CONSTANT_Long 5
197 #define CONSTANT_Double 6
198 #define CONSTANT_NameAndType 12
199 #define CONSTANT_Utf8 1
201 #define CONSTANT_UNUSED 0
203 #define ACC_PUBLIC 0x0001
204 #define ACC_PRIVATE 0x0002
205 #define ACC_PROTECTED 0x0004
206 #define ACC_STATIC 0x0008
207 #define ACC_FINAL 0x0010
208 #define ACC_SUPER 0x0020
209 #define ACC_SYNCHRONIZED 0x0020
210 #define ACC_VOLATILE 0x0040
211 #define ACC_TRANSIENT 0x0080
212 #define ACC_NATIVE 0x0100
213 #define ACC_INTERFACE 0x0200
214 #define ACC_ABSTRACT 0x0400
215 #define ACC_STRICT 0x0800
218 /* constant pool entries *******************************************************
220 All constant pool entries need a data structure which contain the entrys
221 value. In some cases this structure exist already, in the remaining cases
222 this structure must be generated:
224 kind structure generated?
225 ----------------------------------------------------------------------
226 CONSTANT_Class classinfo no
227 CONSTANT_Fieldref constant_FMIref yes
228 CONSTANT_Methodref constant_FMIref yes
229 CONSTANT_InterfaceMethodref constant_FMIref yes
230 CONSTANT_String unicode no
231 CONSTANT_Integer constant_integer yes
232 CONSTANT_Float constant_float yes
233 CONSTANT_Long constant_long yes
234 CONSTANT_Double constant_double yes
235 CONSTANT_NameAndType constant_nameandtype yes
236 CONSTANT_Utf8 unicode no
239 *******************************************************************************/
241 /* data structure for storing information needed for a stacktrace across native functions*/
243 typedef struct native_stackframeinfo native_stackframeinfo;
245 struct native_stackframeinfo {
246 void *oldThreadspecificHeadValue;
247 void **addressOfThreadspecificHead;
252 void *beginOfJavaStackframe; /*only used if != 0*/
253 void *returnToFromNative;
256 void *returnFromNative;
257 void *addrReturnFromNative;
259 struct native_stackframeinfo *next;
260 struct native_stackframeinfo *prev;
265 typedef struct stacktraceelement stacktraceelement;
267 struct stacktraceelement {
277 typedef struct stackTraceBuffer stackTraceBuffer;
279 struct stackTraceBuffer {
281 stacktraceelement *start;
288 /* data structure for calls from c code to java methods */
290 struct jni_callblock {
295 typedef struct jni_callblock jni_callblock;
298 /* data structures of remaining constant pool entries *************************/
300 typedef struct { /* Fieldref, Methodref and InterfaceMethodref */
301 classinfo *class; /* class containing this field/method/interface */
302 utf *name; /* field/method/interface name */
303 utf *descriptor; /* field/method/interface type descriptor string */
307 typedef struct { /* Integer */
312 typedef struct { /* Float */
317 typedef struct { /* Long */
322 typedef struct { /* Double */
327 typedef struct { /* NameAndType (Field or Method) */
328 utf *name; /* field/method name */
329 utf *descriptor; /* field/method type descriptor string */
330 } constant_nameandtype;
333 /* data structures of the runtime system **************************************/
335 /* objects *********************************************************************
337 All objects (and arrays) which resides on the heap need the following
338 header at the beginning of the data structure.
341 struct java_objectheader { /* header for all objects */
342 vftbl_t *vftbl; /* pointer to virtual function table */
343 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
350 /* arrays **********************************************************************
352 All arrays are objects (they need the object header with a pointer
353 to a vftbl (array class table). There is one class for each array
354 type. The array type is described by an arraydescriptor struct
355 which is referenced by the vftbl.
358 /* CAUTION: Don't change the numerical values! These constants (with
359 * the exception of ARRAYTYPE_OBJECT) are used as indices in the
360 * primitive type table.
362 #define ARRAYTYPE_INT PRIMITIVETYPE_INT
363 #define ARRAYTYPE_LONG PRIMITIVETYPE_LONG
364 #define ARRAYTYPE_FLOAT PRIMITIVETYPE_FLOAT
365 #define ARRAYTYPE_DOUBLE PRIMITIVETYPE_DOUBLE
366 #define ARRAYTYPE_BYTE PRIMITIVETYPE_BYTE
367 #define ARRAYTYPE_CHAR PRIMITIVETYPE_CHAR
368 #define ARRAYTYPE_SHORT PRIMITIVETYPE_SHORT
369 #define ARRAYTYPE_BOOLEAN PRIMITIVETYPE_BOOLEAN
370 #define ARRAYTYPE_OBJECT PRIMITIVETYPE_VOID /* don't use as index! */
372 typedef struct java_arrayheader { /* header for all arrays */
373 java_objectheader objheader; /* object header */
374 s4 size; /* array size */
375 #ifdef SIZE_FROM_CLASSINFO
376 s4 alignedsize; /* phil */
382 /* structs for all kinds of arrays ********************************************/
384 typedef struct java_chararray {
385 java_arrayheader header;
389 typedef struct java_floatheader {
390 java_arrayheader header;
394 typedef struct java_doublearray {
395 java_arrayheader header;
399 /* booleanarray and bytearray need identical memory layout (access methods
400 use the same machine code */
402 typedef struct java_booleanarray {
403 java_arrayheader header;
407 typedef struct java_bytearray {
408 java_arrayheader header;
412 typedef struct java_shortarray {
413 java_arrayheader header;
417 typedef struct java_intarray {
418 java_arrayheader header;
422 typedef struct java_longarray {
423 java_arrayheader header;
427 /* objectarray and arrayarray need identical memory layout (access methods
428 use the same machine code */
430 typedef struct java_objectarray {
431 java_arrayheader header;
432 java_objectheader *data[1];
436 /* structure for primitive classes ********************************************/
438 typedef struct primitivetypeinfo {
439 classinfo *class_wrap; /* class for wrapping primitive type */
440 classinfo *class_primitive; /* primitive class */
441 char *wrapname; /* name of class for wrapping */
442 char typesig; /* one character type signature */
443 char *name; /* name of primitive class */
444 char *arrayname; /* name of primitive array class */
445 classinfo *arrayclass; /* primitive array class */
446 vftbl_t *arrayvftbl; /* vftbl of primitive array class */
450 /* field, method and class structures *****************************************/
452 typedef struct xtafldinfo {
454 classinfo *fldClassType;
455 classSet *XTAclassSet; /* field class type set */
459 /* fieldinfo ******************************************************************/
461 struct fieldinfo { /* field of a class */
462 s4 flags; /* ACC flags */
463 s4 type; /* basic data type */
464 utf *name; /* name of field */
465 utf *descriptor; /* JavaVM descriptor string of field */
467 s4 offset; /* offset from start of object (instance variables) */
469 imm_union value; /* storage for static values (class variables) */
471 classinfo *class; /* needed by typechecker. Could be optimized */
472 /* away by using constant_FMIref instead of */
473 /* fieldinfo throughout the compiler. */
479 /* exceptiontable *************************************************************/
481 struct exceptiontable { /* exceptiontable entry in a method */
482 s4 startpc; /* start pc of guarded area (inclusive) */
483 struct basicblock *start;
485 s4 endpc; /* end pc of guarded area (exklusive) */
486 struct basicblock *end;
488 s4 handlerpc; /* pc of exception handler */
489 struct basicblock *handler;
491 classinfo *catchtype; /* catchtype of exception (NULL == catchall) */
492 exceptiontable *next; /* used to build a list of exception when */
493 /* loops are copied */
494 exceptiontable *down; /* instead of the old array, a list is used */
498 /* methodinfo static info ****************************************************/
500 typedef struct xtainfo {
501 s4 XTAmethodUsed; /* XTA if used in callgraph - not used /used */
502 classSet *XTAclassSet; /* method class type set */
503 /*classSet *PartClassSet */ /* method class type set */
505 classSetNode *paramClassSet; /* cone set of methods parameters */
507 /* Needed for interative checking */
508 methSet *calls; /* Edges - methods this method calls */
509 methSet *calledBy; /* Edges - methods that call this method */
510 methSet *marked; /*not in Dez*/ /* methods that marked by this method */
512 fldSet *fldsUsed; /* fields used by this method */
513 /*methSetNode *interfaceCalls*/ /* methods this method calls as interface */
514 bool chgdSinceLastParse; /* Changed since last parse ? */
518 /* lineinfo *****************************************************************/
526 /* methodinfo *****************************************************************/
528 struct methodinfo { /* method structure */
529 java_objectheader header; /* we need this in jit's monitorenter */
530 s4 flags; /* ACC flags */
531 utf *name; /* name of method */
532 utf *descriptor; /* JavaVM descriptor string of method */
533 s4 returntype; /* only temporary valid, return type */
534 classinfo *returnclass; /* pointer to classinfo for the rtn type */ /*XTA*/
535 s4 paramcount; /* only temporary valid, parameter count */
536 u1 *paramtypes; /* only temporary valid, parameter types */
537 classinfo **paramclass; /* pointer to classinfo for a parameter */ /*XTA*/
539 bool isleafmethod; /* does method call subroutines */
541 classinfo *class; /* class, the method belongs to */
542 s4 vftblindex; /* index of method in virtual function */
543 /* table (if it is a virtual method) */
544 s4 maxstack; /* maximum stack depth of method */
545 s4 maxlocals; /* maximum number of local variables */
546 s4 jcodelength; /* length of JavaVM code */
547 u1 *jcode; /* pointer to JavaVM code */
549 s4 basicblockcount; /* number of basic blocks */
550 struct basicblock *basicblocks; /* points to basic block array */
551 s4 *basicblockindex; /* a table which contains for every byte */
552 /* of JavaVM code a basic block index if */
553 /* at this byte is the start of a basic */
556 s4 instructioncount; /* number of JavaVM instructions */
557 struct instruction *instructions; /* points to intermediate code instructions */
559 s4 stackcount; /* number of stack elements */
560 struct stackelement *stack; /* points to intermediate code instructions */
562 s4 exceptiontablelength;/* exceptiontable length */
563 exceptiontable *exceptiontable; /* the exceptiontable */
565 u2 thrownexceptionscount;/* number of exceptions attribute */
566 classinfo **thrownexceptions; /* checked exceptions a method may throw */
568 u2 linenumbercount; /* number of linenumber attributes */
569 lineinfo *linenumbers; /* array of lineinfo items */
571 int c_debug_nr; /* a counter to number all BB with an */
574 u1 *stubroutine; /* stub for compiling or calling natives */
575 s4 mcodelength; /* legth of generated machine code */
576 functionptr mcode; /* pointer to machine code */
577 functionptr entrypoint; /* entry point in machine code */
582 s4 methodUsed; /* marked (might be used later) /not used /used */
583 s4 monoPoly; /* call is mono or poly or unknown */ /*RT stats */
584 /* should # method def'd and used be kept after static parse (will it be used?) */
587 s4 nativelyoverloaded; /* used in header.c and only valid there */
591 /* innerclassinfo *************************************************************/
593 typedef struct innerclassinfo {
594 classinfo *inner_class; /* inner class pointer */
595 classinfo *outer_class; /* outer class pointer */
596 utf *name; /* innerclass name */
597 s4 flags; /* ACC flags */
601 /* classinfo ******************************************************************/
603 struct classinfo { /* class structure */
604 java_objectheader header; /* classes are also objects */
605 java_objectarray* signers;
606 struct java_security_ProtectionDomain* pd;
607 struct java_lang_VMClass* vmClass;
608 struct java_lang_reflect_Constructor* constructor;
610 s4 initializing_thread; /* gnu classpath */
611 s4 erroneous_state; /* gnu classpath */
612 struct gnu_classpath_RawData* vmData; /* gnu classpath */
614 s4 flags; /* ACC flags */
615 utf *name; /* class name */
617 s4 cpcount; /* number of entries in constant pool */
618 u1 *cptags; /* constant pool tags */
619 voidptr *cpinfos; /* pointer to constant pool info structures */
621 classinfo *super; /* super class pointer */
622 classinfo *sub; /* sub class pointer */
623 classinfo *nextsub; /* pointer to next class in sub class list */
625 s4 interfacescount; /* number of interfaces */
626 classinfo **interfaces; /* pointer to interfaces */
628 s4 fieldscount; /* number of fields */
629 fieldinfo *fields; /* field table */
631 s4 methodscount; /* number of methods */
632 methodinfo *methods; /* method table */
634 listnode listnode; /* linkage */
636 bool initialized; /* true, if class already initialized */
637 bool initializing; /* flag for the compiler */
638 bool loaded; /* true, if class already loaded */
639 bool linked; /* true, if class already linked */
640 s4 index; /* hierarchy depth (classes) or index */
642 s4 instancesize; /* size of an instance of this class */
643 #ifdef SIZE_FROM_CLASSINFO
644 s4 alignedsize; /* size of an instance, aligned to the */
645 /* allocation size on the heap */
648 vftbl_t *vftbl; /* pointer to virtual function table */
650 methodinfo *finalizer; /* finalizer method */
652 u2 innerclasscount; /* number of inner classes */
653 innerclassinfo *innerclass;
655 classinfo *hashlink; /* link for external hash chain */
656 bool classvftbl; /* has its own copy of the Class vtbl */
658 s4 classUsed; /* 0= not used 1 = used CO-RT */
660 classSetNode *impldBy; /* implemented by class set */
661 utf *packagename; /* full name of the package */
662 utf *sourcefile; /* classfile name containing this class */
663 java_objectheader *classloader; /* NULL for bootstrap classloader */
666 /* check if class is an array class. Only use for linked classes! */
667 #define CLASS_IS_ARRAY(clsinfo) ((clsinfo)->vftbl->arraydesc != NULL)
670 /* virtual function table ******************************************************
672 The vtbl has a bidirectional layout with open ends at both sides.
673 interfacetablelength gives the number of entries of the interface table at
674 the start of the vftbl. The vftbl pointer points to &interfacetable[0].
675 vftbllength gives the number of entries of table at the end of the vftbl.
677 runtime type check (checkcast):
679 Different methods are used for runtime type check depending on the
680 argument of checkcast/instanceof.
682 A check against a class is implemented via relative numbering on the class
683 hierachy tree. The tree is numbered in a depth first traversal setting
684 the base field and the diff field. The diff field gets the result of
685 (high - base) so that a range check can be implemented by an unsigned
686 compare. A sub type test is done by checking the inclusion of base of
687 the sub class in the range of the superclass.
689 A check against an interface is implemented via the interfacevftbl. If the
690 interfacevftbl contains a nonnull value a class is a subclass of this
695 Like standard virtual methods interface methods are called using
696 virtual function tables. All interfaces are numbered sequentially
697 (starting with zero). For each class there exist an interface table
698 of virtual function tables for each implemented interface. The length
699 of the interface table is determined by the highest number of an
700 implemented interface.
702 The following example assumes a class which implements interface 0 and 3:
704 interfacetablelength = 4
707 +-----------+ | method 2 |---> method z
708 | class | | method 1 |---> method y
709 +-----------+ | method 0 |---> method x
710 | ivftbl 0 |----------> +----------+
711 vftblptr ---> +-----------+
712 | ivftbl -1 |--> NULL +----------+
713 | ivftbl -2 |--> NULL | method 1 |---> method x
714 | ivftbl -3 |-----+ | method 0 |---> method a
715 +-----------+ +----> +----------+
722 interfacevftbllength ---> +---------------+
724 *******************************************************************************/
727 methodptr *interfacetable[1]; /* interface table (access via macro) */
729 classinfo *class; /* class, the vtbl belongs to */
731 arraydescriptor *arraydesc; /* for array classes, otherwise NULL */
733 s4 vftbllength; /* virtual function table length */
734 s4 interfacetablelength; /* interface table length */
736 s4 baseval; /* base for runtime type check */
737 /* (-index for interfaces) */
738 s4 diffval; /* high - base for runtime type check */
740 s4 *interfacevftbllength; /* length of interface vftbls */
742 methodptr table[1]; /* class vftbl */
745 #define VFTBLINTERFACETABLE(v,i) (v)->interfacetable[-i]
748 /* arraydescriptor ************************************************************
750 For every array class an arraydescriptor is allocated which
751 describes the array class.
752 The arraydescriptor is referenced from the vftbl of the array
755 *******************************************************************************/
757 struct arraydescriptor {
758 vftbl_t *componentvftbl; /* vftbl of the component type, NULL for primit. */
759 vftbl_t *elementvftbl; /* vftbl of the element type, NULL for primitive */
760 s2 arraytype; /* ARRAYTYPE_* constant */
761 s2 dimension; /* dimension of the array (always >= 1) */
762 s4 dataoffset; /* offset of the array data from object pointer */
763 s4 componentsize; /* size of a component in bytes */
764 s2 elementtype; /* ARRAYTYPE_* constant */
768 /* flag variables *************************************************************/
770 extern bool cacao_initializing;
772 #ifdef TYPECHECK_VERBOSE_OPT
773 extern bool typecheckverbose;
776 /*extern int pClassHeir;*/
777 /*extern int pCallgraph;*/
778 /*extern int pOpcodes;*/
779 /*extern int pStats;*/
781 /*extern void RT_jit_parse(methodinfo *m);*/
784 /* table of primitive types ***************************************************/
786 /* This array can be indexed by the PRIMITIVETYPE_ and ARRAYTYPE_
787 * constants (except ARRAYTYPE_OBJECT).
789 extern primitivetypeinfo primitivetype_table[PRIMITIVETYPE_COUNT];
792 /* macros for descriptor parsing **********************************************/
794 /* SKIP_FIELDDESCRIPTOR:
795 * utf_ptr must point to the first character of a field descriptor.
796 * After the macro call utf_ptr points to the first character after
797 * the field descriptor.
799 * CAUTION: This macro does not check for an unexpected end of the
800 * descriptor. Better use SKIP_FIELDDESCRIPTOR_SAFE.
802 #define SKIP_FIELDDESCRIPTOR(utf_ptr) \
803 do { while (*(utf_ptr)=='[') (utf_ptr)++; \
804 if (*(utf_ptr)++=='L') \
805 while(*(utf_ptr)++ != ';') /* skip */; } while(0)
807 /* SKIP_FIELDDESCRIPTOR_SAFE:
808 * utf_ptr must point to the first character of a field descriptor.
809 * After the macro call utf_ptr points to the first character after
810 * the field descriptor.
813 * utf_ptr....points to first char of descriptor
814 * end_ptr....points to first char after the end of the string
815 * errorflag..must be initialized (to false) by the caller!
817 * utf_ptr....points to first char after the descriptor
818 * errorflag..set to true if the string ended unexpectedly
820 #define SKIP_FIELDDESCRIPTOR_SAFE(utf_ptr,end_ptr,errorflag) \
821 do { while ((utf_ptr) != (end_ptr) && *(utf_ptr)=='[') (utf_ptr)++; \
822 if ((utf_ptr) == (end_ptr)) \
823 (errorflag) = true; \
825 if (*(utf_ptr)++=='L') { \
826 while((utf_ptr) != (end_ptr) && *(utf_ptr)++ != ';') \
828 if ((utf_ptr)[-1] != ';') \
829 (errorflag) = true; }} while(0)
832 /* Synchronization ************************************************************/
834 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
837 void compiler_lock();
838 void compiler_unlock();
842 /**** Methods: called directly by cacao, which defines the callpath ***/
843 #define MAINCLASS mainstring
844 #define MAINMETH "main"
845 #define MAINDESC "([Ljava/lang/String;)V"
847 #define EXITCLASS "java/lang/System"
848 #define EXITMETH "exit"
849 #define EXITDESC "(I)V"
851 #if defined(USE_THREADS)
852 #define THREADCLASS "java/lang/Thread"
853 #define THREADMETH "<init>"
854 #define THREADDESC "(Ljava/lang/VMThread;Ljava/lang/String;IZ)V"
856 #define THREADGROUPCLASS "java/lang/ThreadGroup"
857 #define THREADGROUPMETH "addThread"
858 #define THREADGROUPDESC "(Ljava/lang/Thread;)V"
861 #endif /* _GLOBAL_H */
865 * These are local overrides for various environment variables in Emacs.
866 * Please do not remove this and leave it at the end of the file, where
867 * Emacs will automagically detect them.
868 * ---------------------------------------------------------------------
871 * indent-tabs-mode: t