From 82ea2870188d66aa75a99f03b4e7fdd1750aa196 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Thu, 18 Nov 2021 11:01:31 +0900 Subject: optimize `Struct` getter/setter Introduce new optimized method type `OPTIMIZED_METHOD_TYPE_STRUCT_AREF/ASET` with index information. --- method.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'method.h') diff --git a/method.h b/method.h index b7c4318f83..031d2ce89f 100644 --- a/method.h +++ b/method.h @@ -167,11 +167,14 @@ enum method_optimized_type { OPTIMIZED_METHOD_TYPE_SEND, OPTIMIZED_METHOD_TYPE_CALL, OPTIMIZED_METHOD_TYPE_BLOCK_CALL, + OPTIMIZED_METHOD_TYPE_STRUCT_AREF, + OPTIMIZED_METHOD_TYPE_STRUCT_ASET, OPTIMIZED_METHOD_TYPE__MAX }; typedef struct rb_method_optimized { enum method_optimized_type type; + unsigned int index; } rb_method_optimized_t; struct rb_method_definition_struct { -- cgit v1.2.3