未验证 提交 5978738b 编写于 作者: A Adeel Mujahid 提交者: GitHub

Delete unused native code in src/native (#67087)

* Delete unused native code in src/native

* Delete set_* functions from version types
上级 67f26ca4
......@@ -21,10 +21,6 @@ struct fx_ver_t
int get_minor() const { return m_minor; }
int get_patch() const { return m_patch; }
void set_major(int m) { m_major = m; }
void set_minor(int m) { m_minor = m; }
void set_patch(int p) { m_patch = p; }
bool is_prerelease() const { return !m_pre.empty(); }
bool is_empty() const { return m_major == -1; }
......
......@@ -15,12 +15,7 @@ struct version_t
int get_major() const { return m_major; }
int get_minor() const { return m_minor; }
int get_build() const { return m_build; }
int get_revision() const { return m_revision; }
void set_major(int m) { m_major = m; }
void set_minor(int m) { m_minor = m; }
void set_build(int m) { m_build = m; }
void set_revision(int m) { m_revision = m; }
// int get_revision() const { return m_revision; }
pal::string_t as_str() const;
......
......@@ -117,34 +117,12 @@ ds_ipc_message_try_parse_uint64_t (
uint32_t *buffer_len,
uint64_t *value);
static
inline
bool
ds_ipc_message_try_parse_int64_t (
uint8_t **buffer,
uint32_t *buffer_len,
int64_t *value)
{
return ds_ipc_message_try_parse_uint64_t (buffer, buffer_len, (uint64_t *)value);
}
bool
ds_ipc_message_try_parse_uint32_t (
uint8_t **buffer,
uint32_t *buffer_len,
uint32_t *value);
static
inline
bool
ds_ipc_message_try_parse_int32_t (
uint8_t **buffer,
uint32_t *buffer_len,
int32_t *value)
{
return ds_ipc_message_try_parse_uint32_t (buffer, buffer_len, (uint32_t *)value);
}
bool
ds_ipc_message_try_parse_string_utf16_t_byte_array_alloc (
uint8_t **buffer,
......@@ -181,17 +159,6 @@ ds_ipc_message_initialize_header_uint64_t_payload (
const DiagnosticsIpcHeader *header,
uint64_t payload);
static
inline
bool
ds_ipc_message_initialize_header_int64_t_payload (
DiagnosticsIpcMessage *message,
const DiagnosticsIpcHeader *header,
int64_t payload)
{
return ds_ipc_message_initialize_header_uint64_t_payload (message, header, (uint64_t)payload);
}
bool
ds_ipc_message_initialize_buffer (
DiagnosticsIpcMessage *message,
......
......@@ -76,14 +76,6 @@ sample_profiler_store_profiling_enabled (bool enabled)
ep_rt_volatile_store_uint32_t (&_profiling_enabled, enabled ? 1 : 0);
}
static
inline
bool
sample_profiler_load_can_start_sampling (void)
{
return (ep_rt_volatile_load_uint32_t (&_can_start_sampling) != 0) ? true : false;
}
static
inline
void
......
......@@ -109,20 +109,6 @@ ep_stack_contents_get_length (EventPipeStackContents *stack_contents)
return ep_stack_contents_get_next_available_frame (stack_contents);
}
static
inline
uintptr_t
ep_stack_contents_get_ip (
EventPipeStackContents *stack_contents,
uint32_t frame_index)
{
EP_ASSERT (frame_index < EP_MAX_STACK_DEPTH);
if (frame_index >= EP_MAX_STACK_DEPTH)
return 0;
return ep_stack_contents_get_stack_frames_cref (stack_contents)[frame_index];
}
#ifdef EP_CHECKED_BUILD
static
inline
......
......@@ -41,14 +41,6 @@ ep_volatile_store_eventpipe_state (EventPipeState state)
ep_rt_volatile_store_uint32_t ((volatile uint32_t *)&_ep_state, state);
}
static
inline
void
ep_volatile_store_eventpipe_state_without_barrier (EventPipeState state)
{
ep_rt_volatile_store_uint32_t_without_barrier ((volatile uint32_t *)&_ep_state, state);
}
static
inline
EventPipeSession *
......@@ -73,14 +65,6 @@ ep_volatile_store_session (size_t index, EventPipeSession *session)
ep_rt_volatile_store_ptr ((volatile void **)(&_ep_sessions [index]), session);
}
static
inline
void
ep_volatile_store_session_without_barrier (size_t index, EventPipeSession *session)
{
ep_rt_volatile_store_ptr_without_barrier ((volatile void **)(&_ep_sessions [index]), session);
}
static
inline
uint32_t
......@@ -105,14 +89,6 @@ ep_volatile_store_number_of_sessions (uint32_t number_of_sessions)
ep_rt_volatile_store_uint32_t (&_ep_number_of_sessions, number_of_sessions);
}
static
inline
void
ep_volatile_store_number_of_sessions_without_barrier (uint32_t number_of_sessions)
{
ep_rt_volatile_store_uint32_t_without_barrier (&_ep_number_of_sessions, number_of_sessions);
}
static
inline
uint64_t
......@@ -121,14 +97,6 @@ ep_volatile_load_allow_write (void)
return ep_rt_volatile_load_uint64_t (&_ep_allow_write);
}
static
inline
uint64_t
ep_volatile_load_allow_write_without_barrier (void)
{
return ep_rt_volatile_load_uint64_t_without_barrier (&_ep_allow_write);
}
static
inline
void
......@@ -137,14 +105,6 @@ ep_volatile_store_allow_write (uint64_t allow_write)
ep_rt_volatile_store_uint64_t (&_ep_allow_write, allow_write);
}
static
inline
void
ep_volatile_store_allow_write_without_barrier (uint64_t allow_write)
{
ep_rt_volatile_store_uint64_t_without_barrier (&_ep_allow_write, allow_write);
}
/*
* EventPipe.
*/
......@@ -276,18 +236,6 @@ ep_walk_managed_stack_for_current_thread (EventPipeStackContents *stack_contents
return (thread != NULL) ? ep_rt_walk_managed_stack_for_thread (thread, stack_contents) : false;
}
static
inline
bool
ep_walk_managed_stack_for_thread (ep_rt_thread_handle_t thread, EventPipeStackContents *stack_contents)
{
EP_ASSERT (thread != NULL);
EP_ASSERT (stack_contents != NULL);
ep_stack_contents_reset (stack_contents);
return (thread != NULL) ? ep_rt_walk_managed_stack_for_thread (thread, stack_contents) : false;
}
bool
ep_add_rundown_execution_checkpoint (
const ep_char8_t *name,
......
......@@ -33,8 +33,6 @@
#cmakedefine01 HAVE_NON_LEGACY_STATFS
#cmakedefine01 HAVE_STRCPY_S
#cmakedefine01 HAVE_STRLCPY
#cmakedefine01 HAVE_STRCAT_S
#cmakedefine01 HAVE_STRLCAT
#cmakedefine01 HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP
#cmakedefine01 HAVE_POSIX_ADVISE
#cmakedefine01 HAVE_FALLOCATE
......
......@@ -68,24 +68,6 @@ inline static void SafeStringCopy(char* destination, size_t destinationSize, con
#endif
}
/**
* Abstraction helper method to safely copy strings using strlcpy or strcpy_s
* or a different safe copy method, depending on the current platform.
*/
inline static void SafeStringConcat(char* destination, size_t destinationSize, const char* str1, const char* str2)
{
memset(destination, 0, destinationSize);
#if HAVE_STRCAT_S
strcat_s(destination, destinationSize, str1);
strcat_s(destination, destinationSize, str2);
#elif HAVE_STRLCAT
strlcat(destination, str1, destinationSize);
strlcat(destination, str2, destinationSize);
#else
snprintf(destination, destinationSize, "%s%s", str1, str2);
#endif
}
/**
* Converts an intptr_t to a file descriptor.
* intptr_t is the type used to marshal file descriptors so we can use SafeHandles effectively.
......
......@@ -226,16 +226,6 @@ check_symbol_exists(
string.h
HAVE_STRCPY_S)
check_symbol_exists(
strlcpy
string.h
HAVE_STRLCPY)
check_symbol_exists(
strcat_s
string.h
HAVE_STRCAT_S)
check_symbol_exists(
strlcat
string.h
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册