[m-rev.] for review: add new grade component for unboxed 64-bit integers
Zoltan Somogyi
zoltan.somogyi at runbox.com
Tue Jan 30 13:15:50 AEDT 2018
On Mon, 29 Jan 2018 19:09:09 -0500 (EST), Julien Fischer <jfischer at opturion.com> wrote:
> Add a new grade component that indicates whether 64-bit integers are boxed or
> not.
Are you proposing it to be a permanent grade, or just a temporary device
to simplify the switchover from the current default of not using unboxed 64 bit ints
even on 64 bit platforms to using them by default?
> runtime/mercury_grade.h:
> Bump the binary compatibility version number.
Why? I see that in options.m, the default value of unboxed_int64s is "no",
so there should be no effect in binary compatibility in existing grades.
The incompatibility will be *between* grades. Wouldn't the right time
to do the bump be when we switch the default from no ubi64 to ubi64
on 64 bit machines?
> @@ -499,8 +500,16 @@
> #define MR_GRADE_OPT_PART_18 MR_GRADE_OPT_PART_17
> #endif
>
> -#define MR_GRADE MR_GRADE_PART_18
> -#define MR_GRADE_OPT MR_GRADE_OPT_PART_18
> +#if defined(MR_BOXED_INT64S)
> + #define MR_GRADE_PART_19 MR_GRADE_PART_18
> + #define MR_GRADE_OPT_PART_19 MR_GRADE_OPT_PART_18
> +#else // "ubi64" stands for "unboxed integers 64-bit"
> + #define MR_GRADE_PART_19 MR_PASTE2(MR_GRADE_PART_18, _ubi64)
> + #define MR_GRADE_OPT_PART_19 MR_GRADE_OPT_PART_18
> +#endif
The definition of MR_GRADE_OPT_PART_19 should add ".ubi64" to
MR_GRADE_OPT_PART_18 if unboxed 64 bit ints is not the default.
If it is, then we need to add something like ".boxi64"/_boxi64 in the other
arm of the if-then-else. Actually, having those on the other arm
right now should smooth the switchover as well.
Zoltan.
More information about the reviews
mailing list