Prohibit MRB_INT64 on 32-bit architecture#4483
Conversation
I think `mrb_int` size should be less than or equal to pointer size. In the case of `MRB_INT64` on 32-bit architecture, `struct RString` etc sizes exceed 6 words at least for now.
|
I will oppose.
|
|
Thank you for your comment. Then, as you say, Or, it may be possible to limit |
|
There is no objection to the introduction of I think that it is better to leave the definition of I checked what kind of transition the type of the
Other object structures that exceed 6 words in 32-bit mode are Lines 35 to 39 in 366617d If we define
|
|
Thank you for your investigation. I think another fix is necessary for |
…_FLOAT` ref: mruby#4483 (comment) In this configuration, `tt` of `RBreak::val` is set into `RBasic::flags`.
…_FLOAT` ref: mruby#4483 (comment) In this configuration, `tt` of `RBreak::val` is set into `RBreak::flags`.
Previously, `mrb_int` was used as the type that represents the buffer size on memory, but the sizes of `RString` and `RArray` exceed 6 words when `MRB_INT64` is enabled on 32-bit CPU. I don't think it is necessary to be able to represent the buffer size on memory that exceeds the virtual address space. Therefore, for this purpose, introduce `mrb_ssize` which doesn't exceed the sizes of `mrb_int` and pointer. I think all `mrb_int` used for this purpose should be changed to `mrb_ssize`, but currently only the members of the structures (`RString`,`mrb_shared_string`, `RArray` and `mrb_shared_array`) are changed.
Previously, `mrb_int` was used as the type that represents the buffer size on memory, but the sizes of `RString` and `RArray` exceed 6 words when `MRB_INT64` is enabled on 32-bit CPU. I don't think it is necessary to be able to represent the buffer size on memory that exceeds the virtual address space. Therefore, for this purpose, introduce `mrb_ssize` which doesn't exceed the sizes of `mrb_int` and pointer. I think all `mrb_int` used for this purpose should be changed to `mrb_ssize`, but currently only the members of the structures (`RString`, `mrb_shared_string`, `RArray` and `mrb_shared_array`) are changed.
…ffer-size-on-memory Introduce `mrb_ssize` type for buffer size on memory; ref #4483
- Remove `mrb_ssize`
- Fix `MRB_FIXNUM_{MIN,MAX}` to 32 bits on `MRB_NAN_BOXING`
I misunderstand the meaning of #4483. Sorry.
I think
mrb_intsize should be less than or equal to pointer size. In thecase of
MRB_INT64on 32-bit architecture,struct RStringetc sizesexceed 6 words at least for now.