From 3cfbf676b68de3fcdc8c994d7429db5eaf2a2d95 Mon Sep 17 00:00:00 2001 From: Isaiah Norton Date: Sun, 4 Jan 2015 02:23:04 -0500 Subject: [PATCH] Remove --int-literals option --- NEWS.md | 2 ++ src/ast.c | 14 -------------- src/init.c | 1 - src/julia.h | 1 - ui/repl.c | 25 +++++++------------------ 5 files changed, 9 insertions(+), 34 deletions(-) diff --git a/NEWS.md b/NEWS.md index 39810e08535d4..b6fc8b9c50ee8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -147,6 +147,8 @@ Library improvements Deprecated or removed --------------------- + * the --int-literals compiler option is no longer accepted. + * `median` and `median!` no longer accept a `checknan` keyword argument ([#8605]). * `inf` and `nan` are now deprecated in favor of `T(Inf)` and `NaN`, respectively ([#8776]). diff --git a/src/ast.c b/src/ast.c index 767d9bd71151e..bccd7a0b93948 100644 --- a/src/ast.c +++ b/src/ast.c @@ -245,20 +245,6 @@ static jl_value_t *scm_to_julia_(value_t e, int eo) } i64 = conv_to_int64(cp_data(cp), nt); } - if ( -#ifdef _P64 - jl_compileropts.int_literals==32 -#else - jl_compileropts.int_literals!=64 -#endif - ) { - if (i64 > (int64_t)S32_MAX || i64 < (int64_t)S32_MIN) - return (jl_value_t*)jl_box_int64(i64); - return (jl_value_t*)jl_box_int32((int32_t)i64); - } - else { - return (jl_value_t*)jl_box_int64(i64); - } } if (issymbol(e)) { if (e == true_sym) diff --git a/src/init.c b/src/init.c index c222bf63da4eb..15b0f474012d4 100644 --- a/src/init.c +++ b/src/init.c @@ -97,7 +97,6 @@ jl_compileropts_t jl_compileropts = { NULL, // julia_home 0, // malloc_log JL_COMPILEROPT_CHECK_BOUNDS_DEFAULT, JL_COMPILEROPT_DUMPBITCODE_OFF, - 0, // int_literals JL_COMPILEROPT_COMPILE_DEFAULT, 0, // opt_level 1, // depwarn diff --git a/src/julia.h b/src/julia.h index 9c6808572400e..0032b9d351680 100644 --- a/src/julia.h +++ b/src/julia.h @@ -1334,7 +1334,6 @@ typedef struct { int8_t malloc_log; int8_t check_bounds; int8_t dumpbitcode; - int int_literals; int8_t compile_enabled; int8_t opt_level; int8_t depwarn; diff --git a/ui/repl.c b/ui/repl.c index d9576e25f4127..d48a5700ea918 100644 --- a/ui/repl.c +++ b/ui/repl.c @@ -92,11 +92,10 @@ void parse_opts(int *argcp, char ***argvp) { "track-allocation",required_argument, 0, 'm' }, { "check-bounds", required_argument, 0, 300 }, { "optimize", no_argument, 0, 'O' }, - { "int-literals", required_argument, 0, 301 }, - { "dump-bitcode", required_argument, 0, 302 }, - { "compile", required_argument, 0, 303 }, - { "depwarn", required_argument, 0, 304 }, - { "inline", required_argument, 0, 305 }, + { "dump-bitcode", required_argument, 0, 301 }, + { "compile", required_argument, 0, 302 }, + { "depwarn", required_argument, 0, 303 }, + { "inline", required_argument, 0, 304 }, { 0, 0, 0, 0 } }; int c; @@ -163,22 +162,12 @@ void parse_opts(int *argcp, char ***argvp) jl_compileropts.check_bounds = JL_COMPILEROPT_CHECK_BOUNDS_OFF; break; case 301: - if (!strcmp(optarg,"32")) - jl_compileropts.int_literals = 32; - else if (!strcmp(optarg,"64")) - jl_compileropts.int_literals = 64; - else { - ios_printf(ios_stderr, "julia: invalid integer literal size (%s)\n", optarg); - exit(1); - } - break; - case 302: if (!strcmp(optarg,"yes")) jl_compileropts.dumpbitcode = JL_COMPILEROPT_DUMPBITCODE_ON; else if (!strcmp(optarg,"no")) jl_compileropts.dumpbitcode = JL_COMPILEROPT_DUMPBITCODE_OFF; break; - case 303: + case 302: if (!strcmp(optarg,"yes")) jl_compileropts.compile_enabled = 1; else if (!strcmp(optarg,"no")) @@ -190,7 +179,7 @@ void parse_opts(int *argcp, char ***argvp) exit(1); } break; - case 304: + case 303: if (!strcmp(optarg,"yes")) jl_compileropts.depwarn = 1; else if (!strcmp(optarg,"no")) @@ -200,7 +189,7 @@ void parse_opts(int *argcp, char ***argvp) exit(1); } break; - case 305: /* inline */ + case 304: /* inline */ if (!strcmp(optarg,"yes")) jl_compileropts.can_inline = 1; else if (!strcmp(optarg,"no"))