wingo pushed a commit to branch wip-whippet
in repository guile.

commit 1925f84d3aa73f352cc2afbc508639736af738d6
Author: Andy Wingo <wi...@igalia.com>
AuthorDate: Mon Aug 5 14:44:34 2024 +0200

    Add missing file
---
 api/scc-attrs.h | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/api/scc-attrs.h b/api/scc-attrs.h
new file mode 100644
index 000000000..4db408cad
--- /dev/null
+++ b/api/scc-attrs.h
@@ -0,0 +1,60 @@
+#ifndef SCC_ATTRS_H
+#define SCC_ATTRS_H
+
+#include "gc-config.h"
+#include "gc-assert.h"
+#include "gc-attrs.h"
+
+static const uintptr_t GC_ALIGNMENT = 8;
+static const size_t GC_LARGE_OBJECT_THRESHOLD = 8192;
+
+static inline enum gc_allocator_kind gc_allocator_kind(void) {
+  return GC_ALLOCATOR_INLINE_BUMP_POINTER;
+}
+static inline size_t gc_allocator_small_granule_size(void) {
+  return GC_ALIGNMENT;
+}
+static inline size_t gc_allocator_large_threshold(void) {
+  return GC_LARGE_OBJECT_THRESHOLD;
+}
+
+static inline size_t gc_allocator_allocation_pointer_offset(void) {
+  return sizeof(uintptr_t) * 0;
+}
+static inline size_t gc_allocator_allocation_limit_offset(void) {
+  return sizeof(uintptr_t) * 1;
+}
+
+static inline size_t gc_allocator_freelist_offset(size_t size) {
+  GC_CRASH();
+}
+
+static inline size_t gc_allocator_alloc_table_alignment(void) {
+  return 0;
+}
+static inline uint8_t gc_allocator_alloc_table_begin_pattern(void) {
+  GC_CRASH();
+}
+static inline uint8_t gc_allocator_alloc_table_end_pattern(void) {
+  GC_CRASH();
+}
+
+static inline int gc_allocator_needs_clear(void) {
+  return 0;
+}
+
+static inline enum gc_write_barrier_kind gc_write_barrier_kind(size_t 
obj_size) {
+  return GC_WRITE_BARRIER_NONE;
+}
+static inline size_t gc_write_barrier_card_table_alignment(void) {
+  GC_CRASH();
+}
+static inline size_t gc_write_barrier_card_size(void) {
+  GC_CRASH();
+}
+
+static inline enum gc_safepoint_mechanism gc_safepoint_mechanism(void) {
+  return GC_SAFEPOINT_MECHANISM_COOPERATIVE;
+}
+
+#endif // SCC_ATTRS_H

Reply via email to