@@ -19,49 +19,37 @@ open Lambda
1919
2020(* Structure of compilation environments *)
2121
22- type compilation_env =
23- { ce_stack : int Ident .tbl ; (* Positions of variables in the stack *)
24- ce_heap : int Ident .tbl ; (* Structure of the heap-allocated env *)
25- ce_rec : int Ident .tbl } (* Functions bound by the same let rec *)
26-
27- (* The ce_stack component gives locations of variables residing
28- in the stack. The locations are offsets w.r.t. the origin of the
29- stack frame.
30- The ce_heap component gives the positions of variables residing in the
31- heap-allocated environment.
32- The ce_rec component associates offsets to identifiers for functions
33- bound by the same let rec as the current function. The offsets
34- are used by the OFFSETCLOSURE instruction to recover the closure
35- pointer of the desired function from the env register (which
36- points to the closure for the current function). *)
22+ type compilation_env = Debug_event .compilation_env =
23+ { ce_stack : int Ident .tbl ;
24+ ce_heap : int Ident .tbl ;
25+ ce_rec : int Ident .tbl }
3726
3827(* Debugging events *)
3928
40- (* Warning: when you change these types, check runtime/backtrace_byt.c *)
41- type debug_event =
42- { mutable ev_pos : int ; (* Position in bytecode *)
43- ev_module : string ; (* Name of defining module *)
44- ev_loc : Location .t ; (* Location in source file *)
45- ev_kind : debug_event_kind ; (* Before/after event *)
46- ev_defname : string ; (* Enclosing definition *)
47- ev_info : debug_event_info ; (* Extra information *)
48- ev_typenv : Env .summary ; (* Typing environment *)
49- ev_typsubst : Subst .t ; (* Substitution over types *)
50- ev_compenv : compilation_env ; (* Compilation environment *)
51- ev_stacksize : int ; (* Size of stack frame *)
52- ev_repr : debug_event_repr } (* Position of the representative *)
29+ type debug_event = Debug_event .debug_event =
30+ { mutable ev_pos : int ;
31+ ev_module : string ;
32+ ev_loc : Location .t ;
33+ ev_kind : debug_event_kind ;
34+ ev_defname : string ;
35+ ev_info : debug_event_info ;
36+ ev_typenv : Env .summary ;
37+ ev_typsubst : Subst .t ;
38+ ev_compenv : compilation_env ;
39+ ev_stacksize : int ;
40+ ev_repr : debug_event_repr }
5341
54- and debug_event_kind =
42+ and debug_event_kind = Debug_event. debug_event_kind =
5543 Event_before
5644 | Event_after of Types. type_expr
5745 | Event_pseudo
5846
59- and debug_event_info =
47+ and debug_event_info = Debug_event. debug_event_info =
6048 Event_function
6149 | Event_return of int
6250 | Event_other
6351
64- and debug_event_repr =
52+ and debug_event_repr = Debug_event. debug_event_repr =
6553 Event_none
6654 | Event_parent of int ref
6755 | Event_child of int ref
0 commit comments