Java虚拟机规范(Java SE 8版)英文版
  • 推荐0
  • 收藏0
  • 浏览524

Java虚拟机规范(Java SE 8版)英文版

(美)Tim Lindholm(蒂姆·林霍尔姆,(美)Frank Yellin(费兰克·耶林),(美)Gilad Bracha(吉拉德·布拉查),(美)Alex Buckley(亚力克斯·巴克利) (作者)  无 (译者) 刘芸 (责任编辑)

  • 丛  书:原味精品书系
  • 书  号:978-7-121-27305-6
  • 出版日期:2016-04-05
  • 页  数:600
  • 开  本:16(185*235)
  • 出版状态:上市销售
  • 原书名: The Java Virtual Machine Specification,Java SE 8 Edition
  • 原书号:013390590X
  • 维护人:刘佳禾
本书由Java虚拟机技术创建人撰写,全面而准确地阐释了Java虚拟机各方面的细节,围绕Java虚拟机整体架构、编译器、class文件格式、加载、链接与初始化、指令集等核心主题对Java虚拟机进行全面而深入的分析,深刻揭示Java虚拟机的工作原理。书中完整地讲述了由JavaSE8所引入的新特性,例如对包含默认实现代码的接口方法所做的调用,以及为支持类型注解及方法参数注解而对class文件格式所做的扩展等,还阐明了class文件中各属性的含义及字节码验证的规则。本书基于JavaSE8,是深度了解Java虚拟机和Java语言实现细节的极佳选择。
Java虚拟机技术创建人撰写,全解Java SE 8引入的新特性,深度了解Java虚拟机和Java语言实现细节之可选佳作
前言
本书涵盖了自2011年发布Java SE 7版之后所发生的所有变化。此外,为了与常见的Java虚拟机实现相匹配,本书还添加了大量修订及说明。
本版与前面各版一样,仅仅描述了抽象的Java虚拟机,而在实现具体的Java虚拟机时,本书仅指出了设计规划。Java虚拟机的实现必须体现出本书所列规范,但仅在确有必要时才受限。
对Java SE 8而言,Java编程语言里的一些重要变化在Java虚拟机中都有相应的体现。为了尽量保持二进制兼容性,我们应该直接在Java虚拟机里指定令人满意的默认方法,而不应该依赖于编译器,因为那样做将无法在不同厂商、版本的产品之间移植。此外,那种做法也不可能适用于已有的class文件。在设计JSR 335——Lambda Expressions for the Java Programming Language(《Java编程语言的lambda表达式》)时,Oracle公司的Dan Smith向虚拟机实现者咨询了将默认方法集成到常量池和方法结构、方法与接口方法解析算法,以及字节码指令集中的上佳方式。JSR 335也允许在class文件级别的接口里出现private方法与static方法,而这些方法也同接口方法解析算法紧密地结合起来了。
Java SE 8的特点之一是:Java SE平台的程序库也伴随着Java虚拟机一起进化。有个小例子可以很好地说明这一特点:在运行程序的时候,Java SE 8可以获取方法的参数名,虚拟机会把这些名字存放在class文件结构中,而与此同时,java.lang.reflect.Parameter里也有个标准的API能够查询这些名字。另外,我们也可以通过class文件结构中一项有趣的统计数据来说明这个特点:本规范的第1版中定义了6个属性,其中有3个属性对Java虚拟机至关重要,而Java SE 8版的规范则定义了23个属性,其中只有5个属性对Java虚拟机很重要。换句话说,在新版规范中,属性主要是为了支持程序库而设计的,其次才是为了支持Java虚拟机本身。为了帮助读者理解class文件结构,本规范会更为清晰地描述出每项属性的角色及使用限制。
在Oracle公司的Java Platform团队里,有多位同事都对这份规范提供了很大的支持,他们包括:Mandy Chung、Joe Darcy、Joel Franck、Staffan Friberg、Yuri Gaevsky、Jon Gibbons、Jeannette Hung、Eric McCorkle、Matherey Nunez、Mark Reinhold、John Rose、Georges Saab、Steve Sides、Bernard Traversat、Michel Trudeau和Mikael Vidstedt。特别感谢Dan Heidinga(IBM)、Karen Kinnear、Keith McGuigan及Harold Seigel对常见的Java虚拟机实现中的兼容性及安全性问题做出的贡献。
Alex Buckley
于加利福尼亚州圣克拉拉
2014年3月

目录

目录
前言
1 Introduction
1.1 A Bit of History
1.2 The Java Virtual Machine
1.3 Organization of the Specification
1.4 Notation
1.5 Feedback
2 The Structure of the Java Virtual Machine
2.1 The class File Format
2.2 Data Types
2.3 Primitive Types and Values
2.3.1 Integral Types and Values
2.3.2 Floating-Point Types, Value Sets, and Values
2.3.3 The returnAddress Type and Values
2.3.4 The boolean Type
2.4 Reference Types and Values
2.5 Run-Time Data Areas
2.5.1 The pc Register
2.5.2 Java Virtual Machine Stacks
2.5.3 Heap
2.5.4 Method Area
2.5.5 Run-Time Constant Pool
2.5.6 Native Method Stacks
2.6 Frames
2.6.1 Local Variables
2.6.2 Operand Stacks
2.6.3 Dynamic Linking
2.6.4 Normal Method Invocation Completion
2.6.5 Abrupt Method Invocation Completion
2.7 Representation of Objects
2.8 Floating-Point Arithmetic
2.8.1 Java Virtual Machine Floating-Point Arithmetic and IEEE 754
2.8.2 Floating-Point Modes
2.8.3 Value Set Conversion
2.9 Special Methods
2.10 Exceptions
2.11 Instruction Set Summary
2.11.1 Types and the Java Virtual Machine
2.11.2 Load and Store Instructions
2.11.3 Arithmetic Instructions
2.11.4 Type Conversion Instructions
2.11.5 Object Creation and Manipulation
2.11.6 Operand Stack Management Instructions
2.11.7 Control Transfer Instructions
2.11.8 Method Invocation and Return Instructions
2.11.9 Throwing Exceptions
2.11.10 Synchronization
2.12 Class Libraries
2.13 Public Design, Private Implementation
3 Compiling for the Java Virtual Machine
3.1 Format of Examples
3.2 Use of Constants, Local Variables, and Control Constructs
3.3 Arithmetic
3.4 Accessing the Run-Time Constant Pool
3.5 More Control Examples
3.6 Receiving Arguments
3.7 Invoking Methods
3.8 Working with Class Instances
3.9 Arrays
3.10 Compiling Switches
3.11 Operations on the Operand Stack
3.12 Throwing and Handling Exceptions
3.13 Compiling finally
3.14 Synchronization
3.15 Annotations
4 The class File Format
4.1 The ClassFile Structure
4.2 The Internal Form of Names
4.2.1 Binary Class and Interface Names
4.2.2 Unqualified Names
4.3 Descriptors
4.3.1 Grammar Notation
4.3.2 Field Descriptors
4.3.3 Method Descriptors
4.4 The Constant Pool
4.4.1 The CONSTANT_Class_info Structure
4.4.2 The CONSTANT_Fieldref_info, CONSTANT_Methodref_info, and CONSTANT_InterfaceMethodref_info Structures
4.4.3 The CONSTANT_String_info Structure
4.4.4 The CONSTANT_Integer_info and CONSTANT_Float_info Structures
4.4.5 The CONSTANT_Long_info and CONSTANT_Double_info Structures
4.4.6 The CONSTANT_NameAndType_info Structure
4.4.7 The CONSTANT_Utf8_info Structure
4.4.8 The CONSTANT_MethodHandle_info Structure
4.4.9 The CONSTANT_MethodType_info Structure
4.4.10 The CONSTANT_InvokeDynamic_info Structure
4.5 Fields
4.6 Methods
4.7 Attributes
4.7.1 Defining and Naming New Attributes
4.7.2 The ConstantValue Attribute
4.7.3 The Code Attribute
4.7.4 The StackMapTable Attribute
4.7.5 The Exceptions Attribute
4.7.6 The InnerClasses Attribute
4.7.7 The EnclosingMethod Attribute
4.7.8 The Synthetic Attribute
4.7.9 The Signature Attribute
4.7.9.1 Signatures
4.7.10 The SourceFile Attribute
4.7.11 The SourceDebugExtension Attribute
4.7.12 The LineNumberTable Attribute
4.7.13 The LocalVariableTable Attribute
4.7.14 The LocalVariableTypeTable Attribute
4.7.15 The Deprecated Attribute
4.7.16 The RuntimeVisibleAnnotations Attribute
4.7.16.1 The element_value structure
4.7.17 The RuntimeInvisibleAnnotations Attribute
4.7.18 The RuntimeVisibleParameterAnnotations Attribute
4.7.19 The RuntimeInvisibleParameterAnnotations Attribute
4.7.20 The RuntimeVisibleTypeAnnotations Attribute
4.7.20.1 The target_info union
4.7.20.2 The type_path structure
4.7.21 The RuntimeInvisibleTypeAnnotations Attribute
4.7.22 The AnnotationDefault Attribute
4.7.23 The BootstrapMethods Attribute
4.7.24 The MethodParameters Attribute
4.8 Format Checking
4.9 Constraints on Java Virtual Machine Code
4.9.1 Static Constraints
4.9.2 Structural Constraints
4.10 Verification of class Files
4.10.1 Verification by Type Checking
4.10.1.1 Accessors for Java Virtual Machine Artifacts
4.10.1.2 Verification Type System
4.10.1.3 Instruction Representation
4.10.1.4 Stack Map Frame Representation
4.10.1.5 Type Checking Abstract and Native Methods
4.10.1.6 Type Checking Methods with Code
4.10.1.7 Type Checking Load and Store Instructions
4.10.1.8 Type Checking for protected Members
4.10.1.9 Type Checking Instructions
4.10.2 Verification by Type Inference
4.10.2.1 The Process of Verification by Type Inference
4.10.2.2 The Bytecode Verifier
4.10.2.3 Values of Types long and double
4.10.2.4 Instance Initialization Methods and Newly Created Objects
4.10.2.5 Exceptions and finally
4.11 Limitations of the Java Virtual Machine
5 Loading, Linking, and Initializing
5.1 The Run-Time Constant Pool
5.2 Java Virtual Machine Startup
5.3 Creation and Loading
5.3.1 Loading Using the Bootstrap Class Loader
5.3.2 Loading Using a User-defined Class Loader
5.3.3 Creating Array Classes
5.3.4 Loading Constraints
5.3.5 Deriving a Class from a class File Representation
5.4 Linking
5.4.1 Verification
5.4.2 Preparation
5.4.3 Resolution
5.4.3.1 Class and Interface Resolution
5.4.3.2 Field Resolution
5.4.3.3 Method Resolution
5.4.3.4 Interface Method Resolution
5.4.3.5 Method Type and Method Handle Resolution
5.4.3.6 Call Site Specifier Resolution
5.4.4 Access Control
5.4.5 Overriding
5.5 Initialization
5.6 Binding Native Method Implementations
5.7 Java Virtual Machine Exit
6 The Java Virtual Machine Instruction Set
6.1 Assumptions: The Meaning of "Must"
6.2 Reserved Opcodes
6.3 Virtual Machine Errors
6.4 Format of Instruction Descriptions
mnemonic
6.5 Instructions
aaload
aastore
aconst_null
aload
aload_
anewarray
areturn
arraylength
astore
astore_
athrow
baload
bastore
bipush
caload
castore
checkcast
d2f
d2i
d2l
dadd
daload
dastore
dcmp
dconst_
ddiv
dload
dload_
dmul
dneg
drem
dreturn
dstore
dstore_
dsub
dup
dup_x1
dup_x2
dup2
dup2_x1
dup2_x2
f2d
f2i
f2l
fadd
faload
fastore
fcmp
fconst_
fdiv
fload
fload_
fmul
fneg
frem
freturn
fstore
fstore_
fsub
getfield
getstatic
goto
goto_w
i2b
i2c
i2d
i2f
i2l
i2s
iadd
iaload
iand
iastore
iconst_
idiv
if_acmp
if_icmp
if
ifnonnull
ifnull
iinc
iload
iload_
imul
ineg
instanceof
invokedynamic
invokeinterface
invokespecial
invokestatic
invokevirtual
ior
irem
ireturn
ishl
ishr
istore
istore_
isub
iushr
ixor
jsr
jsr_w
l2d
l2f
l2i
ladd
laload
land
lastore
lcmp
lconst_
ldc
ldc_w
ldc2_w
ldiv
lload
lload_
lmul
lneg
lookupswitch
lor
lrem
lreturn
lshl
lshr
lstore
lstore_
lsub
lushr
lxor
monitorenter
monitorexit
multianewarray
new
newarray
nop
pop
pop2
putfield
putstatic
ret
return
saload
sastore
sipush
swap
tableswitch
wide
7 Opcode Mnemonics by Opcode
Index
A Limited License Grant

读者评论

同系列书

  • Clean Architecture:软件架构与设计匠艺(英文版)

    Robert C. Martin (作者) Robert C. Martin(罗伯特·C·马丁) (译者)

    马丁的简介代码不仅仅是提供选项。在半个世纪的软件环境中,每一种可以想象的类型,马丁告诉你做出什么选择,以及为什么它们对你的成功至关重要。正如你所渴望的,这本书中...

     
  • Effective Java(第2版)英文版

    (美)Joshua Bloch(约书亚·布洛赫) (作者) 无 (译者)

    本书通过78个有效案例,旨在帮助读者深入理解Java,以写出更加清楚、健壮、可重复使用的代码。书中每个章节均包含小论文,针对Java平台和杰出的代码样例,提供了...

    ¥65.00
  • C11编程导论英文版

    (美)Paul Deitel(保罗·戴特尔),(美) Harvey Deitel(哈维·戴特尔) (作者) (译者)

    本书沿用了Deitel特色的“程序实况解说”,深入探讨了C语言和C标准库。通过完整的语法着色、代码高亮、代码演练和程序输出,全面地介绍了测试程序的概念。本书汇集...

    ¥89.00
  • Effective Javascript:编写高质量JavaScript代码的68个有效方法 英文版

    (美)David Herman(大卫·赫尔曼) (作者) 无 (译者)

    本书由资深 JavaScript 技术专家 David Herman 所著。书中基于 JavaScript 标准的新版本前所未有地阐明了 JavaScript ...

    ¥65.00
  • Effective Python:编写高质量Python代码的59个有效方法 英文版

    (美)Brett Slatkin(布雷特·斯拉特金) (作者) 无 (译者)

    本书不是要讲述 Python 的基础编程,而是要帮你掌握 Python 独特的优势和魅力。书中总结了 59个 Python 编程的优秀实践、贴士和捷径,并用真实...

    ¥65.00

相关图书

Python一行流:像专家一样写代码

Christian Mayer (作者) 苏丹 (译者)

本书专注于从初学迈向进阶的Python编码技术:如何像专家一样写出优雅、准确、简洁高效的Python 单行代码;阅读任意一行Python 代码时,如何系统性地对...

¥89.00

剑指Offer(专项强化版):数据结构与算法名企面试题精讲

何海涛 (作者)

本书全面、系统地总结了在准备程序员面试过程中必备的数据结构与算法。本书首先详细讨论整数、数组、链表、字符串、哈希表、栈、队列、二叉树、堆和前缀树等常用的数据结构...

¥89.00

C++服务器开发精髓

张远龙 (作者)

本书从操作系统原理角度讲解进行C++服务器开发所需掌握的技术栈。全书总计9章,第1~2章讲解C++ 11/14/17新标准中的常用特性、新增类库,以及C++开发...

 

PHP编程(第4版)

Rasmus Lerdorf(拉斯马斯·勒多夫), Kevin Tatroe(凯文·塔特罗), Peter MacIntyre(彼得·麦金太尔) (作者) 卢涛 (译者)

PHP是一种被广泛使用的Web编程语言,它简单易用,而且与时俱进,不断进化,提升性能。本书基于PHP 7.4,深入介绍 PHP编程技术,涵盖了 PHP 所有基本...

¥109.00

深入理解Spring Cloud与实战

方剑 (作者)

本书共分10章,主要介绍Spring Cloud各个核心组件的设计原理,以及目前流行的Spring Cloud Alibaba和 Netflix组件,并且剖析S...

¥106.00

基于Kotlin的Spring Boot微服务实战

袁康 (作者)

本书介绍了Kotlin在Spring Boot微服务开发中的实践,并使用Kotlin作为开发语言,介绍了函数式编程思想、Kotlin的语法、Kotlin在常用中...

¥69.30