[njs] Renamed functions related to lambda.

Dmitry Volyntsev xeioex at nginx.com
Thu Jan 10 17:25:02 UTC 2019


details:   https://hg.nginx.org/njs/rev/ecf08b8a7dbe
branches:  
changeset: 723:ecf08b8a7dbe
user:      hongzhidao <hongzhidao at gmail.com>
date:      Tue Jan 08 07:04:24 2019 +0800
description:
Renamed functions related to lambda.

diffstat:

 njs/njs_function.c |  8 ++++----
 njs/njs_function.h |  5 +++--
 njs/njs_vm.c       |  7 ++++---
 3 files changed, 11 insertions(+), 9 deletions(-)

diffs (81 lines):

diff -r 7029ec713458 -r ecf08b8a7dbe njs/njs_function.c
--- a/njs/njs_function.c	Tue Jan 08 06:14:36 2019 +0800
+++ b/njs/njs_function.c	Tue Jan 08 07:04:24 2019 +0800
@@ -266,7 +266,7 @@ njs_function_native_frame(njs_vm_t *vm, 
 
 
 nxt_noinline njs_ret_t
-njs_function_frame(njs_vm_t *vm, njs_function_t *function,
+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)
 {
@@ -393,7 +393,7 @@ njs_function_frame_alloc(njs_vm_t *vm, s
 
 
 nxt_noinline njs_ret_t
-njs_function_call(njs_vm_t *vm, njs_index_t retval, size_t advance)
+njs_function_lambda_call(njs_vm_t *vm, njs_index_t retval, size_t advance)
 {
     size_t                 size;
     njs_ret_t              ret;
@@ -968,13 +968,13 @@ njs_function_activate(njs_vm_t *vm, njs_
         return NJS_APPLIED;
     }
 
-    ret = njs_function_frame(vm, function, this, args, nargs, 0);
+    ret = njs_function_lambda_frame(vm, function, this, args, nargs, 0);
 
     if (nxt_slow_path(ret != NXT_OK)) {
         return ret;
     }
 
-    return njs_function_call(vm, retval, advance);
+    return njs_function_lambda_call(vm, retval, advance);
 }
 
 
diff -r 7029ec713458 -r ecf08b8a7dbe njs/njs_function.h
--- a/njs/njs_function.h	Tue Jan 08 06:14:36 2019 +0800
+++ b/njs/njs_function.h	Tue Jan 08 07:04:24 2019 +0800
@@ -165,13 +165,14 @@ njs_ret_t njs_function_constructor(njs_v
 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);
-njs_ret_t njs_function_frame(njs_vm_t *vm, njs_function_t *function,
+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);
 njs_ret_t njs_function_activate(njs_vm_t *vm, njs_function_t *function,
     const njs_value_t *this, const njs_value_t *args, nxt_uint_t nargs,
     njs_index_t retval, size_t advance);
-njs_ret_t njs_function_call(njs_vm_t *vm, njs_index_t retval, size_t advance);
+njs_ret_t njs_function_lambda_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);
diff -r 7029ec713458 -r ecf08b8a7dbe njs/njs_vm.c
--- a/njs/njs_vm.c	Tue Jan 08 06:14:36 2019 +0800
+++ b/njs/njs_vm.c	Tue Jan 08 07:04:24 2019 +0800
@@ -1878,7 +1878,8 @@ njs_function_frame_create(njs_vm_t *vm, 
                 this = &val;
             }
 
-            return njs_function_frame(vm, function, this, NULL, nargs, ctor);
+            return njs_function_lambda_frame(vm, function, this, NULL,
+                                             nargs, ctor);
         }
 
         if (!ctor || function->ctor) {
@@ -2029,8 +2030,8 @@ njs_vmcode_function_call(njs_vm_t *vm, n
     function = frame->function;
 
     if (!function->native) {
-        ret = njs_function_call(vm, (njs_index_t) retval,
-                                sizeof(njs_vmcode_function_call_t));
+        ret = njs_function_lambda_call(vm, (njs_index_t) retval,
+                                       sizeof(njs_vmcode_function_call_t));
 
         if (nxt_fast_path(ret != NJS_ERROR)) {
             return 0;


More information about the nginx-devel mailing list