Welcome! Log In Create A New Profile

Advanced

[njs] Inlined njs_function_previous_frame().

Dmitry Volyntsev
January 10, 2019 09:32AM
details: https://hg.nginx.org/njs/rev/57b89039ff23
branches:
changeset: 718:57b89039ff23
user: Dmitry Volyntsev <xeioex@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;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Inlined njs_function_previous_frame().

Dmitry Volyntsev 261 January 10, 2019 09:32AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 299
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready