莫枢的JVM分享笔记

前言

这篇文章是2010年R大做的一次jvm分享

语言处理器的基本结构

语言处理器的种类

编译器

graph LR
    source[源代码] --> lexicalAnalyzer[词法分析器]
    lexicalAnalyzer --> tokens[TOKEN流]
    tokens1[TOKEN流] --> parser[语法分析器]
    parser --> ast[语法树/抽象语法树]
    ast1[语法树/抽象语法树] --> semanticAnalyzer[语义分析器]
    semanticAnalyzer --> annotationAst[注解抽象语法树]
    annotationAst1[注解抽象语法树] --> intermediateCodeGen[中间代码生成器]
    intermediateCodeGen --> intermediateCode[中间代码]
    intermediateCode1[中间代码] --> independentOptimizingMachines[机器无关优化]
    independentOptimizingMachines --> intermediateCode2[中间代码]
    intermediateCode3[中间代码] --> machineRelatedOptimization[机器相关优化]
    machineRelatedOptimization --> intermediateCode4[中间代码]
    intermediateCode5[中间代码] --> registerAllocator[寄存器分配器]
    registerAllocator --> intermediateCode6[中间代码]
    intermediateCode7[中间代码] --> targetCodeGen[目标代码生成器]
    targetCodeGen --> target[目标代码]

style source fill:#EDB784
style tokens fill:#EDB784
style tokens1 fill:#EDB784
style ast fill:#EDB784
style ast1 fill:#EDB784
style annotationAst fill:#EDB784
style annotationAst1 fill:#EDB784
style intermediateCode fill:#EDB784
style intermediateCode1 fill:#EDB784
style intermediateCode2 fill:#EDB784
style intermediateCode2 fill:#EDB784
style intermediateCode3 fill:#EDB784
style intermediateCode4 fill:#EDB784
style intermediateCode5 fill:#EDB784
style intermediateCode6 fill:#EDB784
style intermediateCode7 fill:#EDB784
style target fill:#EDB784

style lexicalAnalyzer fill:#DAF7A6
style parser fill:#DAF7A6
style semanticAnalyzer fill:#DAF7A6
style intermediateCodeGen fill:#DAF7A6
style independentOptimizingMachines fill:#DAF7A6
style machineRelatedOptimization fill:#DAF7A6
style registerAllocator fill:#DAF7A6
style targetCodeGen fill:#DAF7A6

Java语言与平台

Java Conceptual Diagram
























































JDK JavaLanguage




JavaLanguage

  
Tools &
Tool APIs
































javajavacjavadocjarjavapjdepsScripting
SecurityMonitoringJConsoleVisualVMJMCJFR
JPDAJVM TIIDLRMIJavaDBDeployment
InternationalizationWebServicesTroubleshooting

JREDeployment





Java WebStartApplet / Java Plug-in

User Interface
Toolkits





JavaFX
















SwingJava 2DAWTAccessibility
Drag andDropInput MethodsImageI/OPrintServiceSound

Java SE
API
Integration
Libraries










IDLJDBCJNDIRMIRMI-IIOPScripting

Compact
Profiles
OtherBase
Libraries




















BeansSecuritySerializationExtension Mechanism
JMXXML JAXPNetworkingOverride Mechanism
JNIDate and TimeInput/OutputInternationalization

lang and util
Base Libraries

























lang and util
MathCollectionsRefObjectsRegular Expressions
LoggingManagementInstrumentationConcurrency Utilities
ReflectionVersioningPreferences APIJARZip

Java VirtualMachine




Java HotSpot Clientand Server VM

  

Java源码级编译器(javac)

Class文件

虚拟机与JVM

HotSpot VM

HotSpot VM的运行时支持

HotSpot与解释器

HotSpot与JIT编译器

HotSpot VM与JSR 292