[njs] Inlined njs_function_previous_frame().

Dmitry Volyntsev xeioex at nginx.com
Thu Jan 10 14:31:01 UTC 2019


details:   https://hg.nginx.org/njs/rev/57b89039ff23
branches:  
changeset: 718:57b89039ff23
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Thu Jan 10 17:30:30 2019 +0300
description:
Inlined njs_function_previous_frame().

diffstat:

 njs/njs_function.c |  15 ---------------
 njs/njs_function.h |  17 ++++++++++++++++-
 2 files changed, 16 insertions(+), 16 deletions(-)

diffs (54 lines):

diff -r 0da53bc8472b -r 57b89039ff23 njs/njs_function.c
--- a/njs/njs_function.c	Tue Jan 08 04:04:02 2019 +0800
+++ b/njs/njs_function.c	Thu Jan 10 17:30:30 2019 +0300
@@ -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 -r 0da53bc8472b -r 57b89039ff23 njs/njs_function.h
--- a/njs/njs_function.h	Tue Jan 08 04:04:02 2019 +0800
+++ b/njs/njs_function.h	Thu Jan 10 17:30:30 2019 +0300
@@ -174,9 +174,24 @@ njs_ret_t njs_function_call(njs_vm_t *vm
 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;
 


More information about the nginx-devel mailing list