From c5cfdd48497fe9bd8dbd55fd1fca84b321f48ec1 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Thu, 2 May 2024 15:54:02 -0400 Subject: [PATCH] src: rewrite task runner in c++ PR-URL: https://github.com/nodejs/node/pull/52609 Reviewed-By: Matteo Collina Reviewed-By: Daniel Lemire Reviewed-By: James M Snell Reviewed-By: Stephen Belanger --- lib/internal/main/run.js | 74 ------- lib/internal/shell.js | 37 ---- node.gyp | 2 + src/node.cc | 29 ++- src/node.h | 4 +- src/node_modules.cc | 24 --- src/node_options.cc | 9 +- src/node_options.h | 2 +- src/node_task_runner.cc | 275 ++++++++++++++++++++++++++ src/node_task_runner.h | 64 ++++++ test/cctest/test_node_task_runner.cc | 27 +++ test/embedding/embedtest.cc | 2 +- test/message/node_run_non_existent.js | 2 +- test/parallel/test-node-run.js | 40 +--- tools/snapshot/node_mksnapshot.cc | 2 +- 15 files changed, 404 insertions(+), 189 deletions(-) delete mode 100644 lib/internal/main/run.js delete mode 100644 lib/internal/shell.js create mode 100644 src/node_task_runner.cc create mode 100644 src/node_task_runner.h create mode 100644 test/cctest/test_node_task_runner.cc diff --git a/lib/internal/main/run.js b/lib/internal/main/run.js deleted file mode 100644 index 900e73d2810..00000000000 --- a/lib/internal/main/run.js +++ /dev/null @@ -1,74 +0,0 @@ -'use strict'; -/* eslint-disable node-core/prefer-primordials */ - -// There is no need to add primordials to this file. -// `run.js` is a script only executed when `node --run