summaryrefslogtreecommitdiff
path: root/src/node_internals.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_internals.h')
-rw-r--r--src/node_internals.h52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index d0209fedc5..b307019852 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -32,7 +32,6 @@
#include "uv.h"
#include "v8.h"
#include "tracing/trace_event.h"
-#include "node_perf_common.h"
#include "node_api.h"
#include <stdint.h>
@@ -308,57 +307,6 @@ v8::Maybe<bool> ProcessEmitDeprecationWarning(Environment* env,
const char* warning,
const char* deprecation_code);
-template <typename NativeT, typename V8T>
-v8::Local<v8::Value> FillStatsArray(AliasedBuffer<NativeT, V8T>* fields_ptr,
- const uv_stat_t* s, int offset = 0) {
- AliasedBuffer<NativeT, V8T>& fields = *fields_ptr;
- fields[offset + 0] = s->st_dev;
- fields[offset + 1] = s->st_mode;
- fields[offset + 2] = s->st_nlink;
- fields[offset + 3] = s->st_uid;
- fields[offset + 4] = s->st_gid;
- fields[offset + 5] = s->st_rdev;
-#if defined(__POSIX__)
- fields[offset + 6] = s->st_blksize;
-#else
- fields[offset + 6] = 0;
-#endif
- fields[offset + 7] = s->st_ino;
- fields[offset + 8] = s->st_size;
-#if defined(__POSIX__)
- fields[offset + 9] = s->st_blocks;
-#else
- fields[offset + 9] = 0;
-#endif
-// Dates.
-// NO-LINT because the fields are 'long' and we just want to cast to `unsigned`
-#define X(idx, name) \
- /* NOLINTNEXTLINE(runtime/int) */ \
- fields[offset + idx] = ((unsigned long)(s->st_##name.tv_sec) * 1e3) + \
- /* NOLINTNEXTLINE(runtime/int) */ \
- ((unsigned long)(s->st_##name.tv_nsec) / 1e6); \
-
- X(10, atim)
- X(11, mtim)
- X(12, ctim)
- X(13, birthtim)
-#undef X
-
- return fields_ptr->GetJSArray();
-}
-
-inline v8::Local<v8::Value> FillGlobalStatsArray(Environment* env,
- const uv_stat_t* s,
- bool use_bigint = false,
- int offset = 0) {
- if (use_bigint) {
- return node::FillStatsArray(
- env->fs_stats_field_bigint_array(), s, offset);
- } else {
- return node::FillStatsArray(env->fs_stats_field_array(), s, offset);
- }
-}
-
void SetupBootstrapObject(Environment* env,
v8::Local<v8::Object> bootstrapper);
void SetupProcessObject(Environment* env,