[ruby-core:89071] Re: Ask: can we limit to arguments size to uint16_t?

From: Eric Wong <normalperson@...>
Date: 2018-09-18 15:08:33 UTC
List: ruby-core #89071
Koichi Sasada <[email protected]> wrote:
> Now, call_info->orig_argc (passing argument size (we can ignore splat
> argumens)) is int (32bit on recent systems).
> 
> Can we limit this size to 16bit (uint16_t)?
> Do you have any program which have arguments size exceeds 2^16?
> 
> Machine generating code can exceed. For example:
> `bitmap = Bitmap.new(0x00, ...)`

Right, I considered this a few years ago but decided it too
risky for pure-Ruby methods with machine-generated code.

> Any opinion?

I guess you're trying to save space?

What about making ID 32-bit? (Only saves space on 64-bit,
but 64-bit is common nowadays)

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread