| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 "throw", GeneratorObjectThrow]); | 94 "throw", GeneratorObjectThrow]); |
| 95 | 95 |
| 96 %FunctionSetName(GeneratorObjectIterator, '[Symbol.iterator]'); | 96 %FunctionSetName(GeneratorObjectIterator, '[Symbol.iterator]'); |
| 97 %AddNamedProperty(GeneratorObjectPrototype, symbolIterator, | 97 %AddNamedProperty(GeneratorObjectPrototype, symbolIterator, |
| 98 GeneratorObjectIterator, DONT_ENUM | DONT_DELETE | READ_ONLY); | 98 GeneratorObjectIterator, DONT_ENUM | DONT_DELETE | READ_ONLY); |
| 99 %AddNamedProperty(GeneratorObjectPrototype, "constructor", | 99 %AddNamedProperty(GeneratorObjectPrototype, "constructor", |
| 100 GeneratorFunctionPrototype, DONT_ENUM | DONT_DELETE | READ_ONLY); | 100 GeneratorFunctionPrototype, DONT_ENUM | DONT_DELETE | READ_ONLY); |
| 101 %AddNamedProperty(GeneratorObjectPrototype, | 101 %AddNamedProperty(GeneratorObjectPrototype, |
| 102 symbolToStringTag, "Generator", DONT_ENUM | READ_ONLY); | 102 symbolToStringTag, "Generator", DONT_ENUM | READ_ONLY); |
| 103 %InternalSetPrototype(GeneratorFunctionPrototype, $Function.prototype); | 103 %InternalSetPrototype(GeneratorFunctionPrototype, $Function.prototype); |
| 104 %AddNamedProperty(GeneratorFunctionPrototype, |
| 105 symbolToStringTag, "GeneratorFunction", DONT_ENUM | READ_ONLY); |
| 104 %SetCode(GeneratorFunctionPrototype, GeneratorFunctionPrototypeConstructor); | 106 %SetCode(GeneratorFunctionPrototype, GeneratorFunctionPrototypeConstructor); |
| 105 %AddNamedProperty(GeneratorFunctionPrototype, "constructor", | 107 %AddNamedProperty(GeneratorFunctionPrototype, "constructor", |
| 106 GeneratorFunction, DONT_ENUM | DONT_DELETE | READ_ONLY); | 108 GeneratorFunction, DONT_ENUM | DONT_DELETE | READ_ONLY); |
| 107 %InternalSetPrototype(GeneratorFunction, $Function); | 109 %InternalSetPrototype(GeneratorFunction, $Function); |
| 108 %SetCode(GeneratorFunction, GeneratorFunctionConstructor); | 110 %SetCode(GeneratorFunction, GeneratorFunctionConstructor); |
| 109 } | 111 } |
| 110 | 112 |
| 111 SetUpGenerators(); | 113 SetUpGenerators(); |
| OLD | NEW |