Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
214 commits
Select commit Hold shift + click to select a range
7926bee
dce: tooling to run reanalyze dead-code analysis on the compiler
JonoPrest Jun 11, 2026
d5e2cc1
dce: use @check for entry-point cmts; document #203 reliability blocker
JonoPrest Jun 11, 2026
4183326
dce: document the precise root cause of reanalyze#203's false positives
JonoPrest Jun 11, 2026
6adae89
dce: add baseline report
JonoPrest Jun 12, 2026
bab4af9
dce: remove unused process_file kind
JonoPrest Jun 12, 2026
9748813
dce: remove unused cmt filters
JonoPrest Jun 12, 2026
e77d9df
dce: remove unused outputprefix args
JonoPrest Jun 12, 2026
3442961
dce: simplify disjoint_union
JonoPrest Jun 12, 2026
d9079af
dce: fix live printer annotation
JonoPrest Jun 12, 2026
f399489
dce: simplify array test asserts
JonoPrest Jun 12, 2026
b607181
dce: simplify hash stub asserts
JonoPrest Jun 12, 2026
58881af
dce: simplify hashtable test asserts
JonoPrest Jun 12, 2026
96eec83
dce: inline jsx loc assert
JonoPrest Jun 12, 2026
3b524c6
dce: simplify list test asserts
JonoPrest Jun 12, 2026
d7e3fb7
dce: simplify map test asserts
JonoPrest Jun 12, 2026
0fde7b9
dce: simplify string test asserts
JonoPrest Jun 12, 2026
8a3989a
dce: simplify utf8 test asserts
JonoPrest Jun 12, 2026
79cb287
dce: simplify util test asserts
JonoPrest Jun 12, 2026
4875980
dce: simplify raise assertion
JonoPrest Jun 12, 2026
8115b5f
dce: note live reanalyze stats
JonoPrest Jun 12, 2026
f724fdd
dce: require ppx restore flag
JonoPrest Jun 12, 2026
fc9a119
dce: remove unused open slot
JonoPrest Jun 12, 2026
c02633f
dce: narrow typed completions helper
JonoPrest Jun 12, 2026
0352606
dce: require apply metadata
JonoPrest Jun 12, 2026
b3d08ab
dce: narrow js mapper app helpers
JonoPrest Jun 12, 2026
43c60d5
dce: note live ast helper labels
JonoPrest Jun 12, 2026
250c180
dce: remove unused args finish
JonoPrest Jun 12, 2026
5330642
dce: narrow pipeable filter
JonoPrest Jun 12, 2026
65fb4b0
dce: require pipe transform flag
JonoPrest Jun 12, 2026
2204004
dce: note live type contexts
JonoPrest Jun 12, 2026
8101f3e
dce: remove block comment arg
JonoPrest Jun 12, 2026
4965d4e
dce: note live parse flag
JonoPrest Jun 12, 2026
45dbd7f
dce: remove js expr comments
JonoPrest Jun 12, 2026
c041798
dce: narrow local extern helpers
JonoPrest Jun 12, 2026
8e74388
dce: remove var comment arg
JonoPrest Jun 12, 2026
e843dbb
dce: narrow typecore helpers
JonoPrest Jun 12, 2026
9164d94
dce: note live from_type errors
JonoPrest Jun 12, 2026
dfcf8b9
dce: fix write_file annotation
JonoPrest Jun 12, 2026
592fe62
dce: remove literal comments
JonoPrest Jun 12, 2026
16d5740
dce: narrow spread parser
JonoPrest Jun 12, 2026
6199133
dce: narrow ast compatible helpers
JonoPrest Jun 12, 2026
8182d8c
dce: narrow parmatch helpers
JonoPrest Jun 12, 2026
3a69af6
dce: simplify paren printer
JonoPrest Jun 12, 2026
d6794ab
dce: simplify completion create
JonoPrest Jun 12, 2026
92a56bc
dce: simplify exotic ident printer
JonoPrest Jun 12, 2026
470287c
dce: narrow ident char convert
JonoPrest Jun 12, 2026
4e3e270
dce: narrow printtyp reporters
JonoPrest Jun 12, 2026
36e7b23
dce: remove free_variables env
JonoPrest Jun 12, 2026
8b2eb65
dce: remove subtype ctx
JonoPrest Jun 12, 2026
bad5555
dce: note live env lookup loc
JonoPrest Jun 12, 2026
a433ac5
dce: require async promise loc
JonoPrest Jun 12, 2026
3bf943c
dce: remove newgenvar name
JonoPrest Jun 12, 2026
f8a7802
dce: exclude unit tests
JonoPrest Jun 12, 2026
81a69c7
dce: narrow ast helper labels
JonoPrest Jun 12, 2026
629f971
dce: remove arg label loc
JonoPrest Jun 12, 2026
1677ced
dce: narrow location helpers
JonoPrest Jun 12, 2026
f2afdbf
dce: note live report error args
JonoPrest Jun 12, 2026
764230d
dce: remove unused reactive exports
JonoPrest Jun 12, 2026
0f35d00
dce: note live reactive internals
JonoPrest Jun 12, 2026
4411f50
dce: trim reactive interfaces
JonoPrest Jun 12, 2026
5ef9ca5
dce: note live file collection
JonoPrest Jun 12, 2026
cd7bf43
dce: remove unused result helpers
JonoPrest Jun 12, 2026
f8c67b1
dce: note live arnold compares
JonoPrest Jun 12, 2026
3ea9dc2
dce: drop inline record bindings
JonoPrest Jun 12, 2026
47438f0
dce: hide item store iterators
JonoPrest Jun 12, 2026
5a34796
dce: remove dead code alias
JonoPrest Jun 12, 2026
e5d5dc7
dce: remove stale reactive solver
JonoPrest Jun 12, 2026
d257a44
dce: note live map compares
JonoPrest Jun 12, 2026
50ff761
dce: remove stale declaration helpers
JonoPrest Jun 12, 2026
39e7327
dce: note live freeze helpers
JonoPrest Jun 12, 2026
dc0cbf8
dce: remove unused exception names
JonoPrest Jun 12, 2026
728fe6b
dce: note live exn compare
JonoPrest Jun 12, 2026
ab435a2
dce: remove annotation accessors
JonoPrest Jun 12, 2026
fe7ccea
dce: trim file deps
JonoPrest Jun 12, 2026
377e201
dce: remove analyzer helpers
JonoPrest Jun 12, 2026
ff2f8fe
dce: trim reactive exports
JonoPrest Jun 12, 2026
f5a9ffc
dce: trim reanalyze state
JonoPrest Jun 12, 2026
0b2084e
dce: trim analysis helpers
JonoPrest Jun 12, 2026
0d9d4cf
dce: note package version state
JonoPrest Jun 12, 2026
992ede9
dce: trim common helpers
JonoPrest Jun 12, 2026
06b4ff6
dce: note js analyzer liveness
JonoPrest Jun 12, 2026
42bf7d5
dce: trim cmj readers
JonoPrest Jun 12, 2026
fca06e9
dce: note core js liveness
JonoPrest Jun 12, 2026
549bbcc
dce: trim js dump literals
JonoPrest Jun 12, 2026
0628a79
dce: note js dump liveness
JonoPrest Jun 12, 2026
cb69c20
dce: trim js exp helpers
JonoPrest Jun 12, 2026
f6c704e
dce: note js exp liveness
JonoPrest Jun 12, 2026
5813dfe
dce: trim option helpers
JonoPrest Jun 12, 2026
5da36b6
dce: note js lowering liveness
JonoPrest Jun 12, 2026
678bb37
dce: trim js op types
JonoPrest Jun 12, 2026
75b4704
dce: trim js debug helpers
JonoPrest Jun 12, 2026
25390c6
dce: note js op liveness
JonoPrest Jun 12, 2026
dec8c5d
dce: trim package helpers
JonoPrest Jun 12, 2026
7880688
dce: note package liveness
JonoPrest Jun 12, 2026
420664c
dce: note js pass liveness
JonoPrest Jun 12, 2026
88ebcf5
dce: note stmt builder liveness
JonoPrest Jun 12, 2026
a7e0b14
dce: trim lam alias
JonoPrest Jun 12, 2026
efd1fe4
dce: trim lam inner map
JonoPrest Jun 12, 2026
7a00407
dce: note lam liveness
JonoPrest Jun 12, 2026
d40e758
dce: trim arity debug
JonoPrest Jun 12, 2026
332d29a
dce: note lambda pass liveness
JonoPrest Jun 12, 2026
a1a8b1b
dce: trim int compare
JonoPrest Jun 12, 2026
07c1215
dce: note compat liveness
JonoPrest Jun 12, 2026
3c91dee
dce: note compile liveness
JonoPrest Jun 12, 2026
9295a0c
dce: note ffi liveness
JonoPrest Jun 12, 2026
5146d17
dce: trim dead APIs
JonoPrest Jun 12, 2026
aad9a3b
dce: remove undefined primitive
JonoPrest Jun 12, 2026
c130612
dce: note fixpoint liveness
JonoPrest Jun 12, 2026
85a76b4
dce: note id kind liveness
JonoPrest Jun 12, 2026
40dbf79
dce: note lambda pass liveness
JonoPrest Jun 12, 2026
fba6366
dce: remove runtime apply primitive
JonoPrest Jun 12, 2026
3bfebb2
dce: trim misc helpers
JonoPrest Jun 12, 2026
d16ca32
dce: note misc liveness
JonoPrest Jun 12, 2026
fdbe9c3
dce: trim literal constants
JonoPrest Jun 12, 2026
cab9f6b
dce: note literal liveness
JonoPrest Jun 12, 2026
776ddda
dce: trim list helpers
JonoPrest Jun 12, 2026
480e708
dce: note list liveness
JonoPrest Jun 12, 2026
61ce615
dce: note collection liveness
JonoPrest Jun 12, 2026
86ea981
dce: trim array helpers
JonoPrest Jun 12, 2026
94b4cc7
dce: note array liveness
JonoPrest Jun 12, 2026
c36c7f8
dce: trim lambda debug API
JonoPrest Jun 12, 2026
8d41522
dce: note lambda printer liveness
JonoPrest Jun 12, 2026
a684e06
dce: root unicode test helpers
JonoPrest Jun 12, 2026
9fdf5f4
dce: note primitive module liveness
JonoPrest Jun 12, 2026
e7a1e9c
dce: trim syntax CLI colors
JonoPrest Jun 12, 2026
2681f9a
dce: trim syntax helpers
JonoPrest Jun 12, 2026
281bb82
dce: trim syntax print engine
JonoPrest Jun 12, 2026
575c5db
dce: trim unused ext helpers
JonoPrest Jun 12, 2026
4725b5e
dce: remove ext stats formatter
JonoPrest Jun 12, 2026
61ef8a9
dce: note ext util liveness
JonoPrest Jun 12, 2026
28659d3
dce: root utf8 test helper
JonoPrest Jun 12, 2026
8b7d710
dce: trim JS reserved map
JonoPrest Jun 12, 2026
da0903b
dce: trim buffer helpers
JonoPrest Jun 12, 2026
f4e96cf
dce: note buffer liveness
JonoPrest Jun 12, 2026
a87dcfb
dce: root filename test helpers
JonoPrest Jun 12, 2026
f9f20ee
dce: note filename liveness
JonoPrest Jun 12, 2026
1255408
dce: trim arg spec variants
JonoPrest Jun 12, 2026
3db4299
dce: trim ext debug helpers
JonoPrest Jun 12, 2026
12206d4
dce: note ext helper liveness
JonoPrest Jun 12, 2026
220e675
dce: trim ext test helpers
JonoPrest Jun 12, 2026
634449d
dce: note ext test liveness
JonoPrest Jun 12, 2026
dea85ba
dce: remove identifiable pair
JonoPrest Jun 12, 2026
de06899
dce: note ident liveness
JonoPrest Jun 12, 2026
31a1dcc
dce: trim warnings API
JonoPrest Jun 12, 2026
b0d5773
dce: note hash liveness
JonoPrest Jun 12, 2026
29214ec
dce: trim frontend helpers
JonoPrest Jun 12, 2026
44dda5d
dce: trim frontend literals
JonoPrest Jun 12, 2026
d4d008d
dce: trim frontend helpers
JonoPrest Jun 12, 2026
d03d317
dce: root utf8 test hook
JonoPrest Jun 12, 2026
60c41e2
dce: trim literal interface
JonoPrest Jun 12, 2026
3146029
dce: note frontend liveness
JonoPrest Jun 12, 2026
c3564c4
dce: trim frontend constants
JonoPrest Jun 12, 2026
42773b4
dce: note frontend constants
JonoPrest Jun 12, 2026
c1f2e4f
dce: trim gentype config
JonoPrest Jun 12, 2026
3030b02
dce: note gentype liveness
JonoPrest Jun 12, 2026
3864b90
dce: trim call annotations
JonoPrest Jun 12, 2026
697d486
dce: trim ast helper
JonoPrest Jun 12, 2026
88ff69a
dce: note ast helper0 liveness
JonoPrest Jun 12, 2026
237d5fd
dce: note ast mapper liveness
JonoPrest Jun 12, 2026
5512ec7
dce: trim mapper helpers
JonoPrest Jun 12, 2026
8282068
dce: trim ast payload
JonoPrest Jun 12, 2026
27975b1
dce: trim untagged helpers
JonoPrest Jun 12, 2026
d4039b1
dce: note untagged checks
JonoPrest Jun 12, 2026
9c7f294
dce: trim ml utilities
JonoPrest Jun 12, 2026
a70028d
dce: trim ml flags
JonoPrest Jun 12, 2026
cae950b
dce: note cmt liveness
JonoPrest Jun 12, 2026
65b434c
dce: trim consistbl
JonoPrest Jun 12, 2026
643457a
dce: use fixed reanalyze
JonoPrest Jun 12, 2026
bd4f861
dce: trim ctype
JonoPrest Jun 12, 2026
ff1867c
dce: trim ml deps
JonoPrest Jun 12, 2026
d9ab0e7
dce: trim env
JonoPrest Jun 12, 2026
cc8e43c
dce: note env liveness
JonoPrest Jun 12, 2026
cd65766
dce: trim ml matching
JonoPrest Jun 12, 2026
7acb783
dce: note ml liveness
JonoPrest Jun 12, 2026
91c992d
dce: trim ml exports
JonoPrest Jun 12, 2026
b41f3b4
dce: trim debug helpers
JonoPrest Jun 12, 2026
7a0bb42
dce: trim typing exports
JonoPrest Jun 12, 2026
d20275d
dce: note typedtree liveness
JonoPrest Jun 12, 2026
094b8c2
dce: trim outcome printers
JonoPrest Jun 12, 2026
42fea08
dce: trim bs exception
JonoPrest Jun 12, 2026
bb25604
dce: trim lambda helpers
JonoPrest Jun 12, 2026
1a9ff6f
dce: trim js helpers
JonoPrest Jun 12, 2026
25d4d86
dce: note js liveness
JonoPrest Jun 12, 2026
4cc3ca9
dce: note parsetree0 liveness
JonoPrest Jun 12, 2026
e334b06
dce: note callback liveness
JonoPrest Jun 12, 2026
df4b2cc
dce: note callback liveness
JonoPrest Jun 12, 2026
cae2dfa
dce: trim js debug exports
JonoPrest Jun 12, 2026
a7b3e87
dce: trim dead helpers
JonoPrest Jun 12, 2026
c05a03a
dce: trim js traversals
JonoPrest Jun 12, 2026
0348e21
dce: trim lambda optionals
JonoPrest Jun 12, 2026
bf7a2cf
dce: trim js stmt optionals
JonoPrest Jun 12, 2026
5499095
dce: trim js exp optionals
JonoPrest Jun 12, 2026
7f4df5b
dce: trim js numeric optionals
JonoPrest Jun 12, 2026
233c4c8
dce: trim js arithmetic optionals
JonoPrest Jun 12, 2026
551753c
dce: note untagged switch liveness
JonoPrest Jun 12, 2026
69efd3c
dce: note namespace helpers
JonoPrest Jun 12, 2026
87ab438
dce: remove unused ext sys helper
JonoPrest Jun 12, 2026
dd8833e
dce: note location hooks
JonoPrest Jun 12, 2026
8c8294f
dce: remove js file kind record
JonoPrest Jun 12, 2026
a24fe29
dce: remove lam function helper
JonoPrest Jun 12, 2026
df879b4
dce: remove unused debugger literal
JonoPrest Jun 12, 2026
c8ae11e
dce: remove unused dynamic check helper
JonoPrest Jun 12, 2026
9cc6b61
dce: remove unused misc output helper
JonoPrest Jun 12, 2026
5d9c3d3
dce: remove identifiable helper
JonoPrest Jun 12, 2026
a14bf9f
dce: note ext pervasives tests
JonoPrest Jun 12, 2026
cbc5179
dce: trim hash set poly exports
JonoPrest Jun 12, 2026
ec30a41
dce: trim lam print export
JonoPrest Jun 12, 2026
9dab4fa
dce: require parse error flag
JonoPrest Jun 12, 2026
4746f43
dce: remove analysis version state
JonoPrest Jun 12, 2026
9d9b4b2
dce: trim cmt format exports
JonoPrest Jun 12, 2026
4d25b06
dce: remove cmt deprecated text
JonoPrest Jun 12, 2026
8ee8257
dce: trim map set core helpers
JonoPrest Jun 12, 2026
bcd1f66
dce: clarify map set findings
JonoPrest Jun 12, 2026
1b1e3f6
dce: track reanalyze branch
JonoPrest Jun 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ package.tgz

# AI Agents
.claude/settings.local.json

# reanalyze DCE report output
_dce/
1,876 changes: 1,876 additions & 0 deletions _dce/report.txt

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions analysis/reactive/src/reactive.ml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ type ('k, 'v) delta =
| Batch of ('k * 'v option) list

let set k v = (k, Some v)
let remove k = (k, None)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCE-confirmed cleanup: removed unused reactive exports. Covers reactive.mli too.


let delta_to_entries = function
| Set (k, v) -> [(k, Some v)]
Expand Down Expand Up @@ -437,8 +436,6 @@ module Scheduler = struct
!processed_nodes wave_elapsed_ms);
propagating := false)

let wave_count () = !wave_counter
let reset_wave_count () = wave_counter := 0
end

(** {1 Collection Interface} *)
Expand All @@ -457,8 +454,6 @@ let iter f t = t.iter f
let get t k = t.get k
let length t = t.length ()
let stats t = t.stats
let level t = t.level
let name t = t.name

(** {1 Source Collection} *)

Expand Down
43 changes: 0 additions & 43 deletions analysis/reactive/src/reactive.mli
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ type ('k, 'v) delta =
val set : 'k -> 'v -> 'k * 'v option
(** Create a batch entry that sets a key *)

val remove : 'k -> 'k * 'v option

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCE: trimmed dead APIs; trimmed reactive interfaces; removed unused reactive exports.

(** Create a batch entry that removes a key *)

val delta_to_entries : ('k, 'v) delta -> ('k * 'v option) list
(** Convert delta to batch entries *)

(** {1 Statistics} *)

type stats = {
Expand All @@ -45,41 +39,6 @@ type stats = {
}
(** Per-node statistics for diagnostics *)

val create_stats : unit -> stats

(** {1 Node Registry} *)

module Registry : sig
type node_info
(** Information about a registered node *)

val clear : unit -> unit
(** Clear all registered nodes *)

val to_mermaid : unit -> string
(** Generate a Mermaid diagram of the pipeline *)

val print_stats : unit -> unit
(** Print timing statistics for all nodes *)
end

(** {1 Scheduler} *)

module Scheduler : sig
val propagate : unit -> unit
(** Process all dirty nodes in topological order.
Called automatically when a source emits. *)

val is_propagating : unit -> bool
(** Returns true if currently in a propagation wave *)

val wave_count : unit -> int
(** Number of propagation waves executed *)

val reset_wave_count : unit -> unit
(** Reset the wave counter *)
end

(** {1 Collection Interface} *)

type ('k, 'v) t = {
Expand All @@ -97,8 +56,6 @@ val iter : ('k -> 'v -> unit) -> ('k, 'v) t -> unit
val get : ('k, 'v) t -> 'k -> 'v option
val length : ('k, 'v) t -> int
val stats : ('k, 'v) t -> stats
val level : ('k, 'v) t -> int
val name : ('k, 'v) t -> string

(** {1 Source Collection} *)

Expand Down
34 changes: 0 additions & 34 deletions analysis/reactive/src/reactive_file_collection.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,6 @@ let to_collection t : (string, 'v) Reactive.t = t.collection
(** Emit a delta *)
let emit t delta = t.emit delta

(** Process a file if changed. Emits delta to subscribers. *)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCE: trimmed dead APIs; trimmed reactive interfaces. Covers reactive_file_collection.mli too.

let process_if_changed t path =
let new_id = get_file_id path in
match Hashtbl.find_opt t.internal.cache path with
| Some (old_id, _) when not (file_changed ~old_id ~new_id) ->
false (* unchanged *)
| _ ->
let raw = t.internal.read_file path in
let value = t.internal.process path raw in
Hashtbl.replace t.internal.cache path (new_id, value);
emit t (Reactive.Set (path, value));
true (* changed *)

(** Process multiple files (emits individual deltas) *)
let process_files t paths =
List.iter (fun path -> ignore (process_if_changed t path)) paths

(** Process a file without emitting. Returns batch entry if changed. *)
let process_file_silent t path =
let new_id = get_file_id path in
Expand All @@ -77,11 +60,6 @@ let process_files_batch t paths =
if entries <> [] then emit t (Reactive.Batch entries);
List.length entries

(** Remove a file *)
let remove t path =
Hashtbl.remove t.internal.cache path;
emit t (Reactive.Remove path)

(** Remove multiple files as a batch *)
let remove_batch t paths =
let entries =
Expand All @@ -95,17 +73,5 @@ let remove_batch t paths =
if entries <> [] then emit t (Reactive.Batch entries);
List.length entries

(** Clear all cached data *)
let clear t = Hashtbl.clear t.internal.cache

(** Invalidate a path *)
let invalidate t path = Hashtbl.remove t.internal.cache path

let get t path =
match Hashtbl.find_opt t.internal.cache path with
| Some (_, v) -> Some v
| None -> None

let mem t path = Hashtbl.mem t.internal.cache path
let length t = Reactive.length t.collection
let iter f t = Reactive.iter f t.collection
16 changes: 0 additions & 16 deletions analysis/reactive/src/reactive_file_collection.mli
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,17 @@ val to_collection : ('raw, 'v) t -> (string, 'v) Reactive.t

(** {1 Processing} *)

val process_files : ('raw, 'v) t -> string list -> unit

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCE: trimmed dead APIs; trimmed reactive interfaces.

(** Process files, emitting individual deltas for each changed file. *)

val process_files_batch : ('raw, 'v) t -> string list -> int
(** Process files, emitting a single [Batch] delta with all changes.
Returns the number of files that changed.
More efficient than [process_files] when processing many files at once,
as downstream combinators can process all changes together. *)

val process_if_changed : ('raw, 'v) t -> string -> bool
(** Process a file if changed. Returns true if file was processed. *)

val remove : ('raw, 'v) t -> string -> unit
(** Remove a file from the collection. *)

val remove_batch : ('raw, 'v) t -> string list -> int
(** Remove multiple files as a batch. Returns the number of files removed.
More efficient than calling [remove] multiple times. *)

(** {1 Cache Management} *)

val invalidate : ('raw, 'v) t -> string -> unit
val clear : ('raw, 'v) t -> unit

(** {1 Access} *)

val get : ('raw, 'v) t -> string -> 'v option
val mem : ('raw, 'v) t -> string -> bool
val length : ('raw, 'v) t -> int
val iter : (string -> 'v -> unit) -> ('raw, 'v) t -> unit
4 changes: 0 additions & 4 deletions analysis/reanalyze/src/analysis_result.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ type t = {issues: Issue.t list}

let empty = {issues = []}

let add_issue result issue = {issues = issue :: result.issues}

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCE: removed unused result helpers. Covers analysis_result.mli too.


let add_issues result new_issues =
{issues = List.rev_append new_issues result.issues}

let get_issues result = result.issues |> List.rev

let issue_count result = List.length result.issues

(** Create a dead code issue *)
let make_dead_issue ~loc ~dead_warning ~path ~message : Issue.t =
{
Expand Down
6 changes: 0 additions & 6 deletions analysis/reanalyze/src/analysis_result.mli
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,12 @@ type t
val empty : t
(** Empty result with no issues *)

val add_issue : t -> Issue.t -> t

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCE: removed unused result helpers.

(** Add a single issue to the result *)

val add_issues : t -> Issue.t list -> t
(** Add multiple issues to the result *)

val get_issues : t -> Issue.t list
(** Get all issues in order they were added *)

val issue_count : t -> int
(** Count of issues *)

(** {2 Issue constructors} *)

val make_dead_issue :
Expand Down
24 changes: 11 additions & 13 deletions analysis/reanalyze/src/collect_annotations.ml
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,17 @@ let collect_export_locations ~state ~config ~do_gentype =
({cd_attributes; cd_loc; cd_args} :
Typedtree.constructor_declaration)
->
let _process_inline_records =

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCE: dropped inline record bindings.

match cd_args with
| Cstr_record flds ->
List.iter
(fun ({ld_attributes; ld_loc} : Typedtree.label_declaration)
->
toplevel_attrs @ cd_attributes @ ld_attributes
|> process_attributes ~scope_default:!current_scope_default
~state ~config ~do_gentype:false ~name:""
~pos:ld_loc.loc_start)
flds
| Cstr_tuple _ -> ()
in
(match cd_args with
| Cstr_record flds ->
List.iter
(fun ({ld_attributes; ld_loc} : Typedtree.label_declaration)
->
toplevel_attrs @ cd_attributes @ ld_attributes
|> process_attributes ~scope_default:!current_scope_default
~state ~config ~do_gentype:false ~name:""
~pos:ld_loc.loc_start)
flds
| Cstr_tuple _ -> ());
toplevel_attrs @ cd_attributes
|> process_attributes ~scope_default:!current_scope_default ~state
~config ~do_gentype:false ~name:"" ~pos:cd_loc.loc_start)
Expand Down
7 changes: 0 additions & 7 deletions analysis/reanalyze/src/cross_file_items_store.mli
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ val of_frozen : Cross_file_items.t -> t
val of_reactive : (string, Cross_file_items.t) Reactive.t -> t
(** Wrap reactive collection directly (no intermediate collection) *)

val iter_optional_arg_calls :

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCE: hid item store iterators.

t -> (Cross_file_items.optional_arg_call -> unit) -> unit
(** Iterate over all optional arg calls *)

val iter_function_refs : t -> (Cross_file_items.function_ref -> unit) -> unit
(** Iterate over all function refs *)

val compute_optional_args_state :
t ->
find_decl:(Lexing.position -> Decl.t option) ->
Expand Down
4 changes: 0 additions & 4 deletions analysis/reanalyze/src/dead_code.ml

This file was deleted.

Loading