]> git.kaiwu.me - njs.git/commitdiff
Renamed functions related to lambda.
authorhongzhidao <hongzhidao@gmail.com>
Mon, 7 Jan 2019 23:04:24 +0000 (07:04 +0800)
committerhongzhidao <hongzhidao@gmail.com>
Mon, 7 Jan 2019 23:04:24 +0000 (07:04 +0800)
njs/njs_function.c
njs/njs_function.h
njs/njs_vm.c

index 27b6f23896af1de1dbf455d35eb4574aec904f2c..52395e0bd5ec68a39f132ac4004014d0ec54343d 100644 (file)
@@ -266,7 +266,7 @@ njs_function_native_frame(njs_vm_t *vm, njs_function_t *function,
 
 
 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, size_t size)
 
 
 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_function_t *function,
         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);
 }
 
 
index ef5bfc15c53ccfdbcbe4c7b296884aeb46f3f395..a0f57a1633bbe3e6baad899cec49525977150f16 100644 (file)
@@ -165,13 +165,14 @@ njs_ret_t njs_function_constructor(njs_vm_t *vm, njs_value_t *args,
 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);
index 289012ae9dd24c06424f4d516123881519932aa0..4475b261c829dc0e04299da150dec20c9f74609d 100644 (file)
@@ -1878,7 +1878,8 @@ njs_function_frame_create(njs_vm_t *vm, njs_value_t *value,
                 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, njs_value_t *invld, njs_value_t *retval)
     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;