Commit Graph

27 Commits (fefb9643b2d2bfcdfd52d7027c9f137c4861900f)

Author SHA1 Message Date
Daniel Däschle 76cdf75299
builtin,cgen: rename `Option` to `_option` (#14317) 2022-05-06 19:25:54 +03:00
Delyan Angelov 0e5c1cee48
builtin: improve musl/Alpine support (define weak backtrace/backtrace_symbols/backtrace_symbols_fd symbols) (#14250) 2022-05-03 09:17:53 +03:00
spaceface db185598d2
checker: refactor comptime_if_branch (#14259) 2022-05-02 22:24:20 +03:00
StunxFS e24482a143
transformer: minor optimization for `'string literal'.len` (#14207) 2022-04-28 22:35:16 +03:00
Vincenzo Palazzo 4f14f7714f
checker: ensure that the variant SubType exists (#14053)
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-04-16 19:29:10 +03:00
Delyan Angelov 87a373d82c
ci: fix coutput_test.v 2022-04-15 21:18:55 +03:00
Vincenzo Palazzo 48c295150f
checker: fixes typechecking for a sum type with an alias type (#13974) 2022-04-13 18:38:26 +03:00
Delyan Angelov e5809363de
docs: describe the contents of vlib/v/gen/c/testdata/ and how to write tests for the checker, that still do not have good codegen counterpart 2022-04-13 14:55:26 +03:00
Delyan Angelov 5a695c81dc
ci: fix the recorded output for compare_structs.c.must_have after eea46c4 2022-04-07 18:08:56 +03:00
Delyan Angelov c05634ebd1
ci: fix sanitize job failures after 02b889d 2022-03-19 21:45:58 +02:00
Delyan Angelov 02b889dac3
cgen: generate smaller switch statements for sumtypes/enums with else{} 2022-03-19 21:12:27 +02:00
Delyan Angelov 5f38ba896e
parser,cgen: handle `const x = $embed_file("file.txt").to_string()` 2022-01-25 11:40:07 +02:00
Leo Developer ace63594bf
all: support `$embed_file('embed.vv', .zlib)` (#12654) 2021-12-04 19:43:19 +02:00
Leo Developer 0f59d88ba6
v.embedfile: make path public (#12614) 2021-11-29 16:32:42 +02:00
Leo Developer f72d001db5
cgen: fix $embed_file not finding embedded file when using -prod (#12596) 2021-11-28 12:32:05 +02:00
Delyan Angelov 3caeadfa0d
cgen,vfmt: support `[weak]` tags for functions and globals 2021-11-18 18:32:39 +02:00
Delyan Angelov a27833ed0d
all: support `volatile field Type` in struct declarations 2021-11-04 09:45:50 +02:00
ChAoS_UnItY 5b69593766
cgen,js: fix missing break in switch case, generated by match with range branches (#12260) 2021-10-21 22:30:05 +03:00
ChAoS_UnItY ab350d52ec
cgen: support RangeExpr while emitting enum switch case (#12226) 2021-10-19 17:02:22 +03:00
Delyan Angelov efa1092199
v.gen.c: add coutput tests for the `[console]` codegen to prevent future regressions 2021-10-06 00:14:16 +03:00
Delyan Angelov ccb5f1d563
tests: support `// vtest vflags: -prod` in `coutput_test.v`.
Use it, to add a `-prod` test for `$embed_file()`,
to prevent future codegen regressions.
2021-10-05 15:44:12 +03:00
Delyan Angelov c86935309e
v.gen.c: fix compilation of `if c_struct_1 != c_struct_2 {` 2021-10-02 15:12:18 +03:00
André Diego Piske 8dde9d4a7b
cgen: fixes for ... in with index (#11995) 2021-09-28 19:35:07 +03:00
Delyan Angelov bf2569a9a8
all: support `mut volatile x := 123` declarations (#11940) 2021-09-22 13:06:30 +03:00
Delyan Angelov 0a18690a4f
v.gen.c: fix assert `f().len == 1` calling f() twice (closes issue 11501) 2021-09-16 19:01:35 +03:00
Caden Haustein cf0767ad6c
v: add constant folding AST transformation (#11085) 2021-08-06 23:19:18 +03:00
Delyan Angelov 08016ab374
v.gen.c: add vlib/v/gen/c/coutput_test.v, to ease testing of produced C output 2021-07-31 12:14:56 +03:00