[njs] Generator: removing njs_generate_children_indexes_release_pop().
Dmitry Volyntsev
xeioex at nginx.com
Wed Dec 8 13:16:55 UTC 2021
details: https://hg.nginx.org/njs/rev/00b5f28f2ec7
branches:
changeset: 1763:00b5f28f2ec7
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Wed Dec 08 13:14:59 2021 +0000
description:
Generator: removing njs_generate_children_indexes_release_pop().
diffstat:
src/njs_generator.c | 33 +++++++++++++--------------------
1 files changed, 13 insertions(+), 20 deletions(-)
diffs (71 lines):
diff -r 58786d97f25f -r 00b5f28f2ec7 src/njs_generator.c
--- a/src/njs_generator.c Wed Dec 08 13:14:58 2021 +0000
+++ b/src/njs_generator.c Wed Dec 08 13:14:59 2021 +0000
@@ -348,8 +348,6 @@ static njs_index_t njs_generate_temp_ind
njs_generator_t *generator, njs_parser_node_t *node);
static njs_int_t njs_generate_children_indexes_release(njs_vm_t *vm,
njs_generator_t *generator, njs_parser_node_t *node);
-static njs_int_t njs_generate_children_indexes_release_pop(njs_vm_t *vm,
- njs_generator_t *generator, njs_parser_node_t *node);
static njs_int_t njs_generate_node_index_release(njs_vm_t *vm,
njs_generator_t *generator, njs_parser_node_t *node);
static njs_int_t njs_generate_node_index_release_pop(njs_vm_t *vm,
@@ -2700,6 +2698,7 @@ static njs_int_t
njs_generate_assignment_end(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
+ njs_int_t ret;
njs_parser_node_t *lvalue, *expr, *object, *property;
njs_vmcode_prop_set_t *prop_set;
@@ -2733,7 +2732,12 @@ njs_generate_assignment_end(njs_vm_t *vm
node->index = expr->index;
node->temporary = expr->temporary;
- return njs_generate_children_indexes_release_pop(vm, generator, lvalue);
+ ret = njs_generate_children_indexes_release(vm, generator, lvalue);
+ if (njs_slow_path(ret != NJS_OK)) {
+ return ret;
+ }
+
+ return njs_generator_stack_pop(vm, generator, NULL);
}
@@ -3573,7 +3577,12 @@ found:
njs_mp_free(vm->mem_pool, generator->context);
- return njs_generate_children_indexes_release_pop(vm, generator, lvalue);
+ ret = njs_generate_children_indexes_release(vm, generator, lvalue);
+ if (njs_slow_path(ret != NJS_OK)) {
+ return ret;
+ }
+
+ return njs_generator_stack_pop(vm, generator, NULL);
}
@@ -4938,22 +4947,6 @@ njs_generate_children_indexes_release(nj
static njs_int_t
-njs_generate_children_indexes_release_pop(njs_vm_t *vm,
- njs_generator_t *generator, njs_parser_node_t *node)
-{
- njs_int_t ret;
-
- ret = njs_generate_node_index_release(vm, generator, node->left);
-
- if (njs_fast_path(ret == NJS_OK)) {
- return njs_generate_node_index_release_pop(vm, generator, node->right);
- }
-
- return ret;
-}
-
-
-static njs_int_t
njs_generate_node_index_release(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
More information about the nginx-devel
mailing list