dfinity / motoko

Simple high-level language for writing Internet Computer canisters
Apache License 2.0
506 stars 97 forks source link

Take out artificial limits of Word32, etc. boxing #1247

Closed ggreif closed 3 years ago

ggreif commented 4 years ago

This is a tracking issue. Maybe we should do this before open-sourcing.

We shouldn't ship a compiler that artificially hobbles the representation of greater than Word16-like data types. Currently we have artificial cutoffs for the magnitudes in several places. These switch to heap pointer representations to often.

nomeata commented 4 years ago

I am not 100% what you are referring to. Do you refer to the us using unboxed scalars for less values that we could? Yeah, maybe just remove that, and use the full range.

Or is there anything else?

kritzcreek commented 4 years ago

I doubt this is a blocker for Open Sourcing.

ggreif commented 4 years ago

@nomeata I am talking about the arbitrary limits for boxing, concretely, e.g. https://github.com/dfinity-lab/motoko/blob/master/src/codegen/compile.ml#L1282

@kritzcreek

I doubt this is a blocker for Open Sourcing.

Right, it is just a bit of an embarrassment to open source like this. We have now property tests in place to properly test especially the interesting ranges.

nomeata commented 3 years ago

I believe we fixed that with 365b4b8d471b14c18e5c525c757ec7135c1bc171