From 6eb0e1f68ddd512c6f13e80ad06834430a9c80ce Mon Sep 17 00:00:00 2001 From: liujiandong Date: Sat, 10 Feb 2018 20:03:00 +0800 Subject: [PATCH] translated: issue #16 --- translated/issues-16.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/issues-16.html b/translated/issues-16.html index f070c6c2f8..76bead7c25 100644 --- a/translated/issues-16.html +++ b/translated/issues-16.html @@ -1,11 +1,11 @@ -

Operations on Iterator Objects

-

See Common Iteration Interfaces ().

+

迭代器对象具有的操作

+

参考常见的迭代接口 ().

GetIterator ( _obj_ [ , _method_ ] )

-

The abstract operation GetIterator with argument _obj_ and optional argument _method_ performs the following steps:

+

参数为 _obj_ 和可选参数 _method_ 的抽象操作 GetIterator 执行以下步骤:

1. If _method_ is not present, then 1. Set _method_ to ? GetMethod(_obj_, @@iterator). @@ -20,7 +20,7 @@

GetIterator ( _obj_ [ , _method_ ] )

IteratorNext ( _iteratorRecord_ [ , _value_ ] )

-

The abstract operation IteratorNext with argument _iteratorRecord_ and optional argument _value_ performs the following steps:

+

参数为 _iteratorRecord_ 和可选参数 _value_ 的抽象操作 IteratorNext 执行以下步骤:

1. If _value_ is not present, then 1. Let _result_ be ? Call(_iteratorRecord_.[[NextMethod]], _iteratorRecord_.[[Iterator]], « »). @@ -34,7 +34,7 @@

IteratorNext ( _iteratorRecord_ [ , _value_ ] )

IteratorComplete ( _iterResult_ )

-

The abstract operation IteratorComplete with argument _iterResult_ performs the following steps:

+

参数为 _iterResult_ 的抽象操作 IteratorComplete 执行以下步骤:

1. Assert: Type(_iterResult_) is Object. 1. Return ToBoolean(? Get(_iterResult_, `"done"`)). @@ -44,7 +44,7 @@

IteratorComplete ( _iterResult_ )

IteratorValue ( _iterResult_ )

-

The abstract operation IteratorValue with argument _iterResult_ performs the following steps:

+

使用参数为 _iterResult_ 的抽象操作 IteratorValue 执行以下步骤:

1. Assert: Type(_iterResult_) is Object. 1. Return ? Get(_iterResult_, `"value"`). @@ -54,7 +54,7 @@

IteratorValue ( _iterResult_ )

IteratorStep ( _iteratorRecord_ )

-

The abstract operation IteratorStep with argument _iteratorRecord_ requests the next value from _iteratorRecord_.[[Iterator]] by calling _iteratorRecord_.[[NextMethod]] and returns either *false* indicating that the iterator has reached its end or the IteratorResult object if a next value is available. IteratorStep performs the following steps:

+

使用参数 _iteratorRecord_ 的抽象操作 IteratorStep 通过调用 _iteratorRecord_.[[NextMethod]] 从 _iteratorRecord_.[[Iterator]] 中请求 next 值,并返回 *false* 或一个 IteratorResult 对象。*false* 表示迭代结束,IteratorResult 对象是一个可用的 next 值。其执行步骤如下:

1. Let _result_ be ? IteratorNext(_iteratorRecord_). 1. Let _done_ be ? IteratorComplete(_result_). @@ -66,7 +66,7 @@

IteratorStep ( _iteratorRecord_ )

IteratorClose ( _iteratorRecord_, _completion_ )

-

The abstract operation IteratorClose with arguments _iteratorRecord_ and _completion_ is used to notify an iterator that it should perform any actions it would normally perform when it has reached its completed state:

+

参数为 _iteratorRecord_ 和 _completion_ 的抽象操作 IteratorClose 用于通知迭代器,它应该执行它在达到其完成状态时通常会执行的一些操作:

1. Assert: Type(_iteratorRecord_.[[Iterator]]) is Object. 1. Assert: _completion_ is a Completion Record. @@ -84,7 +84,7 @@

IteratorClose ( _iteratorRecord_, _completion_ )

CreateIterResultObject ( _value_, _done_ )

-

The abstract operation CreateIterResultObject with arguments _value_ and _done_ creates an object that supports the IteratorResult interface by performing the following steps:

+

参数为 _value_ 和 _done_ 的抽象操作 CreateIterResultObject 创建一个支持 IteratorResult 接口的对象,它执行以下操作:

1. Assert: Type(_done_) is Boolean. 1. Let _obj_ be ObjectCreate(%ObjectPrototype%). @@ -97,7 +97,7 @@

CreateIterResultObject ( _value_, _done_ )

CreateListIteratorRecord ( _list_ )

-

The abstract operation CreateListIteratorRecord with argument _list_ creates an Iterator () object record whose next method returns the successive elements of _list_. It performs the following steps:

+

参数为 _list_ 的抽象操作 CreateListIteratorRecord 创建一个迭代器 () 对象记录,其 next 方法返回元素连续的 _list_。该抽象操作执行以下步骤:

1. Let _iterator_ be ObjectCreate(%IteratorPrototype%, « [[IteratedList]], [[ListIteratorNextIndex]] »). 1. Set _iterator_.[[IteratedList]] to _list_. @@ -106,13 +106,13 @@

CreateListIteratorRecord ( _list_ )

1. Return Record { [[Iterator]]: _iterator_, [[NextMethod]]: _next_, [[Done]]: *false* }.
-

The list iterator object is never directly accessible to ECMAScript code.

+

这个迭代器对象列表从不直接通过 ECMAScript 代码访问。

ListIterator next( )

-

The ListIterator `next` method is a standard built-in function object (clause ) that performs the following steps:

+

ListIterator `next` 方法是一个标准的内置函数方法(章节 ),它执行以下步骤:

1. Let _O_ be the *this* value. 1. Assert: Type(_O_) is Object.