Commits

camlspotter committed 310ad96

started to write a stupid copy gc

  • Participants
  • Parent commits 72c57e2
  • Branches dev

Comments (0)

Files changed (2)

File examples/OMakefile

 MyOCamlTestProgram(sqrt, sqrt)
 MyOCamlTestProgram(sqrt_intr, sqrt_intr)
 MyOCamlTestProgram(pi, pi)
+MyOCamlTestProgram(copygc, copygc)

File examples/copygc.ml

+let (&) = (@@)
+
+open Llvm_phantom.Std
+module P = Phantom
+
+include Create(struct let context = Llvm.global_context () end)
+open Type
+open Value
+
+include CreateModule(struct
+  let name = "mymodule"
+  let opt = true
+end)
+
+let is_block p = perform
+  i <-- Gep.(gep_load p (pos 0) end_);
+  x <-- i &! Const.i32_of_int 1; (* 32bit arch *)
+  intcast x i1