diff options
author | Koichi Sasada <[email protected]> | 2021-11-18 11:01:31 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2021-11-19 08:32:39 +0900 |
commit | 82ea2870188d66aa75a99f03b4e7fdd1750aa196 (patch) | |
tree | 6ae732893312619a03e8dee23418a52df784d1f8 /method.h | |
parent | be71c95b88019a1ca7a030a757ce343b743d8aff (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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 { |