diff --git a/builtins/integers.h b/builtins/integers.h index e6b5b1f..edfd07d 100644 --- a/builtins/integers.h +++ b/builtins/integers.h @@ -101,6 +101,7 @@ Int_t Int$sqrt(Int_t i); } while (0) #define I(i) ((int64_t)(i) == (int32_t)(i) ? ((Int_t){.small=((uint64_t)(i)<<2)|1}) : Int64_to_Int(i)) +#define I_small(i) ((Int_t){.small=((uint64_t)(i)<<2)|1}) Int_t Int$slow_plus(Int_t x, Int_t y); Int_t Int$slow_minus(Int_t x, Int_t y); diff --git a/compile.c b/compile.c index e8ed8c7..d792c27 100644 --- a/compile.c +++ b/compile.c @@ -1404,7 +1404,7 @@ CORD compile(env_t *env, ast_t *ast) switch (Match(ast, Int)->bits) { case 0: if (mpz_cmpabs_ui(i, BIGGEST_SMALL_INT) <= 0) { - return CORD_asprintf("I(%s)", str); + return CORD_asprintf("I_small(%s)", str); } else if (mpz_cmp_si(i, INT64_MAX) <= 0 && mpz_cmp_si(i, INT64_MIN) >= 0) { return CORD_asprintf("Int64_to_Int(%s)", str); } else {