Commit Graph

1070 Commits (5ddb70940e124f278afc36987025fc175ee9f7da)

Author SHA1 Message Date
yuyi 5ddb70940e
cgen: fix map_fixed_arrays str error (fix #8170) (#8178) 2021-01-18 10:34:29 +01:00
yuyi 6c87c25ef1
cgen: fix `for _,mut j in arr` for fixed arrays (fix #8163) (#8167) 2021-01-18 06:05:38 +01:00
Lukas Neubert 16c9cbce7c
fmt: correctly increase f.line_len for write_indent (#8174) 2021-01-18 06:02:29 +01:00
BigBlack 28ed4da1ce
cgen: fix `array_slice(*a, 0, a.len)` C error, generated for `a[..a.len]`, for a `mut a []int` (#8168) 2021-01-17 17:22:23 +02:00
Swastik Baranwal 334b66b311
checker/cgen: add checks and fix cgen for [typedef] for C structs (#8169) 2021-01-17 17:18:07 +02:00
Uwe Krüger e4850cd6dd
cgen: fix `for` iteration over fixed array literal (#8159) 2021-01-17 10:44:15 +01:00
yuyi 9376c57a51
cgen: fix for_in_mut_val (fix #8087) (#8129) 2021-01-17 05:32:34 +01:00
Delyan Angelov 5ae55731b9
embed: move to `v.embed_file`, fix CI failing test 2021-01-16 20:03:07 +02:00
Daniel Däschle 53941c4a0a
fmt: fix if cond break readability (#8132) 2021-01-16 02:12:17 +01:00
Delyan Angelov c4c4b9c7b1
gen,checker: implement g.trace/2 and c.trace/2, similar to p.trace/2 2021-01-15 20:28:53 +02:00
Uwe Krüger 8d014d4646
sync: allow `go` routine join with return value (#8125) 2021-01-15 13:45:26 +01:00
BigBlack 80008a40e2
fix fixed_array slice ommit high_value (#8025) 2021-01-15 10:28:20 +01:00
yuyi 0945efebf1
cgen: fix anon_fn_call (#8120) 2021-01-15 10:25:30 +01:00
Swastik Baranwal 0ca36aafe2
cgen: allow assignment operators for type aliases (#8086) 2021-01-15 02:27:19 +01:00
Larpon f73500f2fe
all: add support for the `x := $embed_file('v.png')` compile time call (#8048) 2021-01-14 16:20:11 +02:00
Delyan Angelov adf084eeed
cgen: fix address violations for `return error(abc)`, reduce leaks in `os` 2021-01-14 04:58:26 +02:00
Daniel Däschle 2030875c0a
gen: fix go call with generic function (#8093) 2021-01-13 17:35:50 +02:00
yuyi ae592299dc
cgen: fix fixed arrays literal eq (#8079) 2021-01-13 08:32:41 +01:00
Nick Treleaven ac85257ea0
parser: fix sizeof(mod.Type), fix checking sizeof expression (#8065) 2021-01-13 06:13:39 +01:00
zakuro 254df0ca62
fmt: improve string quotes (#8075) 2021-01-13 06:05:27 +01:00
Swastik Baranwal 1e853b0efc
cgen: implement argument operator overloading (#8067) 2021-01-13 03:31:14 +01:00
zakuro 33694665f0
fmt: align each contiguous field of struct. not the whole. (#7981) 2021-01-12 04:38:43 +01:00
yuyi 1559e72d0d
cgen: add gen_fixed_array_equality_fn (#8006) 2021-01-12 01:35:18 +01:00
Uwe Krüger 5f95dd54bd
builtin: rename `any_*` -> `*_literal` - 2. part (#8032) 2021-01-11 22:58:15 +01:00
yuyi 72317975fc
cgen: minor cleanup of gen_assert_stmt() (#8018) 2021-01-11 09:05:15 +01:00
Delyan Angelov 722a603222
cgen: fix os.args initialization, so that `const x = os.args[0]` works 2021-01-10 15:17:24 +02:00
Swastik Baranwal 1f5255c2bb
cgen: implement `>=` and `<=` (#7991) 2021-01-10 12:24:46 +02:00
Uwe Krüger eff757d0a1
cgen: fix address violations for error propagation (#7972) 2021-01-09 02:43:48 +01:00
Daniel Däschle bbac95a438
parser: error on recursive struct (#7964) 2021-01-09 01:33:36 +01:00
Delyan Angelov 083dc23db8
gen: implement a `[manualfree]` tag, for functions, that want to do their own memory management 2021-01-08 16:22:27 +02:00
Nick Treleaven cbefe6c32f
parser: warn about old use of `typeof` (#7923) 2021-01-07 20:32:02 +01:00
Uwe Krüger ffd753abdc
all: implement `ch <- x or {...}` and `ch <- x ?` (#7928) 2021-01-06 21:19:40 +01:00
Daniel Däschle a8e4d1df40
cgen: fix match comparing with ident of type string (#7921) 2021-01-06 20:03:50 +02:00
Nick Treleaven 7a6b160d63
checker: fix indexing a type alias instance (#7889) 2021-01-05 19:17:18 +01:00
Daniel Däschle 5841d5d8e1
all: implement basic comptime field selector (#7888) 2021-01-05 16:11:43 +02:00
Nick Treleaven 2fc50a4045
cgen: fix 32-bit voidptr for map key (#7759) 2021-01-05 02:59:01 +01:00
spaceface efb80bdffd
all: implement iterators in for loops (#7867) 2021-01-05 01:06:44 +01:00
Ned Palacios 82162b8ff8
cgen: interface fix + add more interface tests (#7776) 2021-01-04 21:54:13 +02:00
Uwe Krüger bf904c2f82
checker, cgen: allow using literals as `int` and `f64` for sum types (#7864) 2021-01-04 20:48:13 +02:00
Daniel Däschle 164d7bf5fb
parser: struct updating syntax with `Abc{...oldabc newfield: val}` (#7865) 2021-01-04 20:19:03 +02:00
Swastik Baranwal 21d5db43af
cgen: do not generate `!=` and `==` for C types (#7856) 2021-01-04 08:57:31 +01:00
zakuro dd516858d4
fmt: align struct field comments (#7632) 2021-01-03 21:10:25 +01:00
Swastik Baranwal 9033099676
cgen: implement overriding of `!=` and `==` (#7837) 2021-01-03 16:19:02 +01:00
Nick Treleaven 9243e06dba
parser: allow integer and rune keys for map literal (#7756) 2021-01-01 17:23:32 +01:00
Swastik Baranwal 24b18f05c4
cgen: implement > and < for structs (#7774) 2021-01-01 14:54:32 +01:00
clubby789 bf7da14ba1
cgen: make char literals wide (#7769) 2021-01-01 11:06:09 +02:00
Joe Conigliaro 63afd26c8c
cgen: merge method to write multi return types 2021-01-01 07:45:03 +11:00
Emily Hudson bf9b0c6345
compiler: add `[console]` attribute for main function to force console subsystem on windows (#7721) 2020-12-31 12:38:55 +01:00
Joe Conigliaro b2bd2c9337
cgen: make multi return decl order consistant & use typedefs. closes #7728 2020-12-31 21:55:21 +11:00
Daniel Däschle 9a31744255
cgen: fix embed generic field access & method call (#7725) 2020-12-30 23:49:02 +01:00