[njs] Removed unused things.

Igor Sysoev igor at sysoev.ru
Thu Jan 5 13:19:49 UTC 2017


details:   http://hg.nginx.org/njs/rev/e4f695e81689
branches:  
changeset: 299:e4f695e81689
user:      Igor Sysoev <igor at sysoev.ru>
date:      Thu Jan 05 15:55:52 2017 +0300
description:
Removed unused things.

diffstat:

 njs/njs_parser.c |  20 --------------------
 njs/njs_parser.h |   2 --
 njs/njscript.c   |   1 -
 3 files changed, 0 insertions(+), 23 deletions(-)

diffs (60 lines):

diff -r c11a7e133205 -r e4f695e81689 njs/njs_parser.c
--- a/njs/njs_parser.c	Thu Jan 05 15:55:49 2017 +0300
+++ b/njs/njs_parser.c	Thu Jan 05 15:55:52 2017 +0300
@@ -2434,26 +2434,6 @@ invalid:
 }
 
 
-njs_index_t
-njs_parser_index(njs_parser_t *parser, uint32_t scope)
-{
-    nxt_uint_t   n;
-    njs_index_t  index;
-
-    /* Skip absolute scope. */
-    n = scope - NJS_INDEX_CACHE;
-
-    index = parser->index[n];
-    parser->index[n] += sizeof(njs_value_t);
-
-    index |= scope;
-
-    nxt_thread_log_debug("GET %p", index);
-
-    return index;
-}
-
-
 nxt_bool_t
 njs_parser_has_side_effect(njs_parser_node_t *node)
 {
diff -r c11a7e133205 -r e4f695e81689 njs/njs_parser.h
--- a/njs/njs_parser.h	Thu Jan 05 15:55:49 2017 +0300
+++ b/njs/njs_parser.h	Thu Jan 05 15:55:52 2017 +0300
@@ -309,7 +309,6 @@ struct njs_parser_s {
     njs_parser_scope_t              *scope;
 
     nxt_array_t                     *index_cache;
-    njs_index_t                     index[NJS_SCOPES - NJS_INDEX_CACHE];
 
     uint8_t                         branch;       /* 1 bit */
 
@@ -354,7 +353,6 @@ njs_token_t njs_parser_property_name(njs
 njs_token_t njs_parser_property_token(njs_parser_t *parser);
 njs_token_t njs_parser_token(njs_parser_t *parser);
 nxt_int_t njs_parser_string_create(njs_vm_t *vm, njs_value_t *value);
-njs_index_t njs_parser_index(njs_parser_t *parser, uint32_t scope);
 njs_ret_t njs_variable_reference(njs_vm_t *vm, njs_parser_t *parser,
     njs_parser_node_t *node);
 njs_variable_t *njs_variable_get(njs_vm_t *vm, njs_parser_node_t *node,
diff -r c11a7e133205 -r e4f695e81689 njs/njscript.c
--- a/njs/njscript.c	Thu Jan 05 15:55:49 2017 +0300
+++ b/njs/njscript.c	Thu Jan 05 15:55:52 2017 +0300
@@ -213,7 +213,6 @@ njs_vm_compile(njs_vm_t *vm, u_char **st
 
     parser->code_size = sizeof(njs_vmcode_stop_t);
     parser->scope_offset = NJS_INDEX_GLOBAL_OFFSET;
-    parser->index[NJS_SCOPE_GLOBAL - NJS_INDEX_CACHE] = NJS_INDEX_GLOBAL_OFFSET;
 
     node = njs_parser(vm, parser);
     if (nxt_slow_path(node == NULL)) {


More information about the nginx-devel mailing list