Welcome! Log In Create A New Profile

Advanced

[njs] Refactored njs_function_frame_free.

Dmitry Volyntsev
January 09, 2019 10:26AM
details: https://hg.nginx.org/njs/rev/0e7fc17f6071
branches:
changeset: 715:0e7fc17f6071
user: hongzhidao <hongzhidao@gmail.com>
date: Mon Jan 07 17:42:00 2019 +0800
description:
Refactored njs_function_frame_free.

diffstat:

njs/njs_vm.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r d0ba2a63eb5a -r 0e7fc17f6071 njs/njs_vm.c
--- a/njs/njs_vm.c Mon Jan 07 17:40:48 2019 +0800
+++ b/njs/njs_vm.c Mon Jan 07 17:42:00 2019 +0800
@@ -38,7 +38,7 @@ static njs_ret_t njs_vmcode_continuation
njs_value_t *invld2);
static njs_native_frame_t *
njs_function_previous_frame(njs_native_frame_t *frame);
-static njs_ret_t njs_function_frame_free(njs_vm_t *vm,
+static void njs_function_frame_free(njs_vm_t *vm,
njs_native_frame_t *frame);

static void njs_vm_trap(njs_vm_t *vm, njs_trap_t trap, njs_value_t *value1,
@@ -2080,7 +2080,7 @@ njs_vmcode_function_call(njs_vm_t *vm, n
frame = vm->top_frame;

vm->top_frame = njs_function_previous_frame(frame);
- (void) njs_function_frame_free(vm, frame);
+ njs_function_frame_free(vm, frame);

/*
* If a retval is in a callee arguments scope it
@@ -2398,7 +2398,9 @@ njs_vmcode_return(njs_vm_t *vm, njs_valu

vm->current = frame->return_address;

- return njs_function_frame_free(vm, &frame->native);
+ njs_function_frame_free(vm, &frame->native);
+
+ return 0;
}


@@ -2544,7 +2546,7 @@ njs_function_previous_frame(njs_native_f
}


-static njs_ret_t
+static void
njs_function_frame_free(njs_vm_t *vm, njs_native_frame_t *frame)
{
njs_native_frame_t *previous;
@@ -2562,8 +2564,6 @@ njs_function_frame_free(njs_vm_t *vm, nj
frame = previous;

} while (frame->skip);
-
- return 0;
}


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

[njs] Refactored njs_function_frame_free.

Dmitry Volyntsev 351 January 09, 2019 10:26AM



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

Online Users

Guests: 279
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