mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Remove has_source_hash from iseq_body
We can use a special value of 0 in source_hash to denote that it does not have source_hash. This removes the has_source_hash field which saves us 8 bytes per iseq.
This commit is contained in:
1 parent
ba269a0e9f
commit
ae574e7219
5 files changed
+15
-19
Notes:
git
2026-08-20 23:36:12 +00:00
No files matched your search
+2
-1
@@ -1119,7 +1119,8 @@ rb_source_hash_update(rb_source_hash_state_t *state, const uint8_t *ptr, size_t
|
||||
uint64_t
|
||||
rb_source_hash_finalize(const rb_source_hash_state_t *state)
|
||||
{
|
||||
return state->hash;
|
||||
/* A hash of 0 means no source hash, so remap it to another value. */
|
||||
return state->hash == 0 ? 1 : state->hash;
|
||||
}
|
||||
|
||||
VALUE
|
||||
|
||||
Reference in new issue
Block a user