August 08, 2017 11:08AM
details: http://hg.nginx.org/njs/rev/e2baf506be4c
branches:
changeset: 391:e2baf506be4c
user: Igor Sysoev <igor@sysoev.ru>
date: Tue Aug 08 17:47:53 2017 +0300
description:
Style fixes.

diffstat:

njs/njs_generator.c | 5 +----
njs/njs_variable.c | 3 ---
2 files changed, 1 insertions(+), 7 deletions(-)

diffs (59 lines):

diff -r c347ea0bbdd6 -r e2baf506be4c njs/njs_generator.c
--- a/njs/njs_generator.c Tue Jul 18 19:25:50 2017 +0300
+++ b/njs/njs_generator.c Tue Aug 08 17:47:53 2017 +0300
@@ -380,7 +380,7 @@ njs_generate_builtin_object(njs_vm_t *vm

node->index = njs_generator_dest_index(vm, parser, node);
if (nxt_slow_path(node->index == NJS_INDEX_ERROR)) {
- return node->index;
+ return NXT_ERROR;
}

njs_generate_code(parser, njs_vmcode_object_copy_t, copy);
@@ -2541,13 +2541,11 @@ njs_generator_temp_index_get(njs_vm_t *v
}

if (vm->accumulative && scope->type == NJS_SCOPE_GLOBAL) {
-
/*
* When non-clonable VM runs in accumulative mode
* all global variables are allocated in absolute scope
* to simplify global scope handling.
*/
-
value = nxt_mem_cache_align(vm->mem_cache_pool, sizeof(njs_value_t),
sizeof(njs_value_t));
if (nxt_slow_path(value == NULL)) {
@@ -2557,7 +2555,6 @@ njs_generator_temp_index_get(njs_vm_t *v
index = (njs_index_t) value;

} else {
-
value = nxt_array_add(scope->values[0], &njs_array_mem_proto,
vm->mem_cache_pool);
if (nxt_slow_path(value == NULL)) {
diff -r c347ea0bbdd6 -r e2baf506be4c njs/njs_variable.c
--- a/njs/njs_variable.c Tue Jul 18 19:25:50 2017 +0300
+++ b/njs/njs_variable.c Tue Aug 08 17:47:53 2017 +0300
@@ -356,13 +356,11 @@ njs_variable_get(njs_vm_t *vm, njs_parse
}

if (vm->accumulative && vs.scope->type == NJS_SCOPE_GLOBAL) {
-
/*
* When non-clonable VM runs in accumulative mode all
* global variables should be allocated in absolute scope
* to share them among consecutive VM invocations.
*/
-
value = nxt_mem_cache_align(vm->mem_cache_pool, sizeof(njs_value_t),
sizeof(njs_value_t));
if (nxt_slow_path(value == NULL)) {
@@ -391,7 +389,6 @@ njs_variable_get(njs_vm_t *vm, njs_parse

index = vs.scope->next_index[n];
vs.scope->next_index[n] += sizeof(njs_value_t);
-
}

if (njs_is_object(&var->value)) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Style fixes.

Igor Sysoev 784 August 08, 2017 11:08AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 247
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready