From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Fri, 21 Jun 2019 10:23:11 -0700
Subject: chore: update GN files for file movement


diff --git a/BUILD.gn b/BUILD.gn
index b5912d4d671db27761be4c6283ed5e21818c5b04..c722975a4bc82b46192b0e72f4995fce243fa5bf 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -78,14 +78,14 @@ chdir_action("node_js2c") {
 
   macro_inputs = []
   if (!node_use_dtrace && !node_use_etw) {
-    macro_inputs += [ "src/notrace_macros.py" ]
+    macro_inputs += [ "tools/js2c_macros/notrace_macros.py" ]
   }
   if (node_debug_lib) {
-    macro_inputs += [ "tools/nodcheck_macros.py" ]
+    macro_inputs += [ "tools/js2c_macros/nodcheck_macros.py" ]
   } else {
-    macro_inputs += [ "tools/dcheck_macros.py" ]
+    macro_inputs += [ "tools/js2c_macros/dcheck_macros.py" ]
   }
-  macro_inputs += [ "tools/check_macros.py" ]
+  macro_inputs += [ "tools/js2c_macros/check_macros.py" ]
 
   config_gypi = [ "$target_gen_dir/config.gypi" ]
 
diff --git a/filenames.json b/filenames.json
index 86d89280e74d7365ab2782517fb779fc072bf0bf..edb0b215088118f567c5ad5e5969d1eb5ef661a3 100644
--- a/filenames.json
+++ b/filenames.json
@@ -67,11 +67,11 @@
     }
   ],
   "library_files": [
-    "lib/internal/bootstrap/primordials.js",
-    "lib/internal/bootstrap/cache.js",
+    "lib/internal/bootstrap/environment.js",
     "lib/internal/bootstrap/loaders.js",
     "lib/internal/bootstrap/node.js",
     "lib/internal/bootstrap/pre_execution.js",
+    "lib/internal/per_context/primordials.js",
     "lib/internal/per_context/setup.js",
     "lib/internal/per_context/domexception.js",
     "lib/async_hooks.js",
@@ -210,7 +210,6 @@
     "lib/internal/process/worker_thread_only.js",
     "lib/internal/process/report.js",
     "lib/internal/process/task_queues.js",
-    "lib/internal/profiler.js",
     "lib/internal/querystring.js",
     "lib/internal/readline.js",
     "lib/internal/repl.js",
@@ -264,9 +263,16 @@
     "deps/node-inspect/lib/internal/inspect_client.js",
     "deps/node-inspect/lib/internal/inspect_repl.js",
     "deps/acorn/acorn/dist/acorn.js",
-    "deps/acorn/acorn-walk/dist/walk.js"
+    "deps/acorn/acorn-walk/dist/walk.js",
+    "deps/acorn-plugins/acorn-bigint/index.js",
+    "deps/acorn-plugins/acorn-class-fields/index.js",
+    "deps/acorn-plugins/acorn-numeric-separator/index.js",
+    "deps/acorn-plugins/acorn-private-class-elements/index.js",
+    "deps/acorn-plugins/acorn-private-methods/index.js",
+    "deps/acorn-plugins/acorn-static-class-features/index.js"
   ],
   "node_sources": [
+    "src/api/async_resource.cc",
     "src/api/callback.cc",
     "src/api/encoding.cc",
     "src/api/environment.cc",
@@ -305,9 +311,11 @@
     "src/node_http_parser_traditional.cc",
     "src/node_http2.cc",
     "src/node_i18n.cc",
+    "src/node_main_instance.cc",
     "src/node_messaging.cc",
     "src/node_metadata.cc",
     "src/node_native_module.cc",
+    "src/node_native_module_env.cc",
     "src/node_options.cc",
     "src/node_os.cc",
     "src/node_perf.cc",
@@ -383,16 +391,17 @@
     "src/node_http2_state.h",
     "src/node_i18n.h",
     "src/node_internals.h",
+    "src/node_main_instance.h",
     "src/node_messaging.h",
     "src/node_metadata.h",
     "src/node_mutex.h",
     "src/node_native_module.h",
+    "src/node_native_module_env.h",
     "src/node_object_wrap.h",
     "src/node_options.h",
     "src/node_options-inl.h",
     "src/node_perf.h",
     "src/node_perf_common.h",
-    "src/node_persistent.h",
     "src/node_platform.h",
     "src/node_process.h",
     "src/node_revert.h",
diff --git a/src/inspector/BUILD.gn b/src/inspector/BUILD.gn
index 0e1a5a22315989d5b0b4b6462330b3d693a43228..ebf5e610d675e53ad4af40e92d5217995ed8f577 100644
--- a/src/inspector/BUILD.gn
+++ b/src/inspector/BUILD.gn
@@ -69,9 +69,10 @@ action("protocol_generated_sources") {
   inputs = [
     "$target_gen_dir/node_protocol_config.json",
     "$target_gen_dir/node_protocol.json",
+    "$inspector_protocol_dir/lib/base_string_adapter_cc.template",
+    "$inspector_protocol_dir/lib/base_string_adapter_h.template",
     "$inspector_protocol_dir/lib/Allocator_h.template",
     "$inspector_protocol_dir/lib/Array_h.template",
-    "$inspector_protocol_dir/lib/Collections_h.template",
     "$inspector_protocol_dir/lib/DispatcherBase_cpp.template",
     "$inspector_protocol_dir/lib/DispatcherBase_h.template",
     "$inspector_protocol_dir/lib/ErrorSupport_cpp.template",
diff --git a/tools/js2c.py b/tools/js2c.py
index 3e6ad7d5e12888e26a2b4eaa2eff7e2421b630f7..87cca4eaf7c909e1f871287d7f019f701a05dd0f 100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -284,14 +284,14 @@ def JS2C(source_files, target):
   for filename in source_files['.js']:
     AddModule(filename, consts, macros, definitions, initializers)
     # Electron: Expose fs module without asar support.
-    if name == 'fs.js':
+    if filename == 'fs.js':
       # Node's 'fs' and 'internal/fs/streams' have a lazy-loaded circular
       # dependency. So to expose the unmodified Node 'fs' functionality here,
       # we have to copy both 'fs' *and* 'internal/fs/streams' and modify the
       # copies to depend on each other instead of on our asarified 'fs' code.
       # See https://github.com/electron/electron/pull/16028 for more.
       AddModule('original-fs', lines.replace("require('internal/fs/streams')", "require('original-fs/streams')"))
-    elif name == 'internal/fs/streams.js':
+    elif filename == 'internal/fs/streams.js':
       AddModule('original-fs/streams', lines.replace("require('fs')", "require('original-fs')"))
 
   config_def, config_size = handle_config_gypi(source_files['config.gypi'])
