From: hongzhidao Date: Mon, 7 Jan 2019 23:04:24 +0000 (+0800) Subject: Renamed functions related to lambda. X-Git-Tag: 0.2.8~79 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=f85e1b314bb8e6f10a06df1bf9ecdfbd6c896341;p=njs.git Renamed functions related to lambda. --- diff --git a/njs/njs_function.c b/njs/njs_function.c index 27b6f238..52395e0b 100644 --- a/njs/njs_function.c +++ b/njs/njs_function.c @@ -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); } diff --git a/njs/njs_function.h b/njs/njs_function.h index ef5bfc15..a0f57a16 100644 --- a/njs/njs_function.h +++ b/njs/njs_function.h @@ -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); diff --git a/njs/njs_vm.c b/njs/njs_vm.c index 289012ae..4475b261 100644 --- a/njs/njs_vm.c +++ b/njs/njs_vm.c @@ -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;