CAN CSA-ISO IEC 23271-2013 Information technology - Common Language Infrastructure (CLI).pdf

上传人:explodesoak291 文档编号:590886 上传时间:2018-12-15 格式:PDF 页数:582 大小:5.29MB
下载 相关 举报
CAN CSA-ISO IEC 23271-2013 Information technology - Common Language Infrastructure (CLI).pdf_第1页
第1页 / 共582页
CAN CSA-ISO IEC 23271-2013 Information technology - Common Language Infrastructure (CLI).pdf_第2页
第2页 / 共582页
CAN CSA-ISO IEC 23271-2013 Information technology - Common Language Infrastructure (CLI).pdf_第3页
第3页 / 共582页
CAN CSA-ISO IEC 23271-2013 Information technology - Common Language Infrastructure (CLI).pdf_第4页
第4页 / 共582页
CAN CSA-ISO IEC 23271-2013 Information technology - Common Language Infrastructure (CLI).pdf_第5页
第5页 / 共582页
亲,该文档总共582页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

1、Information technology Common Language Infrastructure (CLI)CAN/CSA-ISO/IEC 23271:13(ISO/IEC 23271:2012, IDT)National Standard of CanadaNOT FOR RESALE. / PUBLICATION NON DESTINE LA REVENTE.Legal Notice for StandardsCanadian Standards Association (operating as “CSA Group”) develops standards through a

2、 consensus standards development process approved by the Standards Council of Canada. This process brings together volunteers representing varied viewpoints and interests to achieve consensus and develop a standard. Although CSA Group administers the process and establishes rules to promote fairness

3、 in achieving consensus, it does not independently test, evaluate, or verify the content of standards.Disclaimer and exclusion of liabilityThis document is provided without any representations, warranties, or conditions of any kind, express or implied, including, without limitation, implied warranti

4、es or conditions concerning this documents fitness for a particular purpose or use, its merchantability, or its non-infringement of any third partys intellectual property rights. CSA Group does not warrant the accuracy, completeness, or currency of any of the information published in this document.

5、CSA Group makes no representations or warranties regarding this documents compliance with any applicable statute, rule, or regulation. IN NO EVENT SHALL CSA GROUP, ITS VOLUNTEERS, MEMBERS, SUBSIDIARIES, OR AFFILIATED COMPANIES, OR THEIR EMPLOYEES, DIRECTORS, OR OFFICERS, BE LIABLE FOR ANY DIRECT, IN

6、DIRECT, OR INCIDENTAL DAMAGES, INJURY, LOSS, COSTS, OR EXPENSES, HOWSOEVER CAUSED, INCLUDING BUT NOT LIMITED TO SPECIAL OR CONSEQUENTIAL DAMAGES, LOST REVENUE, BUSINESS INTERRUPTION, LOST OR DAMAGED DATA, OR ANY OTHER COMMERCIAL OR ECONOMIC LOSS, WHETHER BASED IN CONTRACT, TORT (INCLUDING NEGLIGENCE

7、), OR ANY OTHER THEORY OF LIABILITY, ARISING OUT OF OR RESULTING FROM ACCESS TO OR POSSESSION OR USE OF THIS DOCUMENT, EVEN IF CSA GROUP HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, INJURY, LOSS, COSTS, OR EXPENSES.In publishing and making this document available, CSA Group is not undertakin

8、g to render professional or other services for or on behalf of any person or entity or to perform any duty owed by any person or entity to another person or entity. The information in this document is directed to those who have the appropriate degree of experience to use and apply its contents, and

9、CSA Group accepts no responsibility whatsoever arising in any way from any and all use of or reliance on the information contained in this document. CSA Group is a private not-for-profit company that publishes voluntary standards and related documents. CSA Group has no power, nor does it undertake,

10、to enforce compliance with the contents of the standards or other documents it publishes. Intellectual property rights and ownershipAs between CSA Group and the users of this document (whether it be in printed or electronic form), CSA Group is the owner, or the authorized licensee, of all works cont

11、ained herein that are protected by copyright, all trade-marks (except as otherwise noted to the contrary), and all inventions and trade secrets that may be contained in this document, whether or not such inventions and trade secrets are protected by patents and applications for patents. Without limi

12、tation, the unauthorized use, modification, copying, or disclosure of this document may violate laws that protect CSA Groups and/or others intellectual property and may give rise to a right in CSA Group and/or others to seek legal redress for such use, modification, copying, or disclosure. To the ex

13、tent permitted by licence or by law, CSA Group reserves all intellectual property rights in this document.Patent rightsAttention is drawn to the possibility that some of the elements of this standard may be the subject of patent rights. CSA Group shall not be held responsible for identifying any or

14、all such patent rights. Users of this standard are expressly advised that determination of the validity of any such patent rights is entirely their own responsibility.Authorized use of this documentThis document is being provided by CSA Group for informational and non-commercial use only. The user o

15、f this document is authorized to do only the following:If this document is in electronic form:sLOADTHISDOCUMENTONTOACOMPUTERFORTHESOLEPURPOSEOFREVIEWINGITsSEARCHANDBROWSETHISDOCUMENTANDsPRINTTHISDOCUMENTIFITISIN0$ this remains the continuing responsibility of the SDO. An NSC reflects a consensus of

16、a number of capable individuals whose collective interests provide, to the greatest practicable extent, a balance of representation of general interests, producers, regulators, users (including consumers), and others with relevant interests, as may be appropriate to the subject in hand. It normally

17、is a standard which is capable of making a significant and timely contribution to the national interest.Those who have a need to apply standards areencouraged to use NSCs. These standards are subjectto periodic review. Users of NSCs are cautionedto obtain the latest edition from the SDO which publis

18、hes the standard.The responsibility for approving standards as National Standards of Canada rests with theStandards Council of Canada270 Albert Street, Suite 200Ottawa, Ontario, K1P 6N7CanadaAlthough the intended primary application of this Standard is stated in its Scope, it is importantto note tha

19、t it remains the responsibility of the users to judge its suitability for their particular purpose.Registered trade-mark of Canadian Standards AssociationCette norme est offerte en anglais seulement pour le moment. Le Groupe CSA publiera la versionen franais ds quelle sera produite par lorganisme rd

20、acteur.TMA trade-mark of the Canadian Standards Association, operating as “CSA Group”National Standard of CanadaPublished in January 2013 by CSA GroupA not-for-profit private sector organization5060 Spectrum Way, Suite 100, Mississauga, Ontario, Canada L4W 5N61-800-463-6727 416-747-4044Visit our Onl

21、ine Store at shop.csa.caApproved byStandards Council of CanadaCAN/CSA-ISO/IEC 23271:13Information technology Common Language Infrastructure (CLI)Prepared by InternationalOrganizationforStandardization/ International Electrotechnical CommissionReviewed byCAN/CSA-ISO/IEC 23271:13 Information technolog

22、y Common Language In frastructure (CLI)CSA/4 2013 CSA Group January 2013CAN/CSA-ISO/IEC 23271:13Information technology Common Language Infrastructure (CLI)CSA PrefaceStandards development within the Information Technology sector is harmonized with international standards development. Through the CSA

23、 Technical Committee on Information Technology (TCIT), Canadians serve as the Canadian Advisory Committee (CAC) on ISO/IEC Joint Technical Committee 1 on Information Technology (ISO/IEC JTC1) for the Standards Council of Canada (SCC), the ISO member body for Canada and sponsor of the Canadian Nation

24、al Committee of the IEC. Also, as a member of the International Telecommunication Union (ITU), Canada participates in the International Telegraph and Telephone Consultative Committee (ITU-T).This Standard supersedes CAN/CSA-ISO/IEC 23271-07 (adoption of ISO/IEC 23271:2006).At the time of publication

25、, ISO/IEC 23271:2012 is available from ISO and IEC in English only. CSA Group will publish the French version when it becomes available from ISO and IEC.This International Standard was reviewed by the TCIT under the jurisdiction of the Strategic Steering Committee on Information Technology and deeme

26、d acceptable for use in Canada. From time to time, ISO/IEC may publish addenda, corrigenda, etc. The TCIT will review these documents for approval and publication. For a listing, refer to the Current Standards Activities page at standardsactivities.csa.ca. This Standard has been formally approved, w

27、ithout modification, by the Technical Committee and has been approved as a National Standard of Canada by the Standards Council of Canada. 2013 CSA GroupAll rights reserved. No part of this publication may be reproduced in any form whatsoever without the prior permission of thepublisher. ISO/IEC mat

28、erial is reprinted with permission. Where the words “this International Standard” appear in the text, they should be interpreted as “this National Standard of Canada”.Inquiries regarding this National Standard of Canada should be addressed toCSA Group5060 Spectrum Way, Suite 100, Mississauga, Ontari

29、o, Canada L4W 5N61-800-463-6727 416-747-4000http:/csa.caTo purchase standards and related publications, visit our Online Store at shop.csa.ca or call toll-free 1-800-463-6727 or 416-747-4044.This Standard is subject to periodic review, and suggestions for its improvement will be referred to the appr

30、opriate committee. To submit a proposal for change, please send the following information to inquiriescsagroup.org and include “Proposal for change” in the subject line:(a) Standard designation (number);(b) relevant clause, table, and/or figure number;(c) wording of the proposed change; and(d) ratio

31、nale for the change.Reference numberISO/IEC 23271:2012(E)ISO/IEC 2012INTERNATIONAL STANDARD ISO/IEC23271Third edition2012-02-15Information technology Common Language Infrastructure (CLI) Technologies de linformation Infrastructure commune de langage (ICL) ISO/IEC 23271:2012(E) COPYRIGHT PROTECTED DO

32、CUMENT ISO/IEC 2012 All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or ISOs membe

33、r body in the country of the requester. ISO copyright office Case postale 56 CH-1211 Geneva 20 Tel. + 41 22 749 01 11 Fax + 41 22 749 09 47 E-mail copyrightiso.org Web www.iso.org ii ISO/IEC 2012 All rights reservedCAN/CSA-ISO/IEC 23271:13ISO/IEC 23271:2012(E) ISO/IEC 2012 All rights reserved. iii T

34、able of Contents Foreword xxi I.1 Scope 1 I.2 Conformance 2 I.3 Normative references 3 I.4 Conventions 5 I.4.1 Organization 5 I.4.2 Informative text 5 I.5 Terms and definitions 6 I.6 Overview of the Common Language Infrastructure 9 I.6.1 Relationship to type safety 9 I.6.2 Relationship to managed me

35、tadata-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 Common Language Specification 12 I.7.1 Introduction 12 I.7.2 Views of CLS compliance 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 compliance 14 I.7.3.1 Marking i

36、tems as CLS-compliant 14 I.8 Common Type System 16 I.8.1 Relationship to object-oriented programming 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

37、 21 I.8.2.5 Identity and equality of values 22 I.8.3 Locations 23 I.8.3.1 Assignment-compatible locations 23 I.8.3.2 Coercion 23 I.8.3.3 Casting 24 CAN/CSA-ISO/IEC 23271:13ISO/IEC 23271:2012(E) iv ISO/IEC 2012 All rights reserved. I.8.4 Type members 24 I.8.4.1 Fields, array elements, and values 24 I

38、.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 scoping 26 I.8.5.3 Visibility, accessibility, and security 27 I.8.6 Contracts 30 I.8.6.1 Signatures 30 I.8.7 Assignment compatibility 34 I.8.7.1 Assi

39、gnment compatibility for signature types 37 I.8.7.2 Assignment compatibility for location types 38 I.8.7.3 General assignment compatibility 39 I.8.8 Type 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

40、 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.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

41、 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 layout 49 I.8.11 Member definitions 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 Neste

42、d type definitions 52 CAN/CSA-ISO/IEC 23271:13ISO/IEC 23271:2012(E) ISO/IEC 2012 All rights reserved. v I.9 Metadata 53 I.9.1 Components and assemblies 53 I.9.2 Accessing metadata 53 I.9.2.1 Metadata tokens 54 I.9.2.2 Member signatures in metadata 54 I.9.3 Unmanaged code 54 I.9.4 Method implementati

43、on 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 Common Language Specification 59 I.10.1 Identifiers 59 I.10.2 Overloading 59 I.10.3 Operator

44、 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 methods 64 I.10.7.1 Nested type parameter re-declaration 64 I.10.7.2 Type names and arity enco

45、ding 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 I.11 Collected Common Language Specification rules 69 I.12 Virtual Execution System 72 I.12.1 Su

46、pported 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 (II.12.2) allow a match-by-variance to take precedence over an exact match, so all language CAN/

47、CSA-ISO/IEC 23271:13ISO/IEC 23271:2012(E) xxii ISO/IEC 2012 All rights reserved. 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 interfaces listed i

48、n 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 requirements are required to support the revised variance semantics. System.Math and Sys

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 标准规范 > 国际标准 > 其他

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1