chapel-lang/chapel — pull request #1073 by vasslitvinov (2014-12-24 16:12:28+00:00)
Title: Improved  cast_code.cpp

The important change is: param casts from int(64) and uint(?) to c_string
now work correctly.

Before, only 32 bits were considered and they were treated as signed.
E.g. param cast uint64->c_string was:

to->v_string = istr(from->uint_value()); break;

now it is:

to->v_string = istrUserUint(from->v_uint64); break;

For that I introduced istrUserUint() and istrUserInt()
that are like istr() except:

* they accept "long long unsigned int" and "long long int", resp.
(I use them for smaller-sized arguments, too)

* their sprintf format is "%llu" and "%lld", resp.

While there:

* Removed a bunch of extraneous cases like this:

case XXX: INT_FATAL("Illegal case in coerce_immediate switch statement"); break;

when there was a 'default' case with the same INT_FATAL().

* Replaced uint_value() with v_uint64 and analogously for int64,
for clarity/consistency. Only in compiler/ifa/*.

* Defuturized param-uint-to-param-string.future.