mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
optimize Struct
getter/setter
Introduce new optimized method type `OPTIMIZED_METHOD_TYPE_STRUCT_AREF/ASET` with index information.
This commit is contained in:
parent
be71c95b88
commit
82ea287018
Notes:
git
2021-11-19 08:32:59 +09:00
10 changed files with 181 additions and 238 deletions
6
proc.c
6
proc.c
|
@ -2681,6 +2681,12 @@ rb_method_entry_min_max_arity(const rb_method_entry_t *me, int *max)
|
|||
case OPTIMIZED_METHOD_TYPE_BLOCK_CALL:
|
||||
*max = UNLIMITED_ARGUMENTS;
|
||||
return 0;
|
||||
case OPTIMIZED_METHOD_TYPE_STRUCT_AREF:
|
||||
*max = 0;
|
||||
return 0;
|
||||
case OPTIMIZED_METHOD_TYPE_STRUCT_ASET:
|
||||
*max = 1;
|
||||
return 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue