ECMA 262-2015 ECMAScript Language Specification (6th Edition).pdf
《ECMA 262-2015 ECMAScript Language Specification (6th Edition).pdf》由会员分享,可在线阅读,更多相关《ECMA 262-2015 ECMAScript Language Specification (6th Edition).pdf(566页珍藏版)》请在麦多课文档分享上搜索。
1、 Reference number ECMA-123:2009 Ecma International 2009 ECMA-262 6th Edition / June 2015 ECMAScript 2015 Language Specification COPYRIGHT PROTECTED DOCUMENT Ecma International 2015 Ecma International Rue du Rhone 114 CH-1204 Geneva Tel: +41 22 849 6000 Fax: +41 22 849 6001 Web: http:/www.ecma-intern
2、ational.org Ecma International 2015 i COPYRIGHT NOTICE 2015 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 t
3、his Copyright License and Disclaimer are included 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 explanatio
4、n (such as an annotated version of the document), (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 differ ent formats and (iv) works by mak
5、ing use of this specification in standard conformant 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 Internation
6、al, except as required to translate it into languages 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 v
7、ersion, the official version shall govern. The limited permissions granted above are perpetual and will not be revoked by Ecma Internat ional or its successors or assigns. This document and the information contained herein is provided on an “AS IS“ basis and ECMA INTERNATIONAL DISCLAIMS ALL WARRANTI
8、ES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 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.“ Software License All Software contained in this document (“Software)“ is
9、protected by copyright and is being made available under the “BSD License“, included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license ev
10、en if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT http:/www.ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDAR
11、DS*. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in bi
12、nary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the authors nor Ecma International may be used to endorse or promote products derived from this
13、 software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA
14、 INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
15、CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ii Ecma International 2015 Ecma International 2015 iii Contents Page 1 Scope .1 2 Conformance .1 3 Normative references 1 4 O
16、verview 1 4.1 Web Scripting 2 4.2 ECMAScript Overview .2 Objects.3 4.2.1The Strict Variant of ECMAScript .4 4.2.24.3 Terms and definitions .5 4.4 Organization of This Specification .8 5 Notational Conventions 8 5.1 Syntactic and Lexical Grammars 8 Context-Free Grammars8 5.1.1The Lexical and RegExp G
17、rammars .9 5.1.2The Numeric String Grammar .9 5.1.3The Syntactic Grammar 9 5.1.4Grammar Notation . 10 5.1.55.2 Algorithm Conventions . 14 5.3 Static Semantic Rules . 16 6 ECMAScript Data Types and Values 16 6.1 ECMAScript Language Types . 16 The Undefined Type 16 6.1.1The Null Type. 17 6.1.2The Bool
18、ean Type . 17 6.1.3The String Type . 17 6.1.4The Symbol Type. 17 6.1.5The Number Type 18 6.1.6The Object Type 19 6.1.76.2 ECMAScript Specification Types 29 The List and Record Specification Type 29 6.2.1The Completion Record Specification Type 30 6.2.2The Reference Specification Type 31 6.2.3The Pro
19、perty Descriptor Specification Type 33 6.2.4The Lexical Environment and Environment Record Specification Types 35 6.2.5Data Blocks . 35 6.2.67 Abstract Operations 36 7.1 Type Conversion . 36 ToPrimitive ( input , PreferredType ) 36 7.1.1ToBoolean ( argument ) 37 7.1.2ToNumber ( argument ) . 38 7.1.3
20、ToInteger ( argument ) 40 7.1.4ToInt32 ( argument ) 40 7.1.5ToUint32 ( argument ) . 41 7.1.6ToInt16 ( argument ) 41 7.1.7ToUint16 ( argument ) . 41 7.1.8ToInt8 ( argument ) 41 7.1.9ToUint8 ( argument ) . 42 7.1.10ToUint8Clamp ( argument ) . 42 7.1.11ToString ( argument ) 42 7.1.12iv Ecma Internation
21、al 2015 ToObject ( argument ) . 43 7.1.13ToPropertyKey ( argument ) . 44 7.1.14ToLength ( argument ) 44 7.1.15CanonicalNumericIndexString ( argument ) 44 7.1.167.2 Testing and Comparison Operations . 45 RequireObjectCoercible ( argument ) 45 7.2.1IsArray ( argument ) 45 7.2.2IsCallable ( argument )
22、45 7.2.3IsConstructor ( argument ) . 45 7.2.4IsExtensible (O) . 45 7.2.5IsInteger ( argument ) 46 7.2.6IsPropertyKey ( argument ) 46 7.2.7IsRegExp ( argument ) 46 7.2.8SameValue(x, y) 46 7.2.9SameValueZero(x, y) . 46 7.2.10Abstract Relational Comparison 47 7.2.11Abstract Equality Comparison . 48 7.2
23、.12Strict Equality Comparison 48 7.2.137.3 Operations on Objects 49 Get (O, P) . 49 7.3.1GetV (V, P) . 49 7.3.2Set (O, P, V, Throw) . 49 7.3.3CreateDataProperty (O, P, V) 49 7.3.4CreateMethodProperty (O, P, V) . 50 7.3.5CreateDataPropertyOrThrow (O, P, V) 50 7.3.6DefinePropertyOrThrow (O, P, desc) 5
24、0 7.3.7DeletePropertyOrThrow (O, P) 50 7.3.8GetMethod (O, P) . 51 7.3.9HasProperty (O, P) 51 7.3.10HasOwnProperty (O, P) . 51 7.3.11Call(F, V, argumentsList) 51 7.3.12Construct (F, argumentsList, newTarget) . 51 7.3.13SetIntegrityLevel (O, level) . 52 7.3.14TestIntegrityLevel (O, level) 52 7.3.15Cre
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
10000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ECMA2622015ECMASCRIPTLANGUAGESPECIFICATION6THEDITIONPDF

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