ECMA 335-2012 Common Language Infrastructure (CLI) Partitions I to VI (6th Edition).pdf
《ECMA 335-2012 Common Language Infrastructure (CLI) Partitions I to VI (6th Edition).pdf》由会员分享,可在线阅读,更多相关《ECMA 335-2012 Common Language Infrastructure (CLI) Partitions I to VI (6th Edition).pdf(574页珍藏版)》请在麦多课文档分享上搜索。
1、 Reference number ECMA-123:2009 Ecma International 2009 ECMA-335 6th Edition / June 2012 Common Language Infrastructure (CLI) Partitions I to VI COPYRIGHT PROTECTED DOCUMENT Ecma International 2012 Ecma International 2012 i This Ecma Standard has been adopted by the General Assembly of June 2012. “C
2、OPYRIGHT NOTICE Ecma International This document may be copied, published and distributed to others, and certain derivative works of it may be prepared, copied, published, and distributed, in whole or in part, provided that the above copyright notice and this Copyright License and Disclaimer are inc
3、luded on all such copies and derivative works. The only derivative works that are permissible under this Copyright License and Disclaimer are: (i) works which incorporate all or portion of this document for the purpose of providing commentary or explanation (such as an annotated version of the docum
4、ent), (ii) works which incorporate all or portion of this document for the purpose of incorporating features that provide accessibility, (iii) translations of this document into languages other than English and into different formats and (iv) works by making use of this specification in standard con
5、formant products by implementing (e.g. by copy and paste wholly or partly) the functionality therein. However, the content of this document itself may not be modified in any way, including by removing the copyright notice or references to Ecma International, except as required to translate it into l
6、anguages other than English or into a different format. The official version of an Ecma International document is the English language version on the Ecma International website. In the event of discrepancies between a translated version and the official version, the official version shall govern. Th
7、e limited permissions granted above are perpetual and will not be revoked by Ecma International or its successors or assigns. This document and the information contained herein is provided on an “AS IS“ basis and ECMA INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMI
8、TED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.“ ii Ecma International 2012 Common Language Infrastructure (CLI) Partitions IVI Partition I: Concepts and Architecture P
9、artition II: Metadata Definition and Semantics Partition III: CIL Instruction Set Partition IV: Profiles and Libraries Partition V: Binary Formats Partition VI: Annexes Ecma International 2012 iii Table of Contents Foreword xxi I.1 Scope 1 I.2 Conformance 2 I.3 Normative references 3 I.4 Conventions
10、 5 I.4.1 Organization 5 I.4.2 Informative text 5 I.5 Terms and definitions 6 I.6 Overview of the Co mmon Language Infrastructure 9 I.6.1 Relationship to type safety 9 I.6.2 Relationship to managed metadata -driven execution 10 I.6.2.1 Managed code 10 I.6.2.2 Managed data 11 I.6.2.3 Summary 11 I.7 Co
11、mmon Language Specification 12 I.7.1 Introduction 12 I.7.2 Views of CLS co mpliance 12 I.7.2.1 CLS framework 12 I.7.2.2 CLS consumer 13 I.7.2.3 CLS extender 13 I.7.3 CLS co mpliance 14 I.7.3.1 Marking items as CLS -compliant 14 I.8 Common Type System 16 I.8.1 Relationship to object-oriented programm
12、ing 19 I.8.2 Values and types 19 I.8.2.1 Value types and reference types 19 I.8.2.2 Built-in value and reference types 20 I.8.2.3 Classes, interfaces, and objects 21 I.8.2.4 Boxing and unboxing of values 21 I.8.2.5 Identity and equality of values 22 I.8.3 Locations 23 I.8.3.1 Assignment-compatible l
13、ocations 23 I.8.3.2 Coercion 23 iv Ecma International 2012 I.8.3.3 Casting 24 I.8.4 Type members 24 I.8.4.1 Fields, array elements, and values 24 I.8.4.2 Methods 24 I.8.4.3 Static fields and static methods 25 I.8.4.4 Virtual methods 25 I.8.5 Naming 25 I.8.5.1 Valid names 25 I.8.5.2 Assemblies and sc
14、oping 26 I.8.5.3 Visibility, accessibility, and security 27 I.8.6 Contracts 29 I.8.6.1 Signatures 30 I.8.7 Assignment compatibility 34 I.8.7.1 Assignment compatibility for signature types 37 I.8.7.2 Assignment compatibility for location type s 38 I.8.7.3 General assignment compatibility 38 I.8.8 Typ
15、e safety and verification 39 I.8.9 Type definers 39 I.8.9.1 Array types 40 I.8.9.2 Unmanaged pointer types 41 I.8.9.3 Delegates 41 I.8.9.4 Interface type definition 42 I.8.9.5 Class type definition 43 I.8.9.6 Object type definitions 44 I.8.9.7 Value type definition 47 I.8.9.8 Type inheritance 47 I.8
16、.9.9 Object type inheritance 47 I.8.9.10 Value type inheritance 48 I.8.9.11 Interface type derivation 48 I.8.10 Member inheritance 48 I.8.10.1 Field inheritance 48 I.8.10.2 Method inheritance 48 I.8.10.3 Property and event inheritance 49 I.8.10.4 Hiding, overriding, and layo ut 49 I.8.11 Member defi
17、nitions 50 I.8.11.1 Method definitions 50 I.8.11.2 Field definitions 51 I.8.11.3 Property definitions 51 I.8.11.4 Event definitions 52 I.8.11.5 Nested type definitions 52 Ecma International 2012 v I.9 Metadata 53 I.9.1 Components and assemblies 53 I.9.2 Accessing metadata 53 I.9.2.1 Metadata tokens
18、54 I.9.2.2 Member signatures in metadata 54 I.9.3 Unmanaged code 54 I.9.4 Method implementation metadata 54 I.9.5 Class layout 55 I.9.6 Assemblies: name scopes for types 55 I.9.7 Metadata extensibility 56 I.9.8 Globals, imports, and exports 57 I.9.9 Scoped statics 58 I.10 Name and type rules for the
19、 Co mmon Language Specification 59 I.10.1 Identifiers 59 I.10.2 Overloading 59 I.10.3 Operator overloading 60 I.10.3.1 Unary operators 60 I.10.3.2 Binary operators 61 I.10.3.3 Conversion operators 62 I.10.4 Naming patterns 62 I.10.5 Exceptions 63 I.10.6 Custom attributes 63 I.10.7 Generic types and
20、methods 64 I.10.7.1 Nested type parameter re -declaration 64 I.10.7.2 Type names and arity encoding 65 I.10.7.3 Type constraint re -declaration 66 I.10.7.4 Constraint type restrictions 67 I.10.7.5 Frameworks and accessibility of nested types 67 I.10.7.6 Frameworks and abstract or virtual methods 68
21、I.11 Collected Co mmon Language Specification rules 69 I.12 Virtual Execution System 72 I.12.1 Supported data types 72 I.12.1.1 Native size: native int, native unsigned int, O and as exact type matches always took precedence over matches-by-variance. In this edition the dispatch rules for interfaces
22、 (II.12.2) allow a match-by-variance to take precedence over an exact match, so all language implementation targeting the CLI must be aware of the behavior even if it is not supported in the language (I.1.8). Additional requirements on ilasm to metadata conversion. The left-to-right order of interfa
23、ces listed in a type header (II.10.2) must now be preserved as a top-to-bottom order in the InterfaceImpl table (II.22.23); and the top-to-bottom of method definitions (II.10.2, II.25) must now be preserved as a top-to-bottom order in the MethodDef table (II.22.26). Both these additional requirement
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
10000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ECMA3352012COMMONLANGUAGEINFRASTRUCTURECLIPARTITIONSITOVI6THEDITIONPDF

链接地址:http://www.mydoc123.com/p-704766.html