From 2c1c974ec5fd8c4d5d1db97d4ad28765fdbf07e9 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 5 Jan 2017 15:55:52 +0300 Subject: [PATCH] Removed unused things. --- njs/njs_parser.c | 20 -------------------- njs/njs_parser.h | 2 -- njs/njscript.c | 1 - 3 files changed, 23 deletions(-) diff --git a/njs/njs_parser.c b/njs/njs_parser.c index 8fb2c182..b2ada199 100644 --- a/njs/njs_parser.c +++ b/njs/njs_parser.c @@ -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 --git a/njs/njs_parser.h b/njs/njs_parser.h index 7a87bf2c..e4942369 100644 --- a/njs/njs_parser.h +++ b/njs/njs_parser.h @@ -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_vm_t *vm, njs_parser_t *parser, 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 --git a/njs/njscript.c b/njs/njscript.c index 884c9e00..aab1ea5d 100644 --- a/njs/njscript.c +++ b/njs/njscript.c @@ -213,7 +213,6 @@ njs_vm_compile(njs_vm_t *vm, u_char **start, u_char *end, 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)) { -- 2.47.3