Skip to content
This repository was archived by the owner on Nov 12, 2020. It is now read-only.

Commit 72cfdd5

Browse files
Fourchauxmshinwell
authored andcommitted
Typos and basic grammar error fixing (#1280)
1 parent 9a1ddfa commit 72cfdd5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+228
-224
lines changed

Changes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ Working version
179179

180180
- GPR#1187: Minimal documentation for compiler plugins
181181
(Florian Angeletti)
182+
183+
- GPR#1202: Fix Typos in comments as well as basic grammar errors.
184+
(JP Rodi, review and suggestions by David Allsopp, Max Mouratov,
185+
Florian Angeletti, Xavier Leroy, Mark Shinwell and Damien Doligez)
182186

183187
- GPR#1220: Fix "-keep-docs" option in ocamlopt manpage
184188
(Etienne Millon)

asmcomp/amd64/arch.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type specific_operation =
3939
| Ioffset_loc of int * addressing_mode (* Add a constant to a location *)
4040
| Ifloatarithmem of float_operation * addressing_mode
4141
(* Float arith operation with memory *)
42-
| Ibswap of int (* endiannes conversion *)
42+
| Ibswap of int (* endianness conversion *)
4343
| Isqrtf (* Float square root *)
4444
| Ifloatsqrtf of addressing_mode (* Float square root from memory *)
4545
and float_operation =

asmcomp/arm/arch.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ type specific_operation =
122122
| Imulsubf (* floating-point multiply and subtract *)
123123
| Inegmulsubf (* floating-point negate, multiply and subtract *)
124124
| Isqrtf (* floating-point square root *)
125-
| Ibswap of int (* endianess conversion *)
125+
| Ibswap of int (* endianness conversion *)
126126

127127
and arith_operation =
128128
Ishiftadd

asmcomp/arm/proc.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ let word_addressed = false
4242
Floating-point register map (VFPv{2,3}):
4343
d0 - d7 general purpose (not preserved)
4444
d8 - d15 general purpose (preserved)
45-
d16 - d31 generat purpose (not preserved), VFPv3 only
45+
d16 - d31 general purpose (not preserved), VFPv3 only
4646
*)
4747

4848
let int_reg_name =

asmcomp/arm64/arch.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ type specific_operation =
5454
| Imulsubf (* floating-point multiply and subtract *)
5555
| Inegmulsubf (* floating-point negate, multiply and subtract *)
5656
| Isqrtf (* floating-point square root *)
57-
| Ibswap of int (* endianess conversion *)
57+
| Ibswap of int (* endianness conversion *)
5858

5959
and arith_operation =
6060
Ishiftadd

asmcomp/arm64/proc.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ let word_addressed = false
4343
Floating-point register map:
4444
d0 - d7 general purpose (caller-save)
4545
d8 - d15 general purpose (callee-save)
46-
d16 - d31 generat purpose (caller-save)
46+
d16 - d31 general purpose (caller-save)
4747
*)
4848

4949
let int_reg_name =

asmcomp/emitaux.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ let reset_debug_info () =
273273
file_pos_nums := [];
274274
file_pos_num_cnt := 1
275275

276-
(* We only diplay .file if the file has not been seen before. We
276+
(* We only display .file if the file has not been seen before. We
277277
display .loc for every instruction. *)
278278
let emit_debug_info_gen dbg file_emitter loc_emitter =
279279
if is_cfi_enabled () &&

asmcomp/s390x/proc.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ let word_addressed = false
3333
0 temporary, null register for some operations (volatile)
3434
1 temporary (volatile)
3535
2 - 5 function arguments and results (volatile)
36-
6 function arguments and results (persevered by C)
36+
6 function arguments and results (preserved by C)
3737
7 - 9 general purpose, preserved by C
3838
10 allocation limit (preserved by C)
3939
11 allocation pointer (preserved by C)

asmcomp/schedgen.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ let rec longest_path critical_outputs node =
114114
[] ->
115115
node.length <-
116116
if is_critical critical_outputs node.instr.res
117-
|| node.instr.desc = Lreloadretaddr (* alway critical *)
117+
|| node.instr.desc = Lreloadretaddr (* always critical *)
118118
then node.delay
119119
else 0
120120
| sons ->
@@ -337,7 +337,7 @@ method private reschedule ready_queue date cont =
337337
(* Remove node from queue *)
338338
let new_queue = ref (remove_instr node ready_queue) in
339339
(* Update the start date and number of ancestors emitted of
340-
all descendents of this node. Enter those that become ready
340+
all descendants of this node. Enter those that become ready
341341
in the queue. *)
342342
let issue_cycles = self#instr_issue_cycles node.instr in
343343
List.iter

asmcomp/strmatch.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ module Make(I:I) = struct
334334
(*
335335
Switch according to pattern size
336336
Argument from_ind is the starting index, it can be zero
337-
or one (when the swicth on the cell 0 has already been performed.
337+
or one (when the switch on the cell 0 has already been performed.
338338
In that latter case pattern len is string length-1 and is corrected.
339339
*)
340340

asmcomp/un_anf.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ let rec un_anf_and_moveable ident_info env (clam : Clambda.ulambda)
622622
un_anf_and_moveable ident_info env body
623623
| Constant, _, true, false
624624
(* A constant expression bound to an unassigned identifier can replace any
625-
occurances of the identifier. *)
625+
occurrences of the identifier. *)
626626
| Moveable, true, true, false ->
627627
(* A moveable expression bound to a linear unassigned [Ident.t]
628628
may replace the single occurrence of the identifier. *)

bytecomp/bytegen.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,7 @@ let rec comp_expr env exp sz cont =
679679
comp_expr env (Lprim (Pccall prim_obj_dup, [arg], loc)) sz cont
680680
| Lprim (Pduparray _, _, _) ->
681681
Misc.fatal_error "Bytegen.comp_expr: Pduparray takes exactly one arg"
682-
(* Integer first for enabling futher optimization (cf. emitcode.ml) *)
682+
(* Integer first for enabling further optimization (cf. emitcode.ml) *)
683683
| Lprim (Pintcomp c, [arg ; (Lconst _ as k)], _) ->
684684
let p = Pintcomp (commute_comparison c)
685685
and args = [k ; arg] in

bytecomp/instruct.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type compilation_env =
2929
stack frame.
3030
The ce_heap component gives the positions of variables residing in the
3131
heap-allocated environment.
32-
The ce_rec component associate offsets to identifiers for functions
32+
The ce_rec component associates offsets to identifiers for functions
3333
bound by the same let rec as the current function. The offsets
3434
are used by the OFFSETCLOSURE instruction to recover the closure
3535
pointer of the desired function from the env register (which

bytecomp/matching.ml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ let pretty_precompiled_res first nexts =
450450

451451

452452

453-
(* Identifing some semantically equivalent lambda-expressions,
453+
(* Identifying some semantically equivalent lambda-expressions,
454454
Our goal here is also to
455455
find alpha-equivalent (simple) terms *)
456456

@@ -571,7 +571,7 @@ let up_ok (ps,act_p) l =
571571

572572

573573
(*
574-
Simplify fonction normalize the first column of the match
574+
The simplify function normalizes the first column of the match
575575
- records are expanded so that they possess all fields
576576
- aliases are removed and replaced by bindings in actions.
577577
However or-patterns are simplified differently,
@@ -1835,7 +1835,7 @@ let share_actions_tree sw d =
18351835
let sw =
18361836
List.map (fun (cst,act) -> cst,store.Switch.act_store act) sw in
18371837

1838-
(* Retrieve all actions, including potentiel default *)
1838+
(* Retrieve all actions, including potential default *)
18391839
let acts = store.Switch.act_get_shared () in
18401840

18411841
(* Array of actual actions *)
@@ -2106,7 +2106,7 @@ let as_interval_nofail l =
21062106
| (i,act)::rem ->
21072107
let act_index =
21082108
(* In case there is some hole and that a switch is emitted,
2109-
action 0 will be used as the action of unreacheable
2109+
action 0 will be used as the action of unreachable
21102110
cases (cf. switch.ml, make_switch).
21112111
Hence, this action will be shared *)
21122112
if some_hole rem then
@@ -2813,7 +2813,7 @@ and compile_no_test divide up_ctx repr partial ctx to_match =
28132813
or lazy pattern execute arbitrary code that may perform side effects
28142814
and change the subject values.
28152815
LM:
2816-
Lazy pattern was PR #5992, initial patch by lwp25.
2816+
Lazy pattern was PR#5992, initial patch by lpw25.
28172817
I have generalized the patch, so as to also find mutable fields.
28182818
*)
28192819

@@ -3100,7 +3100,7 @@ let rec flatten_pat_line size p k = match p.pat_desc with
31003100
| Tpat_tuple args -> args::k
31013101
| Tpat_or (p1,p2,_) -> flatten_pat_line size p1 (flatten_pat_line size p2 k)
31023102
| Tpat_alias (p,_,_) -> (* Note: if this 'as' pat is here, then this is a
3103-
useless binding, solves PR #3780 *)
3103+
useless binding, solves PR#3780 *)
31043104
flatten_pat_line size p k
31053105
| _ -> fatal_error "Matching.flatten_pat_line"
31063106

@@ -3207,7 +3207,7 @@ let do_for_multiple_match loc paraml pat_act_list partial =
32073207
with Unused ->
32083208
assert false (* ; partial_function loc () *)
32093209

3210-
(* #PR4828: Believe it or not, the 'paraml' argument below
3210+
(* PR#4828: Believe it or not, the 'paraml' argument below
32113211
may not be side effect free. *)
32123212

32133213
let param_to_var param = match param with

bytecomp/simplif.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ let simplify_exits lam =
135135
end
136136
| Lstaticraise (i,ls) -> incr_exit i ; List.iter count ls
137137
| Lstaticcatch (l1,(i,[]),Lstaticraise (j,[])) ->
138-
(* i will be replaced by j in l1, so each occurence of i in l1
138+
(* i will be replaced by j in l1, so each occurrence of i in l1
139139
increases j's ref count *)
140140
count l1 ;
141141
let ic = count_exit i in

bytecomp/switch.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ let make_key cases =
359359

360360

361361
(*
362-
Intervall test x in [l,h] works by checking x-l in [0,h-l]
362+
Interval test x in [l,h] works by checking x-l in [0,h-l]
363363
* This may be false for arithmetic modulo 2^31
364364
* Subtracting l may change the relative ordering of values
365365
and invalid the invariant that matched values are given in
@@ -659,7 +659,7 @@ and enum top cases =
659659
(* Minimal density of switches *)
660660
let theta = ref 0.33333
661661

662-
(* Minmal number of tests to make a switch *)
662+
(* Minimal number of tests to make a switch *)
663663
let switch_min = ref 3
664664

665665
(* Particular case 0, 1, 2 *)
@@ -699,7 +699,7 @@ let dense {cases} i j =
699699
Adaptation of the correction to Bernstein
700700
``Correction to `Producing Good Code for the Case Statement' ''
701701
S.K. Kannan and T.A. Proebsting
702-
Software Practice and Exprience Vol. 24(2) 233 (Feb 1994)
702+
Software Practice and Experience Vol. 24(2) 233 (Feb 1994)
703703
*)
704704

705705
let comp_clusters s =

bytecomp/switch.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module type S =
9595
- actions is an array of actions.
9696
9797
All these arguments specify a switch construct and zyva
98-
returns an action that performs the switch,
98+
returns an action that performs the switch.
9999
*)
100100
module Make :
101101
functor (Arg : S) ->

bytecomp/translattribute.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ let get_and_remove_specialised_attribute e =
201201
let specialised = parse_specialise_attribute attr in
202202
specialised, { e with exp_attributes }
203203

204-
(* It also remove the attribute from the expression, like
204+
(* It also removes the attribute from the expression, like
205205
get_inlined_attribute *)
206206
let get_tailcall_attribute e =
207207
let is_tailcall_attribute = function

bytecomp/translclass.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ open M
625625
env_init: parameterisation by the local environment
626626
(env -> params -> obj_init)
627627
(one for each combination of inherited class_init )
628-
env: environnement local
628+
env: local environment
629629
If ids=0 (immediate object), then only env_init is conserved.
630630
*)
631631

@@ -779,7 +779,7 @@ let transl_class ids cl_id pub_meths cl vflag =
779779
if top && concrete then lclass lbody else
780780
if top then llets (lbody_virt lambda_unit) else
781781

782-
(* Now for the hard stuff: prepare for table cacheing *)
782+
(* Now for the hard stuff: prepare for table caching *)
783783
let envs = Ident.create "envs"
784784
and cached = Ident.create "cached" in
785785
let lenvs =

bytecomp/translmod.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ let compose_coercions c1 c2 =
171171
c3
172172
*)
173173

174-
(* Record the primitive declarations occuring in the module compiled *)
174+
(* Record the primitive declarations occurring in the module compiled *)
175175

176176
let primitive_declarations = ref ([] : Primitive.description list)
177177
let record_primitive = function

bytecomp/translobj.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ let transl_label_init_flambda f =
114114
assert(Config.flambda);
115115
let method_cache_id = Ident.create "method_cache" in
116116
method_cache := Lvar method_cache_id;
117-
(* Calling f (usualy Translmod.transl_struct) requires the
117+
(* Calling f (usually Translmod.transl_struct) requires the
118118
method_cache variable to be initialised to be able to generate
119119
method accesses. *)
120120
let expr, size = f () in

debugger/breakpoints.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ let set_breakpoints pos =
103103
set_breakpoint pos)
104104
pos
105105

106-
(* Ensure the current version in installed in current checkpoint. *)
106+
(* Ensure the current version is installed in current checkpoint. *)
107107
let update_breakpoints () =
108108
if !debug_breakpoints then begin
109109
prerr_string "Updating breakpoints... ";

debugger/breakpoints.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ val breakpoints_at_pc : int -> int list
3636

3737
(*** Set and remove breakpoints ***)
3838

39-
(* Ensure the current version in installed in current checkpoint. *)
39+
(* Ensure the current version is installed in current checkpoint. *)
4040
val update_breakpoints : unit -> unit
4141

4242
(* Execute given function with no breakpoint in current checkpoint. *)

debugger/debugger_config.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ let make_checkpoints = ref
8282
"Win32" -> false
8383
| _ -> true)
8484

85-
(*** Environment variables for debugee. ***)
85+
(*** Environment variables for debuggee. ***)
8686

8787
let environment = ref []

debugger/int64ops.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(* *)
33
(* OCaml *)
44
(* *)
5-
(* Damien Doligez, projet Moscova, INRIA Rocqencourt *)
5+
(* Damien Doligez, projet Moscova, INRIA Rocquencourt *)
66
(* *)
77
(* Copyright 2002 Institut National de Recherche en Informatique et *)
88
(* en Automatique. *)

debugger/int64ops.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(* *)
33
(* OCaml *)
44
(* *)
5-
(* Damien Doligez, projet Moscova, INRIA Rocqencourt *)
5+
(* Damien Doligez, projet Moscova, INRIA Rocquencourt *)
66
(* *)
77
(* Copyright 2002 Institut National de Recherche en Informatique et *)
88
(* en Automatique. *)

debugger/loadprinter.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ let eval_path path =
105105
(* Install, remove a printer (as in toplevel/topdirs) *)
106106

107107
(* since 4.00, "topdirs.cmi" is not in the same directory as the standard
108-
libray, so we load it beforehand as it cannot be found in the search path. *)
108+
library, so we load it beforehand as it cannot be found in the search path. *)
109109
let () =
110110
let compiler_libs =
111111
Filename.concat Config.standard_library "compiler-libs" in

debugger/program_loading.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ let exec_with_runtime =
140140
(Filename.quote !program_name)
141141
!arguments)
142142

143-
(* Excute the program directly *)
143+
(* Execute the program directly *)
144144
let exec_direct =
145145
generic_exec
146146
(function () ->

debugger/time_travel.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ let cut2 t0 t l =
147147
let (after, before) = cut (t0 -- _1) l in
148148
after::(cut2_t0 t before)
149149

150-
(* Separate first elements and last element of a list of checkpoint. *)
150+
(* Separate first elements and last element of a list of checkpoints. *)
151151
let chk_merge2 cont =
152152
let rec chk_merge2_cont =
153153
function
@@ -216,7 +216,7 @@ let find_checkpoint_before time =
216216
in find !checkpoints
217217

218218
(* Make a copy of the current checkpoint and clean the checkpoint list. *)
219-
(* --- The new checkpoint in not put in the list. *)
219+
(* --- The new checkpoint is not put in the list. *)
220220
let duplicate_current_checkpoint () =
221221
let checkpoint = !current_checkpoint in
222222
if not checkpoint.c_valid then
@@ -499,14 +499,14 @@ let rec run () =
499499
if not !interrupted then
500500
run ()
501501

502-
(* Run backward the program form current time. *)
502+
(* Run the program backward from current time. *)
503503
(* Stop at the first breakpoint, or at the beginning of the program. *)
504504
let back_run () =
505505
if current_time () > _0 then
506506
back_to _0 (current_time ())
507507

508508
(* Step in any direction. *)
509-
(* Stop at the first brakpoint, or after `duration' steps. *)
509+
(* Stop at the first breakpoint, or after `duration' steps. *)
510510
let step duration =
511511
if duration >= _0 then
512512
step_forward duration

0 commit comments

Comments
 (0)