From 8ead08df564add0c6bceeba53adefe788e64b5bb Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Sat, 20 Apr 2024 09:31:02 -0400 Subject: [PATCH] src: rewrite task runner in c++ --- lib/internal/main/run.js | 74 --------- lib/internal/shell.js | 37 ----- node.gyp | 2 + src/node.cc | 21 ++- src/node_modules.cc | 24 --- src/node_options.cc | 9 +- src/node_options.h | 2 +- src/node_task_runner.cc | 221 ++++++++++++++++++++++++++ src/node_task_runner.h | 49 ++++++ test/cctest/test_node_task_runner.cc | 27 ++++ test/message/node_run_non_existent.js | 2 +- test/parallel/test-node-run.js | 40 +---- 12 files changed, 327 insertions(+), 181 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 900e73d2810357..00000000000000 --- 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