Next
The Java(tm) Virtual Machine Specification
Table of Contents
Copyright Information
Preface
1 - Java Virtual Machine Architecture
1.1 - Supported Data Types
1.2 - Registers
1.3 - Local Variables
1.4 - The Operand Stack
1.5 - Execution Environment
1.6 - Garbage Collected Heap
1.7 - Method Area
计算机专业java1.8 - The Java Instruction Set
1.9 - Limitations
2 - Class File Format
2.1 - Format
2.2 - Signatures
2.3 - Constant Pool
2.4 - Fields
2.5 - Methods
2.6 - Attributes
3 - The Virtual Machine Instruction Set
3.1 - Format for the Instructions
3.2 - Pushing Constants onto the Stack
3.3 - Loading Local Variables Onto the Stack
3.4 - Storing Stack Values into Local Variables
3.5 - Wider index for Loading, Storing and Incrementing
3.6 - Managing Arrays
3.7 - Stack Instructions
3.8 - Arithmetic Instructions
3.9 - Logical Instructions
3.10 - Conversion Operations
3.11 - Control Transfer Instructions
3.12 - Function Return
3.13 - Table Jumping
3.14 - Manipulating Object Fields
3.15 - Method Invocation
3.16 - Exception Handling
3.17 - Miscellaneous Object Operations
3.18 - Monitors
Appendix A: - An Optimization
A.1 - Constant Pool Resolution
A.2 - Pushing Constants onto the Stack (_quick variants)
A.3 - Managing Arrays (_quick variants)
A.4 - Manipulating Object Fields (_quick variants)
A.5 - Method Invocation (_quick variants)
A.6 - Miscellaneous Object Operations (_quick variants) Next
Next Prev Contents
Copyright Information
© 1993, 1994, 1995 Sun Microsystems, Inc.
2550 Garcia Avenue, Mountain View, California 94043-1100 U.S.A.
All rights reserved. This BETA quality release and related documentation are protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this release or related documentation may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any.
Portions of this product may be derived from the UNIX® and Berkeley 4.3 BSD systems, licensed from UNIX System Laboratories, Inc. and the University of California, respectively. Third-party font software in this release is protected by copyright and licensed from Sun's Font Suppliers.
RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the United States Government is subject to the restrictions set forth in DFARS 252.227-7013 (c)(1)(ii) and FAR 52.227-19.
The release described in this manual may be protected by one or more U.S. patents, foreign patents, or pending applications.
TRADEMARKS
Sun, Sun Microsystems, Sun Microsystems Computer Corporation, the Sun logo, the Sun Microsystems Computer Corporation logo, WebRunner, Java, FirstPerson and the FirstPerson logo and agent are trademarks or registered trademarks of Sun Microsystems, Inc. The "Duke" character is a trademark of Sun Microsystems, Inc. and Copyright (c) 1992-1995 Sun Microsystems, Inc. All Rights Reserved. UNIX® is a registered trademark in the United States and other countries, exclusively licensed through X/Open Comapny, Ltd. OPEN LOOK is a registered trademark of Novell, Inc. All other product names mentioned herein are the trademarks of their respective owners.
All SPARC trademarks, including the SCD Compliant Logo, are trademarks or registered trademarks of SPARC International, Inc. SPARCstation, SPARCserver, SPARCengine, SPARCworks, and SPARCompiler are licensed exclusively to Sun Microsystems, Inc. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc.
The OPEN LOOK® and Sun€ Graphical User Interfaces were developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing
the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun's licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's written license agreements.
X Window System is a trademark and product of the Massachusetts Institute of Technology.
THIS PUBLICATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. THIS
PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME.
Next Prev Contents
The Java(tm) Virtual Machine Specification
Contents Prev Next
Preface
This document describes version 1.0 of the Java Virtual Machine and its instruction set. We have written this document to act as a specification for both compiler writers, who wish to target the machine, and as a specification for others who may wish to implement a compliant Java Virtual Machine.
The Java Virtual Machine is an imaginary machine that is implemented by emulating it in software on
a real machine. Code for the Java Virtual Machine is stored in .class files, each of which contains the code for at most one public class.
Simple and efficient emulations of the Java Virtual Machine are possible because the machine's format is compact and efficient bytecodes. Implementations whose native code speed approximates that of compiled C are also possible, by translating the bytecodes to machine code, although Sun has not released such implementations at this time.
The rest of this document is structured as follows:
q Chapter 1 describes the architecture of the Java Virtual Machine.
q Chapter 2 describes the .class file format.
q Chapter 3 describes the bytecodes.
q Appendix A contains some instructions generated internally by Sun's implementation of the Java Virtual Machine. While not strictly part of the specification we describe these here so that this
specification can serve as a reference for our implementation. As more implementations of the
Java Virtual Machine become available, we may remove Appendix A from future releases.
Sun will license the Java Virtual Machine trademark and logo for use with compliant implementations of this specification. If you are considering constructing your own implementation of the Java Virtual Machine please contact us, at the email address below, so that we can work together to insure 100% compatiblity of your implementation.
Send comments on this specification or questions about implementing the Java Virtual Machine to our electronic mail address: java@java.sun.
Contents Prev Next
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论