aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/GC
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-05-23 21:25:59 +0000
committerChris Lattner <sabre@nondot.org>2004-05-23 21:25:59 +0000
commite6fd7762c5a641b185566c770b0291b6da4a0fe3 (patch)
tree5f01429c9f267ddff929c8ecb8b85c95a33e0ec4 /runtime/GC
parent0bd34a2b6459ff513586ac9f5a839df87f57765b (diff)
downloadexternal_llvm-e6fd7762c5a641b185566c770b0291b6da4a0fe3.zip
external_llvm-e6fd7762c5a641b185566c770b0291b6da4a0fe3.tar.gz
external_llvm-e6fd7762c5a641b185566c770b0291b6da4a0fe3.tar.bz2
Initial checkin of GC implementation support files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime/GC')
-rw-r--r--runtime/GC/GCInterface.h42
-rw-r--r--runtime/GC/Makefile20
-rw-r--r--runtime/GC/gc_exported_symbols.lst7
3 files changed, 69 insertions, 0 deletions
diff --git a/runtime/GC/GCInterface.h b/runtime/GC/GCInterface.h
new file mode 100644
index 0000000..cbf9bda
--- /dev/null
+++ b/runtime/GC/GCInterface.h
@@ -0,0 +1,42 @@
+/*===-- GCInterface.h - Public interface exposed by garbage collectors ----===*\
+|*
+|* The LLVM Compiler Infrastructure
+|*
+|* This file was developed by the LLVM research group and is distributed under
+|* the University of Illinois Open Source License. See LICENSE.TXT for details.
+|*
+|*===----------------------------------------------------------------------===*|
+|*
+|* This file defines the common public interface that must be exposed by all
+|* LLVM garbage collectors.
+|*
+\*===----------------------------------------------------------------------===*/
+
+#ifndef GCINTERFACE_H
+#define GCINTERFACE_H
+
+/* llvm_gc_initialize - This function is called to initalize the garbage
+ * collector.
+ */
+void llvm_gc_initialize();
+
+/* llvm_gc_allocate - This function allocates Size bytes from the heap and
+ * returns a pointer to it.
+ */
+void *llvm_gc_allocate(unsigned Size);
+
+/* llvm_gc_collect - This function forces a garbage collection cycle.
+ */
+void llvm_gc_collect();
+
+/* llvm_gc_read - This function should be implemented to include any read
+ * barrier code that is needed by the garbage collector.
+ */
+void *llvm_gc_read(void **P);
+
+/* llvm_gc_write - This function should be implemented to include any write
+ * barrier code that is needed by the garbage collector.
+ */
+void llvm_gc_write(void *V, void **P);
+
+#endif
diff --git a/runtime/GC/Makefile b/runtime/GC/Makefile
new file mode 100644
index 0000000..78b951f
--- /dev/null
+++ b/runtime/GC/Makefile
@@ -0,0 +1,20 @@
+##===- runtime/GC/Makefile ---------------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file was developed by the LLVM research group and is distributed under
+# the University of Illinois Open Source License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../..
+PARALLEL_DIRS := SemiSpace
+
+include $(LEVEL)/Makefile.common
+
+# Install target for libraries: Copy into the gcc install directory in chris's
+# tree...
+#
+install::
+
+clean::
diff --git a/runtime/GC/gc_exported_symbols.lst b/runtime/GC/gc_exported_symbols.lst
new file mode 100644
index 0000000..0ed60f5
--- /dev/null
+++ b/runtime/GC/gc_exported_symbols.lst
@@ -0,0 +1,7 @@
+llvm_gc_initialize
+llvm_gc_allocate
+llvm_gc_collect
+llvm_gc_write
+llvm_gc_read
+
+llvm_gc_root_chain \ No newline at end of file