From f2286925f08406bc857f7b03ad6779a5d61443ae Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 8 Jan 2020 08:20:36 +0900 Subject: VALUE size packed callinfo (ci). Now, rb_call_info contains how to call the method with tuple of (mid, orig_argc, flags, kwarg). Most of cases, kwarg == NULL and mid+argc+flags only requires 64bits. So this patch packed rb_call_info to VALUE (1 word) on such cases. If we can not represent it in VALUE, then use imemo_callinfo which contains conventional callinfo (rb_callinfo, renamed from rb_call_info). iseq->body->ci_kw_size is removed because all of callinfo is VALUE size (packed ci or a pointer to imemo_callinfo). To access ci information, we need to use these functions: vm_ci_mid(ci), _flag(ci), _argc(ci), _kwarg(ci). struct rb_call_info_kw_arg is renamed to rb_callinfo_kwarg. rb_funcallv_with_cc() and rb_method_basic_definition_p_with_cc() is temporary removed because cd->ci should be marked. --- iseq.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'iseq.h') diff --git a/iseq.h b/iseq.h index 8354a0490f..d2acabb233 100644 --- a/iseq.h +++ b/iseq.h @@ -25,14 +25,6 @@ typedef struct rb_iseq_struct rb_iseq_t; extern const ID rb_iseq_shared_exc_local_tbl[]; -static inline size_t -rb_call_info_kw_arg_bytes(int keyword_len) -{ - return rb_size_mul_add_or_raise( - keyword_len - 1, sizeof(VALUE), sizeof(struct rb_call_info_kw_arg), - rb_eRuntimeError); -} - #define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage #define ISEQ_COVERAGE_SET(iseq, cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov) #define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES) @@ -115,7 +107,6 @@ struct iseq_compile_data { int label_no; int node_level; unsigned int ci_index; - unsigned int ci_kw_index; const rb_compile_option_t *option; struct rb_id_table *ivar_cache_table; const struct rb_builtin_function *builtin_function_table; -- cgit v1.2.3