Use explicit conversion type for IR_TOSTR. Add char conversion.

This commit is contained in:
Mike Pall
2013-04-23 02:20:03 +02:00
parent 557391c3b7
commit 255326afb6
10 changed files with 47 additions and 20 deletions

View File

@@ -133,7 +133,7 @@
/* Type conversions. */ \
_(CONV, NW, ref, lit) \
_(TOBIT, N , ref, ref) \
_(TOSTR, N , ref, ___) \
_(TOSTR, N , ref, lit) \
_(STRTO, N , ref, ___) \
\
/* Calls. */ \
@@ -246,6 +246,11 @@ IRFLDEF(FLENUM)
#define IRCONV_INDEX (2<<IRCONV_CSH) /* Check + special backprop rules. */
#define IRCONV_CHECK (3<<IRCONV_CSH) /* Number checked for integerness. */
/* TOSTR mode, stored in op2. */
#define IRTOSTR_INT 0 /* Convert integer to string. */
#define IRTOSTR_NUM 1 /* Convert number to string. */
#define IRTOSTR_CHAR 2 /* Convert char value to string. */
/* -- IR operands --------------------------------------------------------- */
/* IR operand mode (2 bit). */