summaryrefslogtreecommitdiff
path: root/method.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-11-18 11:01:31 +0900
committerKoichi Sasada <ko1@atdot.net>2021-11-19 08:32:39 +0900
commit82ea2870188d66aa75a99f03b4e7fdd1750aa196 (patch)
tree6ae732893312619a03e8dee23418a52df784d1f8 /method.h
parentbe71c95b88019a1ca7a030a757ce343b743d8aff (diff)
optimize `Struct` getter/setter
Introduce new optimized method type `OPTIMIZED_METHOD_TYPE_STRUCT_AREF/ASET` with index information.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5131
Diffstat (limited to 'method.h')
-rw-r--r--method.h3
1 files changed, 3 insertions, 0 deletions
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 {