From 7bed35a6c4ae12841d89ded8ba954ef59974c572 Mon Sep 17 00:00:00 2001 From: hongzhidao Date: Fri, 26 Jul 2019 22:37:38 -0400 Subject: [PATCH] Removed function call flag. --- njs/njs_function.c | 2 -- njs/njs_function.h | 2 -- njs/njs_vmcode.c | 6 +++--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/njs/njs_function.c b/njs/njs_function.c index c3e4216e..121225fa 100644 --- a/njs/njs_function.c +++ b/njs/njs_function.c @@ -568,8 +568,6 @@ njs_function_lambda_call(njs_vm_t *vm) } } - frame->native.call = 1; - vm->active_frame = frame; return njs_vmcode_interpreter(vm, lambda->start); diff --git a/njs/njs_function.h b/njs/njs_function.h index 819d05b3..48665db7 100644 --- a/njs/njs_function.h +++ b/njs/njs_function.h @@ -89,8 +89,6 @@ struct njs_native_frame_s { /* Skip the Function.call() and Function.apply() methods frames. */ uint8_t skip; /* 1 bit */ - - uint8_t call; /* 1 bit */ }; diff --git a/njs/njs_vmcode.c b/njs/njs_vmcode.c index 588d51fe..103364ca 100644 --- a/njs/njs_vmcode.c +++ b/njs/njs_vmcode.c @@ -87,7 +87,7 @@ njs_vmcode_interpreter(njs_vm_t *vm, u_char *pc) uint32_t u32; njs_ret_t ret; nxt_uint_t hint; - nxt_bool_t valid, call; + nxt_bool_t valid, lambda_call; njs_value_t *retval, *value1, *value2, *src, *s1, *s2; njs_value_t numeric1, numeric2, primitive1, primitive2, dst; @@ -855,7 +855,7 @@ error: break; } - call = frame->native.call; + lambda_call = (frame == vm->active_frame); njs_vm_scopes_restore(vm, frame, previous); @@ -864,7 +864,7 @@ error: nxt_mp_free(vm->mem_pool, frame); } - if (call) { + if (lambda_call) { break; } } -- 2.47.3