| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 // This file relies on the fact that the following declarations have been made | 7 // This file relies on the fact that the following declarations have been made |
| 8 // in runtime.js: | 8 // in runtime.js: |
| 9 // var $Function = global.Function; | 9 // var $Function = global.Function; |
| 10 | 10 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 InstallFunctions(GeneratorObjectPrototype, | 67 InstallFunctions(GeneratorObjectPrototype, |
| 68 DONT_ENUM | DONT_DELETE | READ_ONLY, | 68 DONT_ENUM | DONT_DELETE | READ_ONLY, |
| 69 ["next", GeneratorObjectNext, | 69 ["next", GeneratorObjectNext, |
| 70 "throw", GeneratorObjectThrow]); | 70 "throw", GeneratorObjectThrow]); |
| 71 | 71 |
| 72 %FunctionSetName(GeneratorObjectIterator, '[Symbol.iterator]'); | 72 %FunctionSetName(GeneratorObjectIterator, '[Symbol.iterator]'); |
| 73 %AddNamedProperty(GeneratorObjectPrototype, symbolIterator, | 73 %AddNamedProperty(GeneratorObjectPrototype, symbolIterator, |
| 74 GeneratorObjectIterator, DONT_ENUM | DONT_DELETE | READ_ONLY); | 74 GeneratorObjectIterator, DONT_ENUM | DONT_DELETE | READ_ONLY); |
| 75 %AddNamedProperty(GeneratorObjectPrototype, "constructor", | 75 %AddNamedProperty(GeneratorObjectPrototype, "constructor", |
| 76 GeneratorFunctionPrototype, DONT_ENUM | DONT_DELETE | READ_ONLY); | 76 GeneratorFunctionPrototype, DONT_ENUM | DONT_DELETE | READ_ONLY); |
| 77 %AddNamedProperty(GeneratorObjectPrototype, |
| 78 symbolToStringTag, "Generator", DONT_ENUM | READ_ONLY); |
| 77 %InternalSetPrototype(GeneratorFunctionPrototype, $Function.prototype); | 79 %InternalSetPrototype(GeneratorFunctionPrototype, $Function.prototype); |
| 78 %SetCode(GeneratorFunctionPrototype, GeneratorFunctionPrototypeConstructor); | 80 %SetCode(GeneratorFunctionPrototype, GeneratorFunctionPrototypeConstructor); |
| 79 %AddNamedProperty(GeneratorFunctionPrototype, "constructor", | 81 %AddNamedProperty(GeneratorFunctionPrototype, "constructor", |
| 80 GeneratorFunction, DONT_ENUM | DONT_DELETE | READ_ONLY); | 82 GeneratorFunction, DONT_ENUM | DONT_DELETE | READ_ONLY); |
| 81 %InternalSetPrototype(GeneratorFunction, $Function); | 83 %InternalSetPrototype(GeneratorFunction, $Function); |
| 82 %SetCode(GeneratorFunction, GeneratorFunctionConstructor); | 84 %SetCode(GeneratorFunction, GeneratorFunctionConstructor); |
| 83 } | 85 } |
| 84 | 86 |
| 85 SetUpGenerators(); | 87 SetUpGenerators(); |
| OLD | NEW |