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 Mar 25, 2015
1 parent 051e31f commit d7c428f
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 31 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ Deprecated or removed
have been replaced by `parse` and `tryparse` with a type argument
([#3631], [#5704], [#9487], [#10543]).

* the --int-literals compiler option is no longer accepted.

Julia v0.3.0 Release Notes
==========================

Expand Down
1 change: 0 additions & 1 deletion base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ let reqarg = Set(UTF8String["--home", "-H",
"--startup-file",
"--compile",
"--check-bounds",
"--int-literals",
"--dump-bitcode",
"--depwarn",
"--inline",
Expand Down
1 change: 0 additions & 1 deletion base/options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ immutable JLOptions
malloc_log::Int8
opt_level::Int8
check_bounds::Int8
int_literals::Cint
dumpbitcode::Int8
depwarn::Int8
can_inline::Int8
Expand Down
4 changes: 0 additions & 4 deletions doc/man/julia.1
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ Run time-intensive code optimizations
--check-bounds={yes|no}
Emit bounds checks always or never (ignoring declarations)

.TP
--int-literals={32|64}
Select integer literal size independent of platform

.TP
--dump-bitcode={yes|no}
Dump bitcode for the system image (used with --build)
Expand Down
1 change: 0 additions & 1 deletion doc/manual/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ those available for the ``perl`` and ``ruby`` programs::
-O, --optimize
Run time-intensive code optimizations
--check-bounds={yes|no} Emit bounds checks always or never (ignoring declarations)
--int-literals={32|64} Select integer literal size independent of platform
--dump-bitcode={yes|no} Dump bitcode for the system image (used with --build)
--depwarn={yes|no} Enable or disable syntax and method deprecation warnings
--inline={yes|no} Control whether inlining is permitted (overrides functions declared as @inline)
Expand Down
16 changes: 5 additions & 11 deletions src/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,20 +243,14 @@ static jl_value_t *scm_to_julia_(value_t e, int eo)
}
i64 = conv_to_int64(cp_data(cp), nt);
}
if (
#ifdef _P64
jl_options.int_literals==32
return (jl_value_t*)jl_box_int64(i64);
#else
jl_options.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 {
if (i64 > (int64_t)S32_MAX || i64 < (int64_t)S32_MIN)
return (jl_value_t*)jl_box_int64(i64);
}
else
return (jl_value_t*)jl_box_int32((int32_t)i64);
#endif
}
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 @@ -106,7 +106,6 @@ jl_options_t jl_options = { 0, // version
0, // malloc_log
0, // opt_level
JL_OPTIONS_CHECK_BOUNDS_DEFAULT, // check_bounds
0, // int_literals
JL_OPTIONS_DUMPBITCODE_OFF, // dump_bitcode
1, // depwarn
1, // can_inline
Expand Down
1 change: 0 additions & 1 deletion src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,6 @@ typedef struct {
int8_t malloc_log;
int8_t opt_level;
int8_t check_bounds;
int int_literals;
int8_t dumpbitcode;
int8_t depwarn;
int8_t can_inline;
Expand Down
11 changes: 0 additions & 11 deletions ui/repl.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ static const char opts[] =
" -O, --optimize\n"
" Run time-intensive code optimizations\n"
" --check-bounds={yes|no} Emit bounds checks always or never (ignoring declarations)\n"
" --int-literals={32|64} Select integer literal size independent of platform\n"
" --dump-bitcode={yes|no} Dump bitcode for the system image (used with --build)\n"
" --depwarn={yes|no} Enable or disable syntax and method deprecation warnings\n"
" --inline={yes|no} Control whether inlining is permitted (overrides functions declared as @inline)\n";
Expand All @@ -94,7 +93,6 @@ void parse_opts(int *argcp, char ***argvp)
opt_code_coverage,
opt_track_allocation,
opt_check_bounds,
opt_int_literals,
opt_dump_bitcode,
opt_depwarn,
opt_inline,
Expand Down Expand Up @@ -129,7 +127,6 @@ void parse_opts(int *argcp, char ***argvp)
{ "track-allocation",optional_argument, 0, opt_track_allocation },
{ "optimize", no_argument, 0, 'O' },
{ "check-bounds", required_argument, 0, opt_check_bounds },
{ "int-literals", required_argument, 0, opt_int_literals },
{ "dump-bitcode", required_argument, 0, opt_dump_bitcode },
{ "depwarn", required_argument, 0, opt_depwarn },
{ "inline", required_argument, 0, opt_inline },
Expand Down Expand Up @@ -284,14 +281,6 @@ void parse_opts(int *argcp, char ***argvp)
else
jl_errorf("julia: invalid argument to --check-bounds={yes|no} (%s)\n", optarg);
break;
case opt_int_literals:
if (!strcmp(optarg,"32"))
jl_options.int_literals = 32;
else if (!strcmp(optarg,"64"))
jl_options.int_literals = 64;
else
jl_errorf("julia: invalid argument to --int-literals={32|64} (%s)\n", optarg);
break;
case opt_dump_bitcode:
if (!strcmp(optarg,"yes"))
jl_options.dumpbitcode = JL_OPTIONS_DUMPBITCODE_ON;
Expand Down

0 comments on commit d7c428f

Please sign in to comment.