Commit Graph

236 Commits (535dcac8fad711546756e026423d1875312cfb3a)

Author SHA1 Message Date
Emily Hudson 535dcac8fa
net: ipv6 support, merge unix+ip;[pack:x] attribute (#9904) 2021-06-13 23:53:38 +03:00
yuyi a6eba7a9b4
cgen: simplify match_expr_classic() (#10424) 2021-06-13 06:27:31 +03:00
Uwe Krüger 5ee1ded3fb
gc: extend optimized mode to maps (#10426) 2021-06-13 06:26:43 +03:00
Uwe Krüger 2ac39d9112
all: new function `isreftype(T)` to know if `T` contains pointers (#10438) 2021-06-13 06:26:13 +03:00
yuyi 0e34ce2759
cgen: format generated code in match_expr() (#10397) 2021-06-12 21:14:08 +03:00
yuyi f26626117d
cgen: fix match struct type cond (#10421) 2021-06-11 11:58:25 +03:00
yuyi 9d852e22b2
cgen: fix match array or map cond (#10411) 2021-06-10 21:33:35 +03:00
Uwe Krüger 0e2c86310a
GC-boehm: extend optimized mode to all `array` methods (#10406) 2021-06-10 21:26:17 +03:00
Enzo 14519bbf5c
cgen: clean up interface methods generation (#10400) 2021-06-09 22:44:18 +03:00
Uwe Krüger a2243054a5
builtin: fix memory corruption in array `.clone()` and `.repeat()` (#10394) 2021-06-08 23:23:28 +03:00
yuyi cd464010d4
cgen: fix match with multi sumtype exprs (#10377) 2021-06-07 14:16:30 +03:00
crthpl 8a497080b3
cgen: fix assembly in generic fns (#10370) 2021-06-07 10:53:33 +03:00
yuyi 329a6c974e
table, checker, cgen: implement generic fn infering fixed array (#10352) 2021-06-06 01:11:08 +03:00
Delyan Angelov 55ef849cd2
v.markused: trim unused map fns for programs that do not use them 2021-06-05 17:30:25 +03:00
yuyi b0bafa6376
cgen: fix or_block in for declaration (#10317) 2021-06-03 01:18:52 +03:00
Delyan Angelov 5400a765a4
tests: make `fn test_fn() ? { return error(fail) }` count as a fail 2021-06-02 19:14:37 +03:00
zakuro 0afeba5588
cgen: fix C error with clang, when declaring a fn type with an alias type argument (#10297) 2021-06-01 12:37:27 +03:00
yuyi cb19079d53
all: move cur_concrete_types to Table (#10269) 2021-05-31 17:14:45 +03:00
yuyi 9fc5b9dc54
cgen: fix match in map or expr (#10283) 2021-05-31 17:10:33 +03:00
Louis Schmieder 38796521fa
all: allow defer use from other scope (#10284) 2021-05-31 14:43:44 +03:00
Delyan Angelov eac1e25c5d
strings: simplify Builder (#10263) 2021-05-31 14:21:06 +03:00
Lukas Neubert 5b9256ba0b
cgen: write alias typedefs just before interfaces (#10272) 2021-05-31 12:26:06 +03:00
yuyi 8785599094
checker, cgen: fix optional with if expr (#10242) 2021-05-29 10:00:12 +03:00
Alexander Medvednikov ca8158ac41 parser: handle casts in match expressions; c2v: minor fixes 2021-05-28 17:59:43 +03:00
Delyan Angelov 2b62dca000
v: support for `$if threads {}, depending on whether `go ` was used at all (#10227) 2021-05-27 18:36:07 +03:00
yuyi 7c0cd2f41d
checker, cgen: fix match with complex sumtype exprs (#10215) 2021-05-27 10:13:50 +03:00
penguindark 2dd1d3fcbb
all: string interpolation code cleaning (#10204) 2021-05-26 09:30:08 +03:00
Joe Conigliaro 560301dbfe
cgen: dont preallocate zero length with capacity of 1 2021-05-26 14:51:20 +10:00
Enzo 39c376bb5b
builtin,gen: use operator overloading on ustring (#10197) 2021-05-25 14:51:48 +03:00
Enzo 886f69bfcf
all: use operator overloading on strings (p. 2) (#10183) 2021-05-24 11:38:31 +03:00
penguindark d8d05e0106
all: new string interpolation in pure V (#10181) 2021-05-24 05:20:45 +03:00
yuyi eb5ac23988
checker: fix match expr with if expr (fix #10177 #10178) (#10179) 2021-05-23 17:59:57 +03:00
Delyan Angelov bc01de2181
ast: mark ast.File{} with `[heap]`, and use []&ast.File consistently 2021-05-22 19:06:55 +03:00
Delyan Angelov da090f91d8
cgen: fix using and auto printing `x := [16]&Type{}` 2021-05-20 15:59:02 +03:00
Delyan Angelov 2086e6f1c1
builtin, cgen: implement chunked allocation of 16MB blocks with -prealloc (#10130) 2021-05-19 10:35:56 +03:00
Delyan Angelov 1305ca662f
cgen: do not use L'x' for ASCII values (enable compilation with simpler C compilers) 2021-05-15 10:36:26 +03:00
Uwe Krüger 7bfd89567b
shared: support `lock` on SelectorExpression (#10105) 2021-05-15 04:34:27 +03:00
zakuro a9435f3c25
cgen: fix `cannot take rvalue` error of interface (#10040) 2021-05-13 17:54:48 +03:00
Delyan Angelov 1086b4ac5e
io: mark the mutability requirements of the Writer interface explicitly; swap the io.cp/2 parameter order to be like os.cp/2 (#10091) 2021-05-13 13:06:42 +03:00
crthpl 8361f714dd
cgen: fix deadlock when returning/breaking in `lock` (#10079) 2021-05-12 11:44:47 +03:00
Delyan Angelov 066374bae4
v.gen.c: implement `-d trace_autofree` for conditional tracing comments about autofree 2021-05-11 19:29:06 +03:00
Delyan Angelov d463817f80
Revert "Revert "cgen: fix generics with generics fn type parameter (#10078)""
This reverts commit d3de91ee86.
2021-05-11 11:14:58 +03:00
Delyan Angelov d3de91ee86
Revert "cgen: fix generics with generics fn type parameter (#10078)"
This reverts commit e310513a5f.
2021-05-11 10:59:55 +03:00
Alexander Medvednikov dc034d9b16 vweb: make thread safe; checker: `$if T is Interface {` 2021-05-11 09:30:18 +03:00
yuyi e310513a5f
cgen: fix generics with generics fn type parameter (#10078) 2021-05-11 09:24:23 +03:00
yuyi dcf4d73c87
cgen: format generated struct definition c codes (#10074) 2021-05-10 20:27:52 +03:00
El Koulali András 3e5a5754f3
cgen: fix constants with multi-statement C initializations (#10058) 2021-05-09 03:25:44 +03:00
Delyan Angelov 2eafea6308
v: reduce the memory usage of the compiler (analysed with heaptrack) 2021-05-06 11:44:48 +03:00
Delyan Angelov d3f2d6f6df
cgen: speed up c_name/1 by using a map lookup, instead of a linear search in []string{} 2021-05-03 12:58:40 +03:00
Delyan Angelov 4b818fa2be
v: implement interface embedding (#9935) 2021-05-02 03:00:47 +03:00