blob: 403a0b70fc8e7109b4105555b06ca6c10b5992dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (C) 2018 André Bargull. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-asyncgenerator-definitions-evaluatebody
description: >
The generator object is created after FunctionDeclarationInstantiation.
info: |
14.5.10 Runtime Semantics: EvaluateBody
1. Perform ? FunctionDeclarationInstantiation(functionObject, argumentsList).
2. Let generator be ? OrdinaryCreateFromConstructor(functionObject, "%AsyncGeneratorPrototype%",
« [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]] »).
3. Perform ! AsyncGeneratorStart(generator, FunctionBody).
...
features: [async-iteration]
---*/
async function* g(a = (g.prototype = null)) {}
var oldPrototype = g.prototype;
var it = g();
assert.notSameValue(Object.getPrototypeOf(it), oldPrototype);
reportCompare(0, 0);
|