[njs] Simplified parser builtin function.

Dmitry Volyntsev xeioex at nginx.com
Fri Feb 1 14:43:33 UTC 2019


details:   https://hg.nginx.org/njs/rev/05379e4d6844
branches:  
changeset: 749:05379e4d6844
user:      hongzhidao <hongzhidao at gmail.com>
date:      Fri Feb 01 19:48:30 2019 +0800
description:
Simplified parser builtin function.

diffstat:

 njs/njs_parser.c   |  4 ----
 njs/njs_variable.c |  1 -
 2 files changed, 0 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r 9f2779de4cdd -r 05379e4d6844 njs/njs_parser.c
--- a/njs/njs_parser.c	Tue Jan 29 16:30:13 2019 +0800
+++ b/njs/njs_parser.c	Fri Feb 01 19:48:30 2019 +0800
@@ -2095,8 +2095,6 @@ njs_parser_builtin_object(njs_vm_t *vm, 
         return NJS_TOKEN_ERROR;
     }
 
-    node->scope = parser->scope;
-
     parser->node = node;
 
     return njs_parser_token(parser);
@@ -2139,8 +2137,6 @@ njs_parser_builtin_function(njs_vm_t *vm
         return NJS_TOKEN_ERROR;
     }
 
-    node->scope = parser->scope;
-
     parser->node = node;
 
     return njs_parser_token(parser);
diff -r 9f2779de4cdd -r 05379e4d6844 njs/njs_variable.c
--- a/njs/njs_variable.c	Tue Jan 29 16:30:13 2019 +0800
+++ b/njs/njs_variable.c	Fri Feb 01 19:48:30 2019 +0800
@@ -132,7 +132,6 @@ njs_variable_reference(njs_vm_t *vm, njs
     ret = njs_name_copy(vm, &vr->name, name);
 
     if (nxt_fast_path(ret == NXT_OK)) {
-        node->scope = scope;
         vr->hash = hash;
         vr->type = type;
 


More information about the nginx-devel mailing list