diff options
Diffstat (limited to 'src')
58 files changed, 64 insertions, 28 deletions
diff --git a/src/aliased_buffer.h b/src/aliased_buffer.h index 868d495be9e..5083ae9a1f4 100644 --- a/src/aliased_buffer.h +++ b/src/aliased_buffer.h @@ -4,7 +4,7 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include <cinttypes> -#include "util-inl.h" +#include "util.h" #include "v8.h" namespace node { diff --git a/src/api/utils.cc b/src/api/utils.cc index b0998b6fb76..da7281a68f3 100644 --- a/src/api/utils.cc +++ b/src/api/utils.cc @@ -1,5 +1,6 @@ #include "node.h" #include "node_internals.h" +#include "util-inl.h" #include <csignal> diff --git a/src/base_object-inl.h b/src/base_object-inl.h index fd61c15feae..50d8aba4a94 100644 --- a/src/base_object-inl.h +++ b/src/base_object-inl.h @@ -26,7 +26,7 @@ #include "base_object.h" #include "env-inl.h" -#include "util-inl.h" +#include "util.h" #include "v8.h" namespace node { diff --git a/src/debug_utils.cc b/src/debug_utils.cc index bff2f9ae915..b86710fba6e 100644 --- a/src/debug_utils.cc +++ b/src/debug_utils.cc @@ -1,4 +1,5 @@ #include "debug_utils.h" +#include "util-inl.h" #ifdef __POSIX__ #if defined(__linux__) diff --git a/src/env.cc b/src/env.cc index 197cd5bd904..5f408f18f14 100644 --- a/src/env.cc +++ b/src/env.cc @@ -13,6 +13,7 @@ #include "node_worker.h" #include "tracing/agent.h" #include "tracing/traced_value.h" +#include "util-inl.h" #include "v8-profiler.h" #include <algorithm> diff --git a/src/heap_utils.cc b/src/heap_utils.cc index 654dfabafe6..ee0665cfe27 100644 --- a/src/heap_utils.cc +++ b/src/heap_utils.cc @@ -1,5 +1,6 @@ #include "env-inl.h" #include "stream_base-inl.h" +#include "util-inl.h" using v8::Array; using v8::Boolean; diff --git a/src/inspector/tracing_agent.cc b/src/inspector/tracing_agent.cc index 09d213d8ae5..d87eec6a646 100644 --- a/src/inspector/tracing_agent.cc +++ b/src/inspector/tracing_agent.cc @@ -4,6 +4,7 @@ #include "node_v8_platform-inl.h" #include "env-inl.h" +#include "util-inl.h" #include "v8.h" #include <set> diff --git a/src/inspector/worker_inspector.cc b/src/inspector/worker_inspector.cc index b7fab6ea6b5..48679d2f698 100644 --- a/src/inspector/worker_inspector.cc +++ b/src/inspector/worker_inspector.cc @@ -1,5 +1,6 @@ #include "worker_inspector.h" #include "main_thread_interface.h" +#include "util-inl.h" #include <memory> diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 6ef262945b1..d82e88d6123 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -12,6 +12,7 @@ #include "node_options-inl.h" #include "node_process.h" #include "node_url.h" +#include "util-inl.h" #include "v8-inspector.h" #include "v8-platform.h" diff --git a/src/inspector_io.cc b/src/inspector_io.cc index 75bcfff5f75..7ba19087d01 100644 --- a/src/inspector_io.cc +++ b/src/inspector_io.cc @@ -11,7 +11,7 @@ #include "node_internals.h" #include "node_mutex.h" #include "v8-inspector.h" -#include "util.h" +#include "util-inl.h" #include "zlib.h" #include <deque> diff --git a/src/inspector_js_api.cc b/src/inspector_js_api.cc index 4948bd8797a..5caf3fa09a4 100644 --- a/src/inspector_js_api.cc +++ b/src/inspector_js_api.cc @@ -1,6 +1,7 @@ #include "base_object-inl.h" #include "inspector_agent.h" #include "inspector_io.h" +#include "util-inl.h" #include "v8.h" #include "v8-inspector.h" diff --git a/src/inspector_profiler.cc b/src/inspector_profiler.cc index 4dfad49019e..0f778c88ddf 100644 --- a/src/inspector_profiler.cc +++ b/src/inspector_profiler.cc @@ -5,7 +5,7 @@ #include "node_file.h" #include "node_internals.h" #include "v8-inspector.h" -#include "util.h" +#include "util-inl.h" namespace node { namespace profiler { diff --git a/src/inspector_socket.h b/src/inspector_socket.h index 649b7f445df..a6a18923d1b 100644 --- a/src/inspector_socket.h +++ b/src/inspector_socket.h @@ -3,7 +3,7 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS -#include "util-inl.h" +#include "util.h" #include "uv.h" #include <string> diff --git a/src/inspector_socket_server.cc b/src/inspector_socket_server.cc index 5f1bdbc1e68..6bb04372226 100644 --- a/src/inspector_socket_server.cc +++ b/src/inspector_socket_server.cc @@ -1,6 +1,7 @@ #include "inspector_socket_server.h" #include "node.h" +#include "util-inl.h" #include "uv.h" #include "zlib.h" diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc index befef0af658..286086ab6af 100644 --- a/src/js_native_api_v8.cc +++ b/src/js_native_api_v8.cc @@ -4,6 +4,7 @@ #define NAPI_EXPERIMENTAL #include "js_native_api_v8.h" #include "js_native_api.h" +#include "util-inl.h" #define CHECK_MAYBE_NOTHING(env, maybe, status) \ RETURN_STATUS_IF_FALSE((env), !((maybe).IsNothing()), (status)) diff --git a/src/js_native_api_v8.h b/src/js_native_api_v8.h index 9d896ae1f2f..88c59869a07 100644 --- a/src/js_native_api_v8.h +++ b/src/js_native_api_v8.h @@ -150,7 +150,7 @@ inline napi_value JsValueFromV8LocalValue(v8::Local<v8::Value> local) { inline v8::Local<v8::Value> V8LocalValueFromJsValue(napi_value v) { v8::Local<v8::Value> local; - memcpy(&local, &v, sizeof(v)); + memcpy(static_cast<void*>(&local), &v, sizeof(v)); return local; } diff --git a/src/js_stream.cc b/src/js_stream.cc index d29e748da8d..1d61605d645 100644 --- a/src/js_stream.cc +++ b/src/js_stream.cc @@ -5,6 +5,7 @@ #include "node_buffer.h" #include "node_errors.h" #include "stream_base-inl.h" +#include "util-inl.h" #include "v8.h" namespace node { diff --git a/src/node.cc b/src/node.cc index ac0e7dfce3f..953465e04ac 100644 --- a/src/node.cc +++ b/src/node.cc @@ -24,6 +24,7 @@ // ========== local headers ========== #include "debug_utils.h" +#include "env-inl.h" #include "node_binding.h" #include "node_internals.h" #include "node_main_instance.h" diff --git a/src/node.h b/src/node.h index 5098dc9c7e7..5af0655a84b 100644 --- a/src/node.h +++ b/src/node.h @@ -99,6 +99,14 @@ # endif #endif +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS +// Internally, do not include util-inl.h into files unless they need it's +// inline definitions. +#else +// Externally, it must be included for backwards API compatibility. +# include <util-inl.h> +#endif + // Forward-declare libuv loop struct uv_loop_s; diff --git a/src/node_api.cc b/src/node_api.cc index ab48caa2374..f8b0d8b5503 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -6,6 +6,7 @@ #include "node_binding.h" #include "node_errors.h" #include "node_internals.h" +#include "util-inl.h" #include <memory> diff --git a/src/node_constants.cc b/src/node_constants.cc index bdbef2bfbc5..aa2afc59d95 100644 --- a/src/node_constants.cc +++ b/src/node_constants.cc @@ -21,6 +21,7 @@ #include "node_constants.h" #include "node_internals.h" +#include "util-inl.h" #include "zlib.h" diff --git a/src/node_contextify.cc b/src/node_contextify.cc index f8d43e062ee..6590da62c5b 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -27,6 +27,7 @@ #include "node_context_data.h" #include "node_errors.h" #include "module_wrap.h" +#include "util-inl.h" namespace node { namespace contextify { diff --git a/src/node_credentials.cc b/src/node_credentials.cc index c8685ac4887..d384504f2ac 100644 --- a/src/node_credentials.cc +++ b/src/node_credentials.cc @@ -1,4 +1,5 @@ #include "node_internals.h" +#include "util-inl.h" #ifdef NODE_IMPLEMENTS_POSIX_CREDENTIALS #include <grp.h> // getgrnam() diff --git a/src/node_crypto_bio.h b/src/node_crypto_bio.h index ef7012ba728..fef91750d54 100644 --- a/src/node_crypto_bio.h +++ b/src/node_crypto_bio.h @@ -26,8 +26,8 @@ #include "node_crypto.h" #include "openssl/bio.h" -#include "env-inl.h" -#include "util-inl.h" +#include "env.h" +#include "util.h" #include "v8.h" namespace node { diff --git a/src/node_crypto_clienthello-inl.h b/src/node_crypto_clienthello-inl.h index 1262186a927..7d1671f72ee 100644 --- a/src/node_crypto_clienthello-inl.h +++ b/src/node_crypto_clienthello-inl.h @@ -25,7 +25,7 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "node_crypto_clienthello.h" -#include "util-inl.h" +#include "util.h" namespace node { namespace crypto { diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc index 910c19df73c..fc58734c59a 100644 --- a/src/node_dtrace.cc +++ b/src/node_dtrace.cc @@ -42,6 +42,7 @@ #define NODE_GC_DONE(arg0, arg1, arg2) #endif +#include "env-inl.h" #include "node_errors.h" #include <cstring> diff --git a/src/node_env_var.cc b/src/node_env_var.cc index abcf9185065..4b398ce7cd8 100644 --- a/src/node_env_var.cc +++ b/src/node_env_var.cc @@ -1,6 +1,6 @@ +#include "env-inl.h" #include "node_errors.h" #include "node_process.h" -#include "util.h" #ifdef __APPLE__ #include <crt_externs.h> diff --git a/src/node_errors.cc b/src/node_errors.cc index e2cd65b4efc..1cd90523830 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -8,6 +8,7 @@ #endif #include "node_process.h" #include "node_v8_platform-inl.h" +#include "util-inl.h" namespace node { diff --git a/src/node_errors.h b/src/node_errors.h index 49575f0bd19..7162d05c1a0 100644 --- a/src/node_errors.h +++ b/src/node_errors.h @@ -4,8 +4,8 @@ #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #include "node.h" -#include "util-inl.h" -#include "env-inl.h" +#include "util.h" +#include "env.h" #include "v8.h" // Use ostringstream to print exact-width integer types diff --git a/src/node_file.cc b/src/node_file.cc index 36463c9e6f0..4da2a4f53cb 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -24,7 +24,7 @@ #include "node_buffer.h" #include "node_process.h" #include "node_stat_watcher.h" -#include "util.h" +#include "util-inl.h" #include "tracing/trace_event.h" diff --git a/src/node_http2.cc b/src/node_http2.cc index 55cee019b08..0c650290c2b 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -5,7 +5,7 @@ #include "node_http2.h" #include "node_http2_state.h" #include "node_perf.h" -#include "util.h" +#include "util-inl.h" #include <algorithm> diff --git a/src/node_http_parser_llhttp.cc b/src/node_http_parser_llhttp.cc index 423fb5e104b..d2063873f17 100644 --- a/src/node_http_parser_llhttp.cc +++ b/src/node_http_parser_llhttp.cc @@ -2,6 +2,7 @@ #include "node_http_parser_impl.h" #include "node_metadata.h" +#include "util-inl.h" namespace node { diff --git a/src/node_http_parser_traditional.cc b/src/node_http_parser_traditional.cc index 89ef65979ca..7b413af8b6c 100644 --- a/src/node_http_parser_traditional.cc +++ b/src/node_http_parser_traditional.cc @@ -4,6 +4,7 @@ #include "node_http_parser_impl.h" #include "node_metadata.h" +#include "util-inl.h" namespace node { namespace per_process { diff --git a/src/node_internals.h b/src/node_internals.h index 5e99ac4c66a..91cc0efd508 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -29,7 +29,7 @@ #include "node_binding.h" #include "node_mutex.h" #include "tracing/trace_event.h" -#include "util-inl.h" +#include "util.h" #include "uv.h" #include "v8.h" diff --git a/src/node_main_instance.cc b/src/node_main_instance.cc index 977a689a359..f4f20f43222 100644 --- a/src/node_main_instance.cc +++ b/src/node_main_instance.cc @@ -2,6 +2,7 @@ #include "node_internals.h" #include "node_options-inl.h" #include "node_v8_platform-inl.h" +#include "util-inl.h" namespace node { diff --git a/src/node_messaging.cc b/src/node_messaging.cc index 77ed959477f..c7d0b327003 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -6,7 +6,7 @@ #include "node_buffer.h" #include "node_errors.h" #include "node_process.h" -#include "util.h" +#include "util-inl.h" using node::contextify::ContextifyContext; using v8::Array; diff --git a/src/node_os.cc b/src/node_os.cc index 5dd31469004..d2387f2dc96 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -21,7 +21,6 @@ #include "env-inl.h" #include "string_bytes.h" -#include "util.h" #ifdef __MINGW32__ # include <io.h> diff --git a/src/node_perf.cc b/src/node_perf.cc index 8f982049c77..08632020300 100644 --- a/src/node_perf.cc +++ b/src/node_perf.cc @@ -3,6 +3,7 @@ #include "node_perf.h" #include "node_buffer.h" #include "node_process.h" +#include "util-inl.h" #include <cinttypes> diff --git a/src/node_platform.cc b/src/node_platform.cc index 8c097c03c7d..406146b841e 100644 --- a/src/node_platform.cc +++ b/src/node_platform.cc @@ -3,7 +3,6 @@ #include "env-inl.h" #include "debug_utils.h" -#include "util.h" #include <algorithm> #include <cmath> #include <memory> diff --git a/src/node_report_module.cc b/src/node_report_module.cc index f303685adbb..f35d23a06e3 100644 --- a/src/node_report_module.cc +++ b/src/node_report_module.cc @@ -3,7 +3,7 @@ #include "node_internals.h" #include "node_options.h" #include "node_report.h" -#include "util.h" +#include "util-inl.h" #include "handle_wrap.h" #include "node_buffer.h" diff --git a/src/node_report_utils.cc b/src/node_report_utils.cc index 24f3b6175d5..33d7c52b34f 100644 --- a/src/node_report_utils.cc +++ b/src/node_report_utils.cc @@ -1,5 +1,6 @@ #include "node_internals.h" #include "node_report.h" +#include "util-inl.h" namespace report { diff --git a/src/node_serdes.cc b/src/node_serdes.cc index 6e4bab5ce18..41ee8afd8cb 100644 --- a/src/node_serdes.cc +++ b/src/node_serdes.cc @@ -1,6 +1,7 @@ #include "node_internals.h" #include "node_buffer.h" #include "node_errors.h" +#include "util-inl.h" #include "base_object-inl.h" namespace node { diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc index e4346678c01..b7fb45900f9 100644 --- a/src/node_stat_watcher.cc +++ b/src/node_stat_watcher.cc @@ -23,7 +23,7 @@ #include "async_wrap-inl.h" #include "env.h" #include "node_file.h" -#include "util.h" +#include "util-inl.h" #include <cstring> #include <cstdlib> diff --git a/src/node_symbols.cc b/src/node_symbols.cc index af660b0a8e8..cb6c5583bb8 100644 --- a/src/node_symbols.cc +++ b/src/node_symbols.cc @@ -1,5 +1,6 @@ #include "env-inl.h" #include "node_binding.h" +#include "util.h" namespace node { diff --git a/src/node_task_queue.cc b/src/node_task_queue.cc index af1d96fab22..a277b8bd2ab 100644 --- a/src/node_task_queue.cc +++ b/src/node_task_queue.cc @@ -3,6 +3,7 @@ #include "node_errors.h" #include "node_internals.h" #include "node_process.h" +#include "util-inl.h" #include "v8.h" #include <atomic> diff --git a/src/node_trace_events.cc b/src/node_trace_events.cc index 74ba5bb4800..13072a3340c 100644 --- a/src/node_trace_events.cc +++ b/src/node_trace_events.cc @@ -4,6 +4,7 @@ #include "node_internals.h" #include "node_v8_platform-inl.h" #include "tracing/agent.h" +#include "util-inl.h" #include <set> #include <string> diff --git a/src/node_url.cc b/src/node_url.cc index e5e9eff74ce..6565688d02e 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -2,7 +2,7 @@ #include "base_object-inl.h" #include "node_errors.h" #include "node_i18n.h" -#include "util.h" +#include "util-inl.h" #include <cmath> #include <cstdio> diff --git a/src/node_util.cc b/src/node_util.cc index 0c498e2838c..9e506f0e657 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -1,5 +1,5 @@ #include "node_errors.h" -#include "util.h" +#include "util-inl.h" #include "base_object-inl.h" namespace node { diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index 482d590a521..7c62aafa822 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -24,6 +24,7 @@ #include "debug_utils.h" #include "node_errors.h" #include "node_internals.h" +#include "util-inl.h" namespace node { diff --git a/src/node_worker.cc b/src/node_worker.cc index f95407a5ed4..20b883664da 100644 --- a/src/node_worker.cc +++ b/src/node_worker.cc @@ -4,7 +4,7 @@ #include "node_buffer.h" #include "node_options-inl.h" #include "node_perf.h" -#include "util.h" +#include "util-inl.h" #include "async_wrap-inl.h" #if NODE_USE_V8_PLATFORM && HAVE_INSPECTOR diff --git a/src/req_wrap-inl.h b/src/req_wrap-inl.h index 5fb96541483..cf89fb58a7f 100644 --- a/src/req_wrap-inl.h +++ b/src/req_wrap-inl.h @@ -5,8 +5,6 @@ #include "req_wrap.h" #include "async_wrap-inl.h" -#include "env-inl.h" -#include "util-inl.h" #include "uv.h" namespace node { diff --git a/src/sharedarraybuffer_metadata.cc b/src/sharedarraybuffer_metadata.cc index 722a20065f3..9ba604b5067 100644 --- a/src/sharedarraybuffer_metadata.cc +++ b/src/sharedarraybuffer_metadata.cc @@ -2,6 +2,7 @@ #include "base_object-inl.h" #include "node_errors.h" +#include "util-inl.h" #include <utility> diff --git a/src/spawn_sync.cc b/src/spawn_sync.cc index 4c8885f04a7..0751bc21a7e 100644 --- a/src/spawn_sync.cc +++ b/src/spawn_sync.cc @@ -24,6 +24,7 @@ #include "env-inl.h" #include "node_internals.h" #include "string_bytes.h" +#include "util-inl.h" #include <cstring> diff --git a/src/stream_pipe.cc b/src/stream_pipe.cc index bacf8fe771c..a6b975ab26a 100644 --- a/src/stream_pipe.cc +++ b/src/stream_pipe.cc @@ -1,6 +1,7 @@ #include "stream_pipe.h" #include "stream_base-inl.h" #include "node_buffer.h" +#include "util-inl.h" using v8::Context; using v8::Function; diff --git a/src/string_decoder.cc b/src/string_decoder.cc index 210983de2ae..6ec84e0e11e 100644 --- a/src/string_decoder.cc +++ b/src/string_decoder.cc @@ -4,6 +4,7 @@ #include "env-inl.h" #include "node_buffer.h" #include "string_bytes.h" +#include "util.h" using v8::Array; using v8::ArrayBufferView; diff --git a/src/timers.cc b/src/timers.cc index ef07d908f47..f35ae1cf649 100644 --- a/src/timers.cc +++ b/src/timers.cc @@ -1,5 +1,5 @@ #include "env-inl.h" -#include "util.h" +#include "util-inl.h" #include "v8.h" #include <cstdint> diff --git a/src/util.cc b/src/util.cc index 78ac680f39c..51f11b45396 100644 --- a/src/util.cc +++ b/src/util.cc @@ -19,7 +19,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. -#include "util.h" +#include "util.h" // NOLINT(build/include_inline) +#include "util-inl.h" #include "node_buffer.h" #include "node_errors.h" diff --git a/src/uv.cc b/src/uv.cc index 0c937e876ff..bf50c88111f 100644 --- a/src/uv.cc +++ b/src/uv.cc @@ -23,7 +23,6 @@ #include "env-inl.h" #include "node.h" #include "node_process.h" -#include "util.h" namespace node { |