diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-31 02:11:03 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-31 02:11:03 -0400 |
| commit | 7a172be6213839a3d023ba21c3bafd7540a4bfe8 (patch) | |
| tree | 5646ba0e4c0690fe64711fb77658308541de695b /src/types.c | |
| parent | d3655740cc6a8e6c4788946af412065fb52f51dc (diff) | |
Remove threads and mutexed data from the language in favor of a
module-based approach
Diffstat (limited to 'src/types.c')
| -rw-r--r-- | src/types.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/types.c b/src/types.c index 07b6ced0..c4155c8d 100644 --- a/src/types.c +++ b/src/types.c @@ -84,13 +84,6 @@ CORD type_to_cord(type_t *t) { else return "(Unknown optional type)"; } - case MutexedType: { - type_t *opt = Match(t, MutexedType)->type; - if (opt) - return CORD_all("mutexed ", type_to_cord(opt)); - else - return "(Unknown optional type)"; - } case TypeInfoType: { return CORD_all("Type$info(", Match(t, TypeInfoType)->name, ")"); } @@ -250,7 +243,6 @@ PUREFUNC bool has_heap_memory(type_t *t) case SetType: return true; case PointerType: return true; case OptionalType: return has_heap_memory(Match(t, OptionalType)->type); - case MutexedType: return true; case BigIntType: return true; case StructType: { for (arg_t *field = Match(t, StructType)->fields; field; field = field->next) { @@ -276,7 +268,6 @@ PUREFUNC bool has_stack_memory(type_t *t) switch (t->tag) { case PointerType: return Match(t, PointerType)->is_stack; case OptionalType: return has_stack_memory(Match(t, OptionalType)->type); - case MutexedType: return has_stack_memory(Match(t, MutexedType)->type); default: return false; } } @@ -483,7 +474,6 @@ PUREFUNC size_t unpadded_struct_size(type_t *t) PUREFUNC size_t type_size(type_t *t) { - if (t == THREAD_TYPE) return sizeof(pthread_t*); if (t == PATH_TYPE) return sizeof(Path_t); if (t == PATH_TYPE_TYPE) return sizeof(PathType_t); #ifdef __GNUC__ @@ -514,7 +504,6 @@ PUREFUNC size_t type_size(type_t *t) case FunctionType: return sizeof(void*); case ClosureType: return sizeof(struct {void *fn, *userdata;}); case PointerType: return sizeof(void*); - case MutexedType: return sizeof(MutexedData_t); case OptionalType: { type_t *nonnull = Match(t, OptionalType)->type; switch (nonnull->tag) { @@ -575,7 +564,6 @@ PUREFUNC size_t type_size(type_t *t) PUREFUNC size_t type_align(type_t *t) { - if (t == THREAD_TYPE) return __alignof__(pthread_t*); if (t == PATH_TYPE) return __alignof__(Path_t); if (t == PATH_TYPE_TYPE) return __alignof__(PathType_t); #ifdef __GNUC__ @@ -606,7 +594,6 @@ PUREFUNC size_t type_align(type_t *t) case FunctionType: return __alignof__(void*); case ClosureType: return __alignof__(struct {void *fn, *userdata;}); case PointerType: return __alignof__(void*); - case MutexedType: return __alignof__(MutexedData_t); case OptionalType: { type_t *nonnull = Match(t, OptionalType)->type; switch (nonnull->tag) { |
