doc: remove remaining uses of `@@wellknown` syntax · nodejs/node@7acac70

@@ -161,8 +161,9 @@ This code is internally expanded into something that looks like:

161161162162

```js

163163

{

164-

// 1. Lookup @@iterator property on `array` (user-mutable if user-provided).

165-

// 2. Lookup @@iterator property on %Array.prototype% (user-mutable).

164+

// 1. Lookup %Symbol.iterator% property on `array` (user-mutable if

165+

// user-provided).

166+

// 2. Lookup %Symbol.iterator% property on %Array.prototype% (user-mutable).

166167

// 3. Call that function.

167168

const iterator = array[Symbol.iterator]();

168169

// 1. Lookup `next` property on `iterator` (doesn't exist).

@@ -226,8 +227,9 @@ const [first, second] = array;

226227

This is roughly equivalent to:

227228228229

```js

229-

// 1. Lookup @@iterator property on `array` (user-mutable if user-provided).

230-

// 2. Lookup @@iterator property on %Array.prototype% (user-mutable).

230+

// 1. Lookup %Symbol.iterator% property on `array` (user-mutable if

231+

// user-provided).

232+

// 2. Lookup %Symbol.iterator% property on %Array.prototype% (user-mutable).

231233

// 3. Call that function.

232234

const iterator = array[Symbol.iterator]();

233235

// 1. Lookup `next` property on `iterator` (doesn't exist).

@@ -262,8 +264,9 @@ best choice.

262264

<summary>Avoid spread operator on arrays</summary>

263265264266

```js

265-

// 1. Lookup @@iterator property on `array` (user-mutable if user-provided).

266-

// 2. Lookup @@iterator property on %Array.prototype% (user-mutable).

267+

// 1. Lookup %Symbol.iterator% property on `array` (user-mutable if

268+

// user-provided).

269+

// 2. Lookup %Symbol.iterator% property on %Array.prototype% (user-mutable).

267270

// 3. Lookup `next` property on %ArrayIteratorPrototype% (user-mutable).

268271

const arrayCopy = [...array];

269272

func(...array);

@@ -281,17 +284,17 @@ ReflectApply(func, null, array);

281284

<details>

282285283286

<summary><code>%Array.prototype.concat%</code> looks up

284-

<code>@@isConcatSpreadable</code> property of the passed

285-

arguments and the <code>this</code> value.</summary>

287+

<code>%Symbol.isConcatSpreadable%</code> property of the passed

288+

arguments and the <code>this</code> value</summary>

286289287290

```js

288291

{

289292

// Unsafe code example:

290-

// 1. Lookup @@isConcatSpreadable property on `array` (user-mutable if

291-

// user-provided).

292-

// 2. Lookup @@isConcatSpreadable property on `%Array.prototype%

293+

// 1. Lookup %Symbol.isConcatSpreadable% property on `array`

294+

// (user-mutable if user-provided).

295+

// 2. Lookup %Symbol.isConcatSpreadable% property on `%Array.prototype%

293296

// (user-mutable).

294-

// 2. Lookup @@isConcatSpreadable property on `%Object.prototype%

297+

// 2. Lookup %Symbol.isConcatSpreadable% property on `%Object.prototype%

295298

// (user-mutable).

296299

const array = [];

297300

ArrayPrototypeConcat(array);

@@ -340,8 +343,9 @@ Object.defineProperty(Object.prototype, Symbol.isConcatSpreadable, {

340343

```js

341344

{

342345

// Unsafe code example:

343-

// 1. Lookup @@iterator property on `array` (user-mutable if user-provided).

344-

// 2. Lookup @@iterator property on %Array.prototype% (user-mutable).

346+

// 1. Lookup %Symbol.iterator% property on `array` (user-mutable if

347+

// user-provided).

348+

// 2. Lookup %Symbol.iterator% property on %Array.prototype% (user-mutable).

345349

// 3. Lookup `next` property on %ArrayIteratorPrototype% (user-mutable).

346350

const obj = ObjectFromEntries(array);

347351

}

@@ -371,8 +375,9 @@ Object.defineProperty(Object.prototype, Symbol.isConcatSpreadable, {

371375

<code>%Promise.race%</code> iterate over an array</summary>

372376373377

```js

374-

// 1. Lookup @@iterator property on `array` (user-mutable if user-provided).

375-

// 2. Lookup @@iterator property on %Array.prototype% (user-mutable).

378+

// 1. Lookup %Symbol.iterator% property on `array` (user-mutable if

379+

// user-provided).

380+

// 2. Lookup %Symbol.iterator% property on %Array.prototype% (user-mutable).

376381

// 3. Lookup `next` property on %ArrayIteratorPrototype% (user-mutable).

377382

// 4. Lookup `then` property on %Array.Prototype% (user-mutable).

378383

// 5. Lookup `then` property on %Object.Prototype% (user-mutable).

@@ -437,7 +442,7 @@ Array.prototype[Symbol.iterator] = () => ({

437442438443

// Core

439444440-

// 1. Lookup @@iterator property on %Array.prototype% (user-mutable).

445+

// 1. Lookup %Symbol.iterator% property on %Array.prototype% (user-mutable).

441446

// 2. Lookup `next` property on %ArrayIteratorPrototype% (user-mutable).

442447

const set = new SafeSet([1, 2, 3]);

443448

@@ -684,14 +689,14 @@ can be reset from user-land.

684689

<summary>List of <code>RegExp</code> methods that look up properties from

685690

mutable getters</summary>

686691687-

| `RegExp` method | looks up the following flag-related properties |

688-

| ------------------------------ | ------------------------------------------------------------------ |

689-

| `get RegExp.prototype.flags` | `global`, `ignoreCase`, `multiline`, `dotAll`, `unicode`, `sticky` |

690-

| `RegExp.prototype[@@match]` | `global`, `unicode` |

691-

| `RegExp.prototype[@@matchAll]` | `flags` |

692-

| `RegExp.prototype[@@replace]` | `global`, `unicode` |

693-

| `RegExp.prototype[@@split]` | `flags` |

694-

| `RegExp.prototype.toString` | `flags` |

692+

| `RegExp` method | looks up the following flag-related properties |

693+

| ----------------------------------- | ------------------------------------------------------------------ |

694+

| `get RegExp.prototype.flags` | `global`, `ignoreCase`, `multiline`, `dotAll`, `unicode`, `sticky` |

695+

| `RegExp.prototype[Symbol.match]` | `global`, `unicode` |

696+

| `RegExp.prototype[Symbol.matchAll]` | `flags` |

697+

| `RegExp.prototype[Symbol.replace]` | `global`, `unicode` |

698+

| `RegExp.prototype[Symbol.split]` | `flags` |

699+

| `RegExp.prototype.toString` | `flags` |

695700696701

</details>

697702

@@ -786,7 +791,7 @@ console.log(proxyWithNullPrototypeObject.someProperty); // genuine value

786791787792

### Checking if an object is an instance of a class

788793789-

#### Using `instanceof` looks up the `@@hasInstance` property of the class

794+

#### Using `instanceof` looks up the `%Symbol.hasInstance%` property of the class

790795791796

```js

792797

// User-land