You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/analyses/ocaml.ml
+62-66Lines changed: 62 additions & 66 deletions
Original file line number
Diff line number
Diff line change
@@ -27,32 +27,42 @@ struct
27
27
letname()="ocaml"
28
28
moduleD=
29
29
struct
30
-
(* The first set contains variables of type value that are definitely in order. The second contains definitely registered variables. *)
31
-
moduleP=Lattice.Prod (VarinfoSet) (VarinfoSet)
30
+
(* The first set contains variables of type value that are definitely in order. The second contains definitely registered variables. The third contains variables the analysis tracks. *)
// Code from stubs.c in src/common/cdomains/floatOps that should be correct despite missing CAMLparam, as discussed in https://github.com/goblint/analyzer/issues/1371.
#defineCAMLlocal1(x) __goblint_caml_param1(&x) // The local and param functions behave the same for our purposes, registering variables.
15
+
#defineCAMLlocal3(x, y, z) __goblint_caml_param3(&x, &y, &z)
11
16
#defineCAMLreturn(x) return (x) // From AI - CAMLreturn needs some variable named caml__frame, which is not available in our mock CAMLparam1, so we mock the return as well.
12
17
13
18
14
19
CAMLprimvaluecaml_gc_counters(valuev)
15
20
{
16
-
CAMLparam0(); /* v is ignored */
17
-
CAMLlocal1(res);
21
+
CAMLparam0(); /* v is ignored */
22
+
CAMLlocal1(res);
18
23
19
24
/* get a copy of these before allocating anything... */
20
25
doubleminwords=caml_gc_minor_words_unboxed();
@@ -23,16 +28,16 @@ CAMLprim value caml_gc_counters(value v)
23
28
(double) Caml_state->allocated_words;
24
29
25
30
res=caml_alloc_3(0,
26
-
caml_copy_double(minwords),
27
-
caml_copy_double(prowords),
28
-
caml_copy_double(majwords)); // WARN
29
-
CAMLreturn(res);
31
+
caml_copy_double(minwords),
32
+
caml_copy_double(prowords),
33
+
caml_copy_double(majwords)); // WARN
34
+
CAMLreturn(res);
30
35
}
31
36
32
37
CAMLprimvaluecaml_gc_counters_correct(valuev)
33
38
{
34
-
CAMLparam0(); /* v is ignored */
35
-
CAMLlocal3(minwords_, prowords_, majwords_);
39
+
CAMLparam0(); /* v is ignored */
40
+
CAMLlocal3(minwords_, prowords_, majwords_);
36
41
37
42
/* get a copy of these before allocating anything... */
0 commit comments