home *** CD-ROM | disk | FTP | other *** search
/ Java Programmer's Toolkit / Java Programmer's Toolkit.iso / solaris2 / jdk / include / code.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-10-30  |  1.6 KB  |  57 lines

  1. /*
  2.  * @(#)code.h    1.6 95/01/31  
  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 code generation
  22.  */
  23.  
  24. #ifndef _CODE_H_
  25. #define _CODE_H_
  26.  
  27. #include <oobj.h>
  28.  
  29. extern unsigned char *codebuf;
  30. extern int         pc;
  31. extern char       *binfilename;
  32. extern int         reachable;
  33. extern char        MustBranch[256];
  34. struct typeinfo;
  35. char       *MakeSignature(struct typeinfo *, char *);
  36. void DecodeFile(char *);
  37. void PrintCodeSequence(struct methodblock *mb);
  38. void PrintClassSequence(ClassClass *);
  39.  
  40. extern struct methodblock **procblocks;
  41.  
  42. #define label() pc
  43. #define ComesHere(fixup) GoesThere(fixup, pc)
  44.  
  45. /* field flags which share the type code byte in field bytecodes */
  46. #include <typecodes.h>
  47.  
  48. #define    FIELD_STATIC    0x40
  49. #define    FIELD_GET    0x00
  50. #define    FIELD_PUT    0x80
  51.  
  52. #if N_TYPEMASK & (FIELD_STATIC | FIELD_PUT)
  53. #error "field flags and type codes overlap"
  54. #endif
  55.  
  56. #endif    /* !_CODE_H_ */
  57.