Debian Codegraph @

js/src/tests/test262/language/expressions/arrow-function/extensibility.js

raw
1 // Copyright (C) 2021 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-arrow-function-definitions-runtime-semantics-evaluation
6 description: The [[Extensible]] slot of arrow functions
7 info: |
8 15.3.4 Runtime Semantics: InstantiateArrowFunctionExpression
9 [...]
10 4. Let closure be OrdinaryFunctionCreate(%Function.prototype%, sourceText,
11 ArrowParameters, ConciseBody, lexical-this, scope).
12
13 10.2.3 OrdinaryFunctionCreate ( functionPrototype, sourceText, ParameterList, Body, thisMode, Scope )
14 [...]
15 3. Let F be ! OrdinaryObjectCreate(functionPrototype, internalSlotsList).
16
17 10.1.12 OrdinaryObjectCreate ( proto [ , additionalInternalSlotsList ] )
18 1. Let internalSlotsList be « [[Prototype]], [[Extensible]] ».
19 2. If additionalInternalSlotsList is present, append each of its elements
20 to internalSlotsList.
21 3. Let O be ! MakeBasicObject(internalSlotsList).
22
23 7.3.1 MakeBasicObject ( internalSlotsList )
24 [...]
25 6. If internalSlotsList contains [[Extensible]], set obj.[[Extensible]] to
26 true.
27 ---*/
28
29 assert(Object.isExtensible(() => {}));
30
31 reportCompare(0, 0);