[njs] Improved an argument name of njs_function_frame().

Dmitry Volyntsev xeioex at nginx.com
Fri Jan 11 16:20:29 UTC 2019


details:   https://hg.nginx.org/njs/rev/fb2c2bca61c2
branches:  
changeset: 727:fb2c2bca61c2
user:      hongzhidao <hongzhidao at gmail.com>
date:      Fri Jan 11 19:20:38 2019 +0800
description:
Improved an argument name of njs_function_frame().

diffstat:

 njs/njs_function.c |  8 ++++----
 njs/njs_function.h |  6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r 8fb687d866de -r fb2c2bca61c2 njs/njs_function.c
--- a/njs/njs_function.c	Fri Jan 11 18:57:57 2019 +0800
+++ b/njs/njs_function.c	Fri Jan 11 19:20:38 2019 +0800
@@ -216,16 +216,16 @@ njs_function_arguments_thrower(njs_vm_t 
 njs_ret_t
 njs_function_native_frame(njs_vm_t *vm, njs_function_t *function,
     const njs_value_t *this, const njs_value_t *args, nxt_uint_t nargs,
-    size_t reserve, nxt_bool_t ctor)
+    size_t continuation_size, nxt_bool_t ctor)
 {
     size_t              size;
     nxt_uint_t          n;
     njs_value_t         *value, *bound;
     njs_native_frame_t  *frame;
 
-    reserve = nxt_max(reserve, function->continuation_size);
+    continuation_size = nxt_max(continuation_size, function->continuation_size);
 
-    size = NJS_NATIVE_FRAME_SIZE + reserve
+    size = NJS_NATIVE_FRAME_SIZE + continuation_size
            + (function->args_offset + nargs) * sizeof(njs_value_t);
 
     frame = njs_function_frame_alloc(vm, size);
@@ -237,7 +237,7 @@ njs_function_native_frame(njs_vm_t *vm, 
     frame->nargs = function->args_offset + nargs;
     frame->ctor = ctor;
 
-    value = (njs_value_t *) (njs_continuation(frame) + reserve);
+    value = (njs_value_t *) (njs_continuation(frame) + continuation_size);
     frame->arguments = value;
 
     bound = function->bound;
diff -r 8fb687d866de -r fb2c2bca61c2 njs/njs_function.h
--- a/njs/njs_function.h	Fri Jan 11 18:57:57 2019 +0800
+++ b/njs/njs_function.h	Fri Jan 11 19:20:38 2019 +0800
@@ -163,7 +163,7 @@ njs_ret_t njs_function_constructor(njs_v
     nxt_uint_t nargs, njs_index_t unused);
 njs_ret_t njs_function_native_frame(njs_vm_t *vm, njs_function_t *function,
     const njs_value_t *this, const njs_value_t *args, nxt_uint_t nargs,
-    size_t reserve, nxt_bool_t ctor);
+    size_t continuation_size, nxt_bool_t ctor);
 njs_ret_t njs_function_lambda_frame(njs_vm_t *vm, njs_function_t *function,
     const njs_value_t *this, const njs_value_t *args, nxt_uint_t nargs,
     nxt_bool_t ctor);
@@ -181,11 +181,11 @@ void njs_function_frame_free(njs_vm_t *v
 nxt_inline njs_ret_t
 njs_function_frame(njs_vm_t *vm, njs_function_t *function,
     const njs_value_t *this, const njs_value_t *args, nxt_uint_t nargs,
-    size_t reserve, nxt_bool_t ctor)
+    size_t continuation_size, nxt_bool_t ctor)
 {
     if (function->native) {
         return njs_function_native_frame(vm, function, this, args, nargs,
-                                         reserve, ctor);
+                                         continuation_size, ctor);
 
     } else {
         return njs_function_lambda_frame(vm, function, this, args, nargs, ctor);


More information about the nginx-devel mailing list