?? index.html
字號:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN"><!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds --><!-- @(#)index.html 1.4 03/01/23 Copyright 2003 by Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All rights reserved. This software is the confidential and proprietary information of Sun Microsystems, Inc. ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the license agreement you entered into with Sun.--><HTML><HEAD><TITLE>The Generic Java Compiler</TITLE><META NAME="description" CONTENT="The Generic Java Compiler"><META NAME="keywords" CONTENT="index"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><LINK REL=STYLESHEET HREF="index.css"></HEAD><BODY LANG="EN" > <H1><A NAME="SECTION00010000000000000000">The Generic Java Compiler</A></H1><P>Martin Odersky<P><B>Purpose</B><P>The Generic Java Compiler GJC translates Generic Java Programs intoJava bytecodes. It is meant to be a drop-in replacement for<code>javac</code>, with exactly the same functionality.<P>GJC is written in Generic Java. It compiles either conventional orgeneric Java Programs. The Generic Java extensions are enabledby setting a command line option ( <code>-gj</code> ).<P>GJC translates by default into Java bytecodes. There is a commandline option (<code>-s</code>) which makes GJC emit conventional Java sourcecode instead. Generally, the generated code corresponds to what ahuman programmer would have done to emulate the extensions of GenericJava. Therefore, the source output option of Generic Java is aconvienient way to convert the compiler itself into a standard Javaformat.<P>GJC has been written from scratch, with the experience gained from theEspressoGrinder and Pizza compilers. Great emphasis was put on asimple and clear design and a concise implementation which faithfullyfollows the Java spec.<P>GJC has been designed to be highly flexible and modular, so that thecompiler itself, or some of its components, can be used in a varietyof settings. This is reflected in a layered package structure whichallows lower-level packages to be used without cooperation ofhigher-level packages.<P>GJC is completely functorized, without any global static datastructures at all. This makes it easy to embed GJC in large softwaredevelopment environments where several projects can be runconcurrently.<P><B>Package Structure</B><P>GJC package names have the structure <code>gjc.v</code><I>X</I><code>.</code><I>P</I> where<code>gjc</code> is the common prefix, the <I>X</I> stands forthe current version number (currently, <I>X</I> = 3), and<I>P</I> stands for the package's name. For simplicity, we willomit the version part of package names in the rest of thisdescription.<P>The packages of GJC form a layered structure, with classes in higherlevel layers only needing the services of classes of the same or lowerlayers. Progressing from bottom to top, the layers are:<P><UL><LI> Package <A NAME="tex2html1" HREF="v8/util/index.html"><code>gjc.v8.util</code></A> provides utility classes of generalusefulness.<LI> Package <A NAME="tex2html2" HREF="v8/code/index.html"><code>gjc.v8.code</code></A> provides all classes needed to map betweenJava classfiles and theri internal interpretation in terms of symboltables, code buffers and constant pools. The package is useful on itsown for tools that read, interprete and write classfiles.<LI>Package <A NAME="tex2html3" HREF="v8/tree/index.html"><code>gjc.v8.tree</code></A> provides classes that define abstract GenericJava syntax trees, as well as generic factory and visitor classes forsuch trees. The package does not contain any classes or methods forthe semantic processing of such trees.<LI>Package <A NAME="tex2html4" HREF="v8/parser/index.html"><code>gjc.v8.parser</code></A> provides classes to convert a source file toan abstract syntax tree. Combined with <code>gjc.tree</code>, this packageis useful for tools that manipulate Java programs at an abstractsyntax tree level.<LI>Package <A NAME="tex2html5" HREF="v8/comp/index.html"><code>gjc.v8.comp</code></A> provides classes that implement all phases ofcompilation after parsing.<LI>Package <A NAME="tex2html6" HREF="v8/index.html"><code>gjc.v8</code></A> provides the two main interfaces to the compiler,one as an internal component of a larger system, the other as acommand line interpreter.</UL><BR> <HR><P><ADDRESS><I>Martin Odersky <BR>Mon Nov 2 16:51:36 CST 1998</I></ADDRESS></BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -