Skip to content

Commit

Permalink
Remove --int-literals option
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Jan 4, 2015
1 parent dafa9c8 commit 3cfbf67
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 34 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]).
Expand Down
14 changes: 0 additions & 14 deletions src/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
25 changes: 7 additions & 18 deletions ui/repl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"))
Expand All @@ -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"))
Expand All @@ -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"))
Expand Down

0 comments on commit 3cfbf67

Please sign in to comment.