Skip to content

Commit d51f268

Browse files
committed
Revert "Unconditionally increase imemo type size"
We reverted the change in internal/imemo.h, and we should have reverted yjit and zjit changes, too. This reverts commit fe9d5c8.
1 parent e480f06 commit d51f268

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

yjit/src/cruby.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,7 @@ mod manual_defs {
742742
pub const RSTRUCT_EMBED_LEN_MASK: usize = (RUBY_FL_USER7 | RUBY_FL_USER6 | RUBY_FL_USER5 | RUBY_FL_USER4 | RUBY_FL_USER3 |RUBY_FL_USER2 | RUBY_FL_USER1) as usize;
743743

744744
// From iseq.h - via a different constant, which seems to confuse bindgen
745-
// MMTk note: After we changed the IMEMO_MASK in imemo.h, we shifted IMEMO_FL_USERx, too.
746-
// Now ISEQ_TRANSLATED == IMEMO_FL_USER3 == RUBY_FL_USER8
747-
pub const ISEQ_TRANSLATED: usize = RUBY_FL_USER8 as usize;
745+
pub const ISEQ_TRANSLATED: usize = RUBY_FL_USER7 as usize;
748746

749747
// We'll need to encode a lot of Ruby struct/field offsets as constants unless we want to
750748
// redeclare all the Ruby C structs and write our own offsetof macro. For now, we use constants.

zjit/src/cruby.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,9 +1026,7 @@ mod manual_defs {
10261026
pub const RSTRUCT_EMBED_LEN_MASK: usize = (RUBY_FL_USER7 | RUBY_FL_USER6 | RUBY_FL_USER5 | RUBY_FL_USER4 | RUBY_FL_USER3 |RUBY_FL_USER2 | RUBY_FL_USER1) as usize;
10271027

10281028
// From iseq.h - via a different constant, which seems to confuse bindgen
1029-
// MMTk note: After we changed the IMEMO_MASK in imemo.h, we shifted IMEMO_FL_USERx, too.
1030-
// Now ISEQ_TRANSLATED == IMEMO_FL_USER3 == RUBY_FL_USER8
1031-
pub const ISEQ_TRANSLATED: usize = RUBY_FL_USER8 as usize;
1029+
pub const ISEQ_TRANSLATED: usize = RUBY_FL_USER7 as usize;
10321030

10331031
// We'll need to encode a lot of Ruby struct/field offsets as constants unless we want to
10341032
// redeclare all the Ruby C structs and write our own offsetof macro. For now, we use constants.

0 commit comments

Comments
 (0)