没有合适的资源?快使用搜索试试~ 我知道了~
flash虚拟机概述
![star](https://csdnimg.cn/release/downloadcmsfe/public/img/star.98a08eaa.png)
温馨提示
![preview](https://dl-preview.csdnimg.cn/4766902/0001-f4063d1f7e92bca3c6136b3bf75f344c_thumbnail.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
108页
flash虚拟机概述
资源推荐
资源详情
资源评论
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![hmi](https://img-home.csdnimg.cn/images/20210720083646.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/release/download_crawler_static/4766902/bg1.jpg)
Adobe
®
ActionScript Virtual Machine 2 (AVM2) Overview
May 2007
![](https://csdnimg.cn/release/download_crawler_static/4766902/bg2.jpg)
Adobe ActionScript Virtual Machine 2 (AVM2) Overview 2
Copyright © 2006–2007 Adobe Systems Incorporated. All rights reserved.
NOTICE: All information contained herein is the property of Adobe Systems Incorporated. No part of this publication (whether in hardcopy or electronic
form) may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written consent of Adobe Systems Incorporated.
Adobe, the Adobe Logo, and ActionScript, are trademarks or registered trademarks of Adobe Systems Incorporated in the United States and/or other
countries. All other trademarks are the property of their respective owners.
This publication and the information herein is furnished AS IS, is subject to change without notice, and should not be construed as a commitment by
Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies, makes no warranty of any
kind (express, implied, or statutory) with respect to this publication, and expressly disclaims any and all warranties of merchantability, fitness for particular
purposes, and noninfringement of third party rights.
Adobe Systems Incorporated
345 Park Avenue
San Jose, CA 95110
(408) 536-6000
![](https://csdnimg.cn/release/download_crawler_static/4766902/bg3.jpg)
Adobe ActionScript Virtual Machine 2 (AVM2) Overview 3
Contents
1 Introduction............................................................................................................................ 5
1.1 Concepts................................................................................................................................................5
2 The structure of the ActionScript Virtual Machine .............................................................. 7
2.1 Constant values..................................................................................................................................... 7
2.2 Virtual machine overview..................................................................................................................... 7
2.3 Names ....................................................................................................................................................8
2.3.1 QName (Qualified Name)......................................................................................................8
2.3.2 RTQName (Runtime Qualified Name) ................................................................................8
2.3.3 RTQNameL (Runtime Qualified Name Late).....................................................................9
2.3.4 Multiname (Multiple Namespace Name) ............................................................................9
2.3.5 MultinameL (Multiple Namespace Name Late)................................................................. 9
2.3.6 Resolving multinames ......................................................................................................... 10
2.4 Method invocation notes ................................................................................................................... 10
2.5 Instruction set summary.......................................................................................................................11
2.5.1 Load and store instructions ..................................................................................................11
2.5.2 Arithmetic instructions...........................................................................................................11
2.5.3 Bit manipulation instructions ................................................................................................11
2.5.4 Type conversion instructions................................................................................................11
2.5.5 Object creation and manipulation instructions ................................................................ 12
2.5.6 Stack management instructions ........................................................................................ 12
2.5.7 Control transfer instructions ............................................................................................... 12
2.5.8 Function invocation and return instructions..................................................................... 12
2.5.9 Exception instructions......................................................................................................... 12
2.5.10 Debugging instructions ....................................................................................................... 13
3 Loading, linking, verification, and execution.......................................................................14
3.1 Overview .............................................................................................................................................. 14
3.2 Loading and linking ............................................................................................................................ 14
3.3 Execution ............................................................................................................................................. 15
3.3.1 Program invocation and exit............................................................................................... 15
3.3.2 Class initialization................................................................................................................. 15
3.3.3 Method entry......................................................................................................................... 15
3.3.4 Execution mechanics .......................................................................................................... 16
3.3.5 Calling and returning............................................................................................................ 16
3.3.6 Exception handling .............................................................................................................. 16
3.4 Verification........................................................................................................................................... 16
4 The ActionScript Byte Code (abc) format...........................................................................18
4.1 Primitive data types .............................................................................................................................18
4.2 abcFile.................................................................................................................................................. 19
4.3 Constant pool ..................................................................................................................................... 20
4.4 String .................................................................................................................................................... 21
4.4.1 Namespace.......................................................................................................................... 22
4.4.2 Namespace set.................................................................................................................... 22
4.4.3 Multiname............................................................................................................................. 23
4.5 Method signature............................................................................................................................... 24
4.5.1 Optional parameters ........................................................................................................... 25
4.5.2 Parameter names.................................................................................................................27
4.6 metadata_info......................................................................................................................................27
4.7 Instance............................................................................................................................................... 28
4.8 Trait...................................................................................................................................................... 29
4.8.1 Summary of trait types ....................................................................................................... 29
4.8.2 Slot and const traits ............................................................................................................ 30
4.8.3 Class traits............................................................................................................................ 30
4.8.4 Function traits....................................................................................................................... 31
![](https://csdnimg.cn/release/download_crawler_static/4766902/bg4.jpg)
Adobe ActionScript Virtual Machine 2 (AVM2) Overview 4
4.8.5 Method, getter, and setter traits......................................................................................... 31
4.8.6 Trait attributes....................................................................................................................... 31
4.9 Class ..................................................................................................................................................... 31
4.10 Script ................................................................................................................................................... 32
4.11 Method body ...................................................................................................................................... 32
4.12 Exception ............................................................................................................................................ 34
5 AVM2 instructions ...............................................................................................................35
6 Hints for compiler writers .................................................................................................. 107
6.1 Reestablishing the scope stack following an exception ............................................................. 107
6.2 In-line subroutines for handling “finally”........................................................................................ 107
6.3 Creating an environment for nested functions .............................................................................108
6.4 Optimizing method dispatch ...........................................................................................................108
![](https://csdnimg.cn/release/download_crawler_static/4766902/bg5.jpg)
Adobe ActionScript Virtual Machine 2 (AVM2) Overview 5
1 Introduction
The Adobe® ActionScript™ Virtual Machine 2, or AVM2 for short, was designed to execute programs written in
the ActionScript 3.0 language. ActionScript 3.0 is based on ECMAScript, the international standardized
programming language for scripting. ActionScript 3.0 is compliant with the ECMAScript Language
Specification, Third Edition (ECMA-262
). It also contains functionality based on ongoing work on
ECMAScript Edition 4, occurring within the Ecma International standards body.
This document describes the operation of the AVM2 and defines the file formats, data structures, and
instruction formats used by the AVM2.
1.1 Concepts
The AVM2 was designed to support the ActionScript (AS) 3.0 language, and for the remaining chapters it is
assumed that the reader is aware of the terminology and concepts of the language.
The following vocabulary and associated definitions are taken from the ActionScript 3.0 Language Specification
and are presented only as a review of the material. For full details, refer to the language specification.
Virtual Machine—A virtual machine is a mechanism that takes as its input the description of a
computation and that performs that computation. For the AVM2, the input is in the form of an ABC file,
which contains compiled programs; these comprise constant data, instructions from the AVM2 instruction
set, and various kinds of metadata.
Script—A script set of traits and an initializer method; a script populates a top-level environment with
definitions and data.
Bytecode, code—Bytecode or code is a specification of computation in the form of a sequence of simple
actions on the virtual machine state.
Scope—Scope is a mapping from names to locations, where no two names are the same. Scopes can nest,
and nested scopes can contain bindings (associations between names and locations) that shadow the
bindings of the nesting scope.
Object—An object is an unordered collection of named properties, which are containers that hold values.
A value in ActionScript 3.0 is either an Object reference or one of the special values
null or undefined.
Namespace—Namespaces are used to control the visibility of a set of properties independent of the major
structure of the program.
Class—A class is a named description of a group of objects. Objects are created from classes by
instantiation.
Inheritance—New classes can be derived from older classes by the mechanism known as inheritance or
subclassing. The new class is called the derived class or subclass of the old class, and the old class is called the
base class or superclass.
Trait—A trait is a fixed-name property shared by all objects that are instances of the same class; a set of
traits expresses the type of an object.
Method—The word method is used with two separate meanings. One meaning is a method body, which is
an object that contains code as well as data that belong to that code or that describe the code. The other
meaning is a method closure, which is a method body together with a reference to the environment in which
the closure was created. In this document, functions, constructors, ActionScript 3.0 class methods, and
other objects that can be invoked are collectively referred to as method closures.
剩余107页未读,继续阅读
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
- blr000012013-10-14英文很不好,要是中文翻译后的就好了,这样看起来很吃力。
- Tony11302013-12-11挺好,挺全。avm基础知识必备。
![avatar](https://profile-avatar.csdnimg.cn/18e7b5ca2a864757b2f968295a2ce1ea_zwlflex.jpg!1)
中医药人工智能研究
- 粉丝: 58
- 资源: 3
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)