From c91f73a202c9f541d7025aba698ff17e1f16edf9 Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Thu, 10 Jan 2019 17:30:30 +0300 Subject: [PATCH] Inlined njs_function_previous_frame(). --- njs/njs_function.c | 15 --------------- njs/njs_function.h | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/njs/njs_function.c b/njs/njs_function.c index 9372227a..4e2b428c 100644 --- a/njs/njs_function.c +++ b/njs/njs_function.c @@ -729,21 +729,6 @@ type_error: } -njs_native_frame_t * -njs_function_previous_frame(njs_native_frame_t *frame) -{ - njs_native_frame_t *previous; - - do { - previous = frame->previous; - frame = previous; - - } while (frame->skip); - - return frame; -} - - void njs_function_frame_free(njs_vm_t *vm, njs_native_frame_t *frame) { diff --git a/njs/njs_function.h b/njs/njs_function.h index ec869726..076cb62c 100644 --- a/njs/njs_function.h +++ b/njs/njs_function.h @@ -174,9 +174,24 @@ njs_ret_t njs_function_call(njs_vm_t *vm, njs_index_t retval, size_t advance); njs_ret_t njs_function_native_call(njs_vm_t *vm, njs_function_native_t native, njs_value_t *args, uint8_t *args_types, nxt_uint_t nargs, njs_index_t retval); -njs_native_frame_t *njs_function_previous_frame(njs_native_frame_t *frame); void njs_function_frame_free(njs_vm_t *vm, njs_native_frame_t *frame); + +nxt_inline njs_native_frame_t * +njs_function_previous_frame(njs_native_frame_t *frame) +{ + njs_native_frame_t *previous; + + do { + previous = frame->previous; + frame = previous; + + } while (frame->skip); + + return frame; +} + + extern const njs_object_init_t njs_function_constructor_init; extern const njs_object_init_t njs_function_prototype_init; -- 2.47.3