aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/types.c b/types.c
index 5392c559..6a007c3e 100644
--- a/types.c
+++ b/types.c
@@ -67,7 +67,7 @@ Text_t type_to_text(type_t *t) {
}
case PointerType: {
auto ptr = Match(t, PointerType);
- Text_t sigil = ptr->is_stack ? Text("&") : Text("@");
+ Text_t sigil = ptr->is_view ? Text("&") : Text("@");
return Texts(sigil, type_to_text(ptr->pointed));
}
case EnumType: {
@@ -123,7 +123,7 @@ bool type_is_a(type_t *t, type_t *req)
auto t_ptr = Match(t, PointerType);
auto req_ptr = Match(req, PointerType);
if (type_eq(t_ptr->pointed, req_ptr->pointed))
- return (!t_ptr->is_stack && req_ptr->is_stack) || (!t_ptr->is_stack);
+ return (!t_ptr->is_view && req_ptr->is_view) || (!t_ptr->is_view);
}
return false;
}
@@ -275,11 +275,11 @@ PUREFUNC bool can_send_over_channel(type_t *t)
}
}
-PUREFUNC bool has_stack_memory(type_t *t)
+PUREFUNC bool has_view_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 PointerType: return Match(t, PointerType)->is_view;
+ case OptionalType: return has_view_memory(Match(t, OptionalType)->type);
default: return false;
}
}
@@ -345,7 +345,7 @@ PUREFUNC bool can_promote(type_t *actual, type_t *needed)
// Can't use @Foo for a function that wants @Baz
// But you *can* use @Foo for a function that wants @Memory
return false;
- else if (actual_ptr->is_stack && !needed_ptr->is_stack)
+ else if (actual_ptr->is_view && !needed_ptr->is_view)
// Can't use &x for a function that wants a @Foo or ?Foo
return false;
else