Mercurial > njs
changeset 890:de5127995b43
Renaming node->label to node->name.
To reuse it for function name without introducing newly field.
author | hongzhidao <hongzhidao@gmail.com> |
---|---|
date | Sat, 13 Apr 2019 01:07:34 +0800 (2019-04-12) |
parents | 802fe99c8881 |
children | ace6f73dff8d |
files | njs/njs_generator.c njs/njs_parser.c njs/njs_parser.h |
diffstat | 3 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/njs/njs_generator.c Fri Apr 12 20:48:44 2019 +0300 +++ b/njs/njs_generator.c Sat Apr 13 01:07:34 2019 +0800 @@ -847,7 +847,7 @@ } ret = njs_generate_start_block(vm, generator, NJS_GENERATOR_SWITCH, - &swtch->label); + &swtch->name); if (nxt_slow_path(ret != NXT_OK)) { return ret; } @@ -966,7 +966,7 @@ /* The loop body. */ ret = njs_generate_start_block(vm, generator, NJS_GENERATOR_LOOP, - &node->label); + &node->name); if (nxt_slow_path(ret != NXT_OK)) { return ret; } @@ -1014,7 +1014,7 @@ /* The loop body. */ ret = njs_generate_start_block(vm, generator, NJS_GENERATOR_LOOP, - &node->label); + &node->name); if (nxt_slow_path(ret != NXT_OK)) { return ret; } @@ -1059,7 +1059,7 @@ njs_vmcode_cond_jump_t *cond_jump; ret = njs_generate_start_block(vm, generator, NJS_GENERATOR_LOOP, - &node->label); + &node->name); if (nxt_slow_path(ret != NXT_OK)) { return ret; } @@ -1162,7 +1162,7 @@ njs_vmcode_prop_foreach_t *prop_foreach; ret = njs_generate_start_block(vm, generator, NJS_GENERATOR_LOOP, - &node->label); + &node->name); if (nxt_slow_path(ret != NXT_OK)) { return ret; } @@ -1441,7 +1441,7 @@ njs_generator_patch_t *patch; njs_generator_block_t *block; - label = &node->label; + label = &node->name; block = njs_generate_find_block(generator->block, NJS_GENERATOR_LOOP, label); @@ -1489,7 +1489,7 @@ njs_generator_patch_t *patch; njs_generator_block_t *block; - label = &node->label; + label = &node->name; block = njs_generate_find_block(generator->block, NJS_GENERATOR_ALL, label); if (nxt_slow_path(block == NULL)) { @@ -1548,7 +1548,7 @@ nxt_int_t ret; ret = njs_generate_start_block(vm, generator, NJS_GENERATOR_BLOCK, - &node->label); + &node->name); if (nxt_slow_path(ret != NXT_OK)) { return ret; }
--- a/njs/njs_parser.c Fri Apr 12 20:48:44 2019 +0300 +++ b/njs/njs_parser.c Sat Apr 13 01:07:34 2019 +0800 @@ -559,7 +559,7 @@ if (parser->node != NULL) { /* The statement is not empty block or just semicolon. */ - ret = njs_name_copy(vm, &parser->node->label, &name); + ret = njs_name_copy(vm, &parser->node->name, &name); if (nxt_slow_path(ret != NXT_OK)) { return NJS_TOKEN_ERROR; } @@ -1584,7 +1584,7 @@ return NJS_TOKEN_ILLEGAL; } - ret = njs_name_copy(vm, &parser->node->label, &name); + ret = njs_name_copy(vm, &parser->node->name, &name); if (nxt_slow_path(ret != NXT_OK)) { return NJS_TOKEN_ERROR; }