GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — v8: refactor to use more primordials · nodejs/node@2dd2ec3

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • v8.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/v8.js‎

Copy file name to clipboardExpand all lines: lib/v8.js
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
const {
1818
Array,
1919
ArrayBuffer,
20+
ArrayPrototypeForEach,
21+
ArrayPrototypePush,
2022
DataView,
2123
Error,
2224
Float32Array,
@@ -191,13 +193,14 @@ const arrayBufferViewTypeToIndex = new SafeMap();
191193

192194
{
193195
const dummy = new ArrayBuffer();
194-
for (const [i, ctor] of arrayBufferViewTypes.entries()) {
196+
ArrayPrototypeForEach(arrayBufferViewTypes, (ctor, i) => {
195197
const tag = ObjectPrototypeToString(new ctor(dummy));
196198
arrayBufferViewTypeToIndex.set(tag, i);
197-
}
199+
});
198200
}
199201

200-
const bufferConstructorIndex = arrayBufferViewTypes.push(FastBuffer) - 1;
202+
const bufferConstructorIndex =
203+
ArrayPrototypePush(arrayBufferViewTypes, FastBuffer) - 1;
201204

202205
class DefaultSerializer extends Serializer {
203206
constructor() {

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.