[m-rev.] for review: add builtin 64-bit integer types -- part 2

Julien Fischer jfischer at opturion.com
Wed Jan 31 01:04:25 AEDT 2018


On Wed, 31 Jan 2018, Zoltan Somogyi wrote:

>
>
> On Tue, 30 Jan 2018 08:53:24 -0500 (EST), Julien Fischer <jfischer at opturion.com> wrote:
>>> @@ -894,30 +895,38 @@ output_uint32_expr(Stream, N, !IO) :-
>>>      io.write_uint32(Stream, N, !IO),
>>>      io.write_string(Stream, ")", !IO).
>>>
>>> -make_int64_literal(N) = Literal :-
>>> -    NStr = int_to_string(N),
>>> -    string.format("INT64_C(%s)", [s(NStr)], Literal).
>>> -
>>>  output_uint32_expr_cur_stream(N, !IO) :-
>>>      io.output_stream(Stream, !IO),
>>>      output_uint32_expr(Stream, N, !IO).
>>>
>>> +make_int64_literal(N) = Literal :-
>>> +    ( if N = min_int64 then
>>> +        Literal = "INT64_MIN"
>>> +    else
>>> +        NStr = int64_to_string(N),
>>> +        string.format("INT64_C(%s)", [s(NStr)], Literal)
>>> +    ).
>>> +
>>>
>>> Is there any particular reason why there is make_Uint64_literal?
>>
>> I don't understand your comment here.
>
> That because that should have been:
>
> Is there any particular reason why there is NO make_Uint64_literal?

There *is* a make_uint64_literal, it's further down in the same file.

Julien.


More information about the reviews mailing list