ocaml/asmcomp
Pierre Chambart 575f20368d Avoid checking twice if divisor is zero (#702)
* Avoid checking twice if divisor is zero

The flambda branch before merging assumed that Pdivint and Pmodint where
already checked when entering Cmmgen. This was not the case anymore
after merging and this change was lost. This fix this overlook by adding
an annotation to the Pdivint and Pmodint primitive telling whether the
division by zero was already checked.

The reason to move the test generation to Closure_conversion in the
flambda branch was to allow the division primitive to be considered as
pure without needing to check for the effective value of the
divisor. This simplified Semantics_of_primitives a lot.

* Bigarray div and mod also carry safety information

* Handle bigint div and mod like int div and mod in closure_conversion

* Update Changes

* Test for divisions by zero

* Turn Pdivbint and Pmodbint argument into an inline record
2016-10-05 16:42:40 +02:00
..
amd64 Fix Spacetime assembler comments (MPR#7326) 2016-08-15 08:58:32 +01:00
arm fix whitespace, long lines, headers 2016-08-01 16:06:59 +02:00
arm64 Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
i386 Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
power Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
s390x fix whitespace, long lines, headers 2016-08-01 16:06:59 +02:00
sparc Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
CSEgen.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
CSEgen.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
asmgen.ml Also remove the forced dependency dummy code hack for closure 2016-07-08 16:02:26 +02:00
asmgen.mli Allow to force linking modules without generating dummy code 2016-07-08 16:02:26 +02:00
asmlibrarian.ml Add Filename.extension and Filename.remove_extension. 2016-07-10 00:16:48 +02:00
asmlibrarian.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
asmlink.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
asmlink.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
asmpackager.ml Add Filename.extension and Filename.remove_extension. 2016-07-10 00:16:48 +02:00
asmpackager.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
branch_relaxation.ml Labels after calls, call GC points and checkbound points (again) (#660) 2016-07-06 11:44:00 +01:00
branch_relaxation.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
branch_relaxation_intf.ml Labels after calls, call GC points and checkbound points (again) (#660) 2016-07-06 11:44:00 +01:00
build_export_info.ml Annotate Let_mutable with the kind of value 2016-04-12 14:49:52 +02:00
build_export_info.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
clambda.ml Use the mutable_flag instead of let_kind for clambda let 2016-04-12 14:49:53 +02:00
clambda.mli Use the mutable_flag instead of let_kind for clambda let 2016-04-12 14:49:53 +02:00
closure.ml Avoid checking twice if divisor is zero (#702) 2016-10-05 16:42:40 +02:00
closure.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
closure_offsets.ml Update headers for the new license. 2016-02-18 16:59:16 +01:00
closure_offsets.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
cmm.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
cmm.mli Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
cmmgen.ml Avoid checking twice if divisor is zero (#702) 2016-10-05 16:42:40 +02:00
cmmgen.mli Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
cmx_format.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
coloring.ml Update headers for the new license. 2016-02-18 16:59:16 +01:00
coloring.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
comballoc.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
comballoc.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
compilenv.ml Allow to force linking modules without generating dummy code 2016-07-08 16:02:26 +02:00
compilenv.mli Allow to force linking modules without generating dummy code 2016-07-08 16:02:26 +02:00
deadcode.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
deadcode.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
emit.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
emitaux.ml Improve location handling in the middle end (version for merging) (#666) 2016-07-06 15:42:29 +01:00
emitaux.mli Improve location handling in the middle end (version for merging) (#666) 2016-07-06 15:42:29 +01:00
export_info.ml Fix ocamlobjinfo for flambda (#809) 2016-09-28 12:33:52 +02:00
export_info.mli Fix ocamlobjinfo for flambda (#809) 2016-09-28 12:33:52 +02:00
export_info_for_pack.ml Update headers for the new license. 2016-02-18 16:59:16 +01:00
export_info_for_pack.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
flambda_to_clambda.ml Improve location handling in the middle end (version for merging) (#666) 2016-07-06 15:42:29 +01:00
flambda_to_clambda.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
import_approx.ml Fix ocamlobjinfo for flambda (#809) 2016-09-28 12:33:52 +02:00
import_approx.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
interf.ml Labels after calls, call GC points and checkbound points (again) (#660) 2016-07-06 11:44:00 +01:00
interf.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
linearize.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
linearize.mli Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
liveness.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
liveness.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
mach.ml fix whitespace, long lines, headers 2016-08-01 16:06:59 +02:00
mach.mli Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
printclambda.ml Also record type information for int 2016-04-12 14:49:54 +02:00
printclambda.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
printcmm.ml Specialize raise_kind after cmmgen 2016-07-28 15:29:50 +02:00
printcmm.mli Specialize raise_kind after cmmgen 2016-07-28 15:29:50 +02:00
printlinear.ml Specialize raise_kind after cmmgen 2016-07-28 15:29:50 +02:00
printlinear.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
printmach.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
printmach.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
proc.mli Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
reg.ml Update headers for the new license. 2016-02-18 16:59:16 +01:00
reg.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
reload.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
reloadgen.ml fix whitespace, long lines, headers 2016-08-01 16:06:59 +02:00
reloadgen.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
schedgen.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
schedgen.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
scheduling.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
selectgen.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
selectgen.mli Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
selection.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
spacetime_profiling.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
spacetime_profiling.mli Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
spill.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
spill.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
split.ml Spacetime: a new memory profiler (#585) 2016-07-29 15:07:10 +01:00
split.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
strmatch.ml More warnings when compiling the compiler. 2016-03-15 22:46:35 +01:00
strmatch.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
un_anf.ml Renaming block_kind -> value_kind. 2016-04-12 14:49:50 +02:00
un_anf.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
x86_ast.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
x86_dsl.ml Add X86_dsl.r13 2016-06-20 11:19:17 +01:00
x86_dsl.mli Add X86_dsl.r13 2016-06-20 11:19:17 +01:00
x86_gas.ml Don't emit .loc with negative column numbers 2016-04-14 13:30:10 -04:00
x86_gas.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
x86_masm.ml Update headers for the new license. 2016-02-18 16:59:16 +01:00
x86_masm.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00
x86_proc.ml Update headers for the new license. 2016-02-18 16:59:16 +01:00
x86_proc.mli Update headers for the new license. 2016-02-18 16:59:16 +01:00