-480477ca64c3001b9c7e92ef8b978dc92a5912d2
+0f6d673d5b1a3474c3424cb6994ae8ff9baed255
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
{
Type* itype = Type::lookup_integer_type("uint64");
arg = Expression::make_cast(itype, arg, location);
- code = Runtime::PRINTUINT;
+ if (gogo->compiling_runtime()
+ && type->named_type() != NULL
+ && gogo->unpack_hidden_name(type->named_type()->name())
+ == "hex")
+ code = Runtime::PRINTHEX;
+ else
+ code = Runtime::PRINTUINT;
}
else if (type->integer_type() != NULL)
{
// Print a uint64 (for print/println).
DEF_GO_RUNTIME(PRINTUINT, "runtime.printuint", P1(UINT64), R0())
+// Print a uint64 in hex (for print/println, used for runtime.hex type).
+DEF_GO_RUNTIME(PRINTHEX, "runtime.printhex", P1(UINT64), R0())
+
// Print a int64 (for print/println).
DEF_GO_RUNTIME(PRINTINT, "runtime.printint", P1(INT64), R0())