aboutsummaryrefslogtreecommitdiff
path: root/src/njs_function.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/njs_function.h')
-rw-r--r--src/njs_function.h29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/njs_function.h b/src/njs_function.h
index 6516ff78..1b5de544 100644
--- a/src/njs_function.h
+++ b/src/njs_function.h
@@ -13,9 +13,6 @@ struct njs_function_lambda_s {
uint32_t nclosures;
uint32_t nlocal;
- njs_declaration_t *declarations;
- uint32_t ndeclarations;
-
njs_index_t self;
uint32_t nargs;
@@ -205,29 +202,15 @@ njs_function_frame_size(njs_native_frame_t *frame)
}
-njs_inline size_t
-njs_function_frame_args_count(njs_native_frame_t *frame)
-{
- uintptr_t start;
-
- start = (uintptr_t) ((u_char *) frame + NJS_FRAME_SIZE);
-
- return ((uintptr_t) frame->local - start) / sizeof(njs_value_t *);
-}
-
-
-njs_inline njs_value_t *
-njs_function_frame_values(njs_native_frame_t *frame, njs_value_t **end)
+njs_inline njs_bool_t
+njs_is_value_allocated_on_frame(njs_native_frame_t *frame, njs_value_t *value)
{
- size_t count;
- uintptr_t start;
-
- start = (uintptr_t) ((u_char *) frame + NJS_FRAME_SIZE);
- count = ((uintptr_t) frame->arguments - start) / sizeof(njs_value_t *);
+ void *start, *end;
- *end = frame->arguments + count;
+ start = frame;
+ end = frame->free;
- return frame->arguments;
+ return start <= (void *) value && (void *) value < end;
}