From 3817688851fae07b1d6a13ba2ce1906fc9811f8f Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Mon, 7 Feb 2022 03:02:39 -0500 Subject: [cup] Self-hosting is now possible! Make some tweaks to match C output A bit of a chonky commit, but this ports over the remaining (well, almost) everything from the C implementation to the self-hosted compiler. The only things that really remain right now are (1) defer support and (2) support for constants in local scopes. There were used barely enough so for now their uses have been removed, but I'll implement them back later. Not sure how useful (2) is though. --- std/vector.cup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'std/vector.cup') diff --git a/std/vector.cup b/std/vector.cup index 6953e9b..1b7104c 100644 --- a/std/vector.cup +++ b/std/vector.cup @@ -15,7 +15,7 @@ fn vector_new_sized(capacity: int): Vector* { } fn vector_new(): Vector* { - const initial_default_capacity = 8; + let initial_default_capacity = 8; return vector_new_sized(initial_default_capacity); } -- cgit v1.2.3