Commit Graph

64 Commits (36ec47cd203a1f119da74b868ceb92f6da7ea930)

Author SHA1 Message Date
Alexander Medvednikov 36ec47cd20 all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
yuyi c8e33ad219
cgen: fix error for array of reference auto_str (#13665) 2022-03-06 12:15:31 +02:00
yuyi ece73836aa
cgen: fix error for struct with reference alias field (#13380) 2022-02-06 10:52:36 +02:00
Delyan Angelov 5faabe7464
Revert "cgen: fix error for struct with reference alias fields (#13374)"
This reverts commit 4d485ae687.
2022-02-05 18:52:37 +02:00
yuyi 4d485ae687
cgen: fix error for struct with reference alias fields (#13374) 2022-02-05 18:23:54 +02:00
yuyi fb66ec7cfb
cgen: fix codegen for aliases of fixed arrays of structs (fix #13037) (#13049) 2022-01-06 11:54:22 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
yuyi 2e68af22d3
cgen: improve auto_str error messages (#12972) 2021-12-26 18:32:15 +02:00
Daniel Däschle 10f63b3cd7
cgen: remove "main" from inline sum type str (#12963) 2021-12-25 23:58:45 +03:00
Daniel Däschle 35282396ec
all: inline sum types (#12912) 2021-12-25 18:26:40 +03:00
yuyi cd0b581445
ast: rename 'table.get_type_symbol()' to 'table.sym()' and more related calls (#12898) 2021-12-19 18:25:18 +02:00
Delyan Angelov 4624de6cb5
cgen: support `-d no_segfault_handler` and `-d no_main`. Cleanup `-d trace_xxx` descriptions in CONTRIBUTING.md 2021-12-03 19:01:45 +02:00
yuyi 547f326f33
cgen: cleanup auto_str_methods (#12631) 2021-11-30 19:39:55 +02:00
Delyan Angelov 117c99d938
v.util: add Surrounder.builder_write_befores and Surrounder.builder_write_afters methods for writing to an existing strings.Builder 2021-11-21 20:56:47 +02:00
Delyan Angelov 258d0d6df7
cgen: make `dump(x)` use a single write call, fix memleaks for autogenerated .str() methods of nested structs (#12529) 2021-11-20 20:55:19 +02:00
Delyan Angelov 90ba856107
cgen: fix `dump(x)` with `fn (x &Type) str() string {` 2021-11-20 13:12:03 +02:00
yuyi 0e95e4d7b4
ast, cgen: fix generic method str() overload (#12330) 2021-10-28 19:03:17 +03:00
crthpl 85b58b03a3
cgen: parallelize (#10844) 2021-09-28 10:28:04 +03:00
Alexander Medvednikov ae41d1d3c6 builtin, cgen: more -nofloat fixes 2021-09-13 19:06:19 +03:00
Uwe Krüger c560d58f1e
cgen: use heuristic to detect circular reference in auto str (#11090) 2021-08-07 14:56:09 +03:00
yuyi fd58e9f819
cgen: fix auto str for map of reference struct (fix #11024) (#11028) 2021-08-03 08:03:00 +03:00
shadowninja55 355f46f475
gen: implement `thread.str()` (#10820) 2021-07-17 11:19:28 +03:00
spaceface 6e942bf4c2
v: initial support for generic interfaces and sumtypes (#10795) 2021-07-15 08:29:13 +03:00
yuyi a3ed9c1bbd
cgen: fix fixed array of function str() (fix #10744) (#10753) 2021-07-11 19:24:33 +03:00
yuyi c0f855ace7
cgen: fix anon optional fn (fix #10640) (#10644) 2021-07-02 17:07:05 +03:00
yuyi aaee251550
cgen: simplify auto_str_methods.v (#10606) 2021-06-29 18:47:03 +03:00
yuyi 0ac0ab6b4b
cgen: fix auto str for sumtype with alias (#10599) 2021-06-28 14:17:00 +03:00
Delyan Angelov c3b9eaf146
v.c.gen: fix codegen of auto str methods for structs having &voidptr fields 2021-06-28 10:05:42 +03:00
spaceface 4bed4afef7
cgen: fix clash in generated variant and method names (#10581) 2021-06-27 19:05:32 +03:00
yuyi 93bb87f44f
cgen: simplify auto_str_methods (#10544) 2021-06-23 20:13:14 +03:00
yuyi 0aef92b613
cgen: cleanup auto_str_methods() (#10540) 2021-06-22 14:28:44 +03:00
Delyan Angelov f9c4365dc7
v.gen.c: free `indents` in autogenerated .str() methods 2021-06-08 17:24:08 +03:00
Delyan Angelov 5cb2683e97
v.gen.c,v.markused: fix `println(ch)` when ch is a channel 2021-06-01 13:46:59 +03:00
penguindark 2dd1d3fcbb
all: string interpolation code cleaning (#10204) 2021-05-26 09:30:08 +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
Delyan Angelov da090f91d8
cgen: fix using and auto printing `x := [16]&Type{}` 2021-05-20 15:59:02 +03:00
yuyi d236d6a473
parser, cgen: fix generics fn typeof name (fix #7357) (#9939) 2021-04-30 13:40:36 +03:00
yuyi 844662e0d6
cgen: fix generics fn str() (fix #7403) (#9940) 2021-04-30 13:40:07 +03:00
Delyan Angelov 79fa15ec3a
cgen: allow printing of C.Structs containing &char/charptr fields 2021-04-12 00:14:58 +03:00
spaceface 4feb09fa5b
checker, cgen: add sumtype-like smartcasting capabilites to interfaces (#9256) 2021-04-09 11:00:05 +03:00
Delyan Angelov 5bc29492fd
ci: fix vlib/v/tests/str_gen_test.v (all of `v test-self` is ok now) 2021-04-05 19:31:28 +03:00
Lukas Neubert 0eb59cf2bd
fmt: prevent possible trailing whitespace in wrapped infixes (#9573) 2021-04-03 18:30:25 +02:00
Alexander Medvednikov 7385f8e56b all: a massive merge of ast and table modules 2021-04-02 01:57:09 +03:00
yuyi cabbf93faa
cgen: fix generic_struct str() (#9504) 2021-03-29 11:15:59 +02:00
Alexander Medvednikov bb5958991c checker: warn about automatic (de)referencing; freetype: compilation flag fixes 2021-03-26 11:42:51 +03:00
Lukas Neubert 1b572f75e8
fmt: minor array wrap improvement (#9420) 2021-03-22 23:06:12 +01:00
spaceface 3f9e921c95
builtin: add a proper str() method to IError (#9379) 2021-03-20 01:55:16 +02:00
spaceface e9797c618a
all: implement error interfaces (#9291) 2021-03-13 18:13:50 +01:00
spaceface f1469a8761
checker: allow accessing fields common to all sumtype members (#9201) 2021-03-09 19:16:18 +02:00