summaryrefslogtreecommitdiff
path: root/lib/internal
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal')
-rw-r--r--lib/internal/bootstrap/node.js17
-rw-r--r--lib/internal/v8.js39
2 files changed, 0 insertions, 56 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
index e23ec858f3..a8485f5d1c 100644
--- a/lib/internal/bootstrap/node.js
+++ b/lib/internal/bootstrap/node.js
@@ -29,7 +29,6 @@
// Do this good and early, since it handles errors.
setupProcessFatal();
- setupV8();
setupProcessICUVersions();
setupGlobalVariables();
@@ -479,22 +478,6 @@
};
}
- function setupV8() {
- // Warm up the map and set iterator preview functions. V8 compiles
- // functions lazily (unless --nolazy is set) so we need to do this
- // before we turn off --allow_natives_syntax again.
- const v8 = NativeModule.require('internal/v8');
- v8.previewMapIterator(new Map().entries());
- v8.previewSetIterator(new Set().entries());
- v8.previewWeakMap(new WeakMap(), 1);
- v8.previewWeakSet(new WeakSet(), 1);
- // Disable --allow_natives_syntax again unless it was explicitly
- // specified on the command line.
- const re = /^--allow[-_]natives[-_]syntax$/;
- if (!process.execArgv.some((s) => re.test(s)))
- process.binding('v8').setFlagsFromString('--noallow_natives_syntax');
- }
-
function setupProcessICUVersions() {
const icu = process.binding('config').hasIntl ?
process.binding('icu') : undefined;
diff --git a/lib/internal/v8.js b/lib/internal/v8.js
deleted file mode 100644
index 3102b45a2d..0000000000
--- a/lib/internal/v8.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-// This file provides access to some of V8's native runtime functions. See
-// https://github.com/v8/v8/wiki/Built-in-functions for further information
-// about their implementation.
-// They have to be loaded before anything else to make sure we deactivate them
-// before executing any other code. Gaining access is achieved by using a
-// specific flag that is used internally in the startup phase.
-
-// Clone the provided Map Iterator.
-function previewMapIterator(it) {
- return %MapIteratorClone(it);
-}
-
-// Clone the provided Set Iterator.
-function previewSetIterator(it) {
- return %SetIteratorClone(it);
-}
-
-// Retrieve all WeakMap instance key / value pairs up to `max`. `max` limits the
-// number of key / value pairs returned. Make sure it is a positive number,
-// otherwise V8 aborts. Passing through `0` returns all elements.
-function previewWeakMap(weakMap, max) {
- return %GetWeakMapEntries(weakMap, max);
-}
-
-// Retrieve all WeakSet instance values up to `max`. `max` limits the
-// number of key / value pairs returned. Make sure it is a positive number,
-// otherwise V8 aborts. Passing through `0` returns all elements.
-function previewWeakSet(weakSet, max) {
- return %GetWeakSetValues(weakSet, max);
-}
-
-module.exports = {
- previewMapIterator,
- previewSetIterator,
- previewWeakMap,
- previewWeakSet
-};