]> git.kaiwu.me - njs.git/commitdiff
Inlined njs_function_previous_frame().
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 10 Jan 2019 14:30:30 +0000 (17:30 +0300)
committerDmitry Volyntsev <xeioex@nginx.com>
Thu, 10 Jan 2019 14:30:30 +0000 (17:30 +0300)
njs/njs_function.c
njs/njs_function.h

index 9372227aa5b1627a0ffff5ddaa6def7c9927a1cb..4e2b428c752c9fb905135a48a00dc275cafff434 100644 (file)
@@ -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)
 {
index ec869726e74fe0e9947fe409c13233cdeff64439..076cb62c44ca61b42470e5061df32a88be134fd3 100644 (file)
@@ -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;