Remove atomic, ++, and --

This commit is contained in:
Ginger Bill
2017-07-18 18:58:41 +01:00
parent d16aa79492
commit 65f079ebc4
23 changed files with 179 additions and 239 deletions

View File

@@ -1711,11 +1711,6 @@ bool is_polymorphic_type_assignable(Checker *c, Type *poly, Type *source, bool c
return is_polymorphic_type_assignable(c, poly->Pointer.elem, source->Pointer.elem, true, modify_type);
}
return false;
case Type_Atomic:
if (source->kind == Type_Atomic) {
return is_polymorphic_type_assignable(c, poly->Atomic.elem, source->Atomic.elem, true, modify_type);
}
return false;
case Type_Array:
if (source->kind == Type_Array &&
poly->Array.count == source->Array.count) {
@@ -2942,13 +2937,6 @@ bool check_type_internal(Checker *c, AstNode *e, Type **type, Type *named_type)
return true;
case_end;
case_ast_node(at, AtomicType, e);
Type *elem = check_type(c, at->type);
i64 esz = type_size_of(c->allocator, elem);
*type = make_type_atomic(c->allocator, elem);
return true;
case_end;
case_ast_node(at, ArrayType, e);
if (at->count != nullptr) {
Type *elem = check_type(c, at->elem, nullptr);
@@ -8399,11 +8387,6 @@ gbString write_expr_to_string(gbString str, AstNode *node) {
}
str = gb_string_appendc(str, "}");
case_end;
case_ast_node(at, AtomicType, node);
str = gb_string_appendc(str, "atomic ");
str = write_expr_to_string(str, at->type);
case_end;
}
return str;