home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / java.z / tree.h < prev    next >
C/C++ Source or Header  |  1996-05-03  |  3KB  |  81 lines

  1. /*
  2.  * @(#)tree.h    1.23 96/04/02 James Gosling
  3.  *
  4.  * Copyright (c) 1994 Sun Microsystems, Inc. All Rights Reserved.
  5.  *
  6.  * Permission to use, copy, modify, and distribute this software
  7.  * and its documentation for NON-COMMERCIAL purposes and without
  8.  * fee is hereby granted provided that this copyright notice
  9.  * appears in all copies. Please refer to the file "copyright.html"
  10.  * for further important copyright and licensing information.
  11.  *
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF
  13.  * THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
  14.  * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
  15.  * PARTICULAR PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR
  16.  * ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
  17.  * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
  18.  */
  19.  
  20. /*
  21.  * Definitions having to do with the program tree
  22.  */
  23.  
  24. #ifndef _TREE_H_
  25. #define _TREE_H_
  26.  
  27. #include "oobj.h"    /* for the definition of unicode */
  28. #include "typecodes.h"
  29.  
  30. extern int   SkipSourceChecks;
  31. extern char *progname;
  32. extern ClassClass **binclasses;
  33. extern long nbinclasses, sizebinclasses;
  34. extern int verbose;
  35. extern int verbosegc;
  36. extern int verifyclasses;
  37. extern int noasyncgc;
  38.  
  39. extern int ImportAcceptable;
  40. extern int InhibitExecute;
  41.  
  42. /* User specifiable attributes */
  43. #define ACC_PUBLIC            0x0001    /* visible to everyone */
  44. #define ACC_PRIVATE           0x0002    /* visible only to the defining class */
  45. #define ACC_PROTECTED         0x0004    /* visible to subclasses */
  46. #define ACC_STATIC            0x0008    /* instance variable is static */
  47. #define ACC_FINAL             0x0010    /* no further subclassing, overriding */
  48. #define ACC_SYNCHRONIZED      0x0020    /* wrap method call in monitor lock */
  49. #define ACC_SUPER             0x0020    /* funky handling of invokenonvirtual */
  50. #define ACC_THREADSAFE        0x0040    /* can cache in registers */
  51. #define ACC_TRANSIENT         0x0080    /* not persistant */
  52. #define ACC_NATIVE            0x0100    /* implemented in C */
  53. #define ACC_INTERFACE         0x0200    /* class is an interface */
  54. #define ACC_ABSTRACT          0x0400    /* no definition provided */
  55. #define ACC_XXUNUSED1         0x0800    /*  */
  56.  
  57. #define ACC_WRITTEN_FLAGS     0x0FFF    /* flags actually put in .class file */
  58.  
  59. /* Other attributes */
  60. #define ACC_VALKNOWN          0x1000    /* constant with known value */
  61. #define ACC_DOCED             0x2000    /* documentation generated */
  62. #define ACC_MACHINE_COMPILED  0x4000    /* compiled to machine code */
  63. #define ACC_XXUNUSED3         0x8000    /*  */
  64.  
  65. #define IsPrivate(access) (((access) & ACC_PRIVATE) != 0)
  66. #define IsPublic(access)  (((access) & ACC_PUBLIC) != 0)
  67. #define IsProtected(access)  (((access) & ACC_PROTECTED) != 0)
  68.  
  69. char *addstr(char *s, char *buf, char *limit, char term);
  70. char *addhex(long n, char *buf, char *limit);
  71. char *adddec(long n, char *buf, char *limit);
  72.  
  73. #ifdef TRIMMED
  74. # undef DEBUG
  75. # undef STATS
  76. # define NOLOG
  77. #endif
  78.  
  79.  
  80. #endif /* !_TREE_H_ */
  81.