1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

11222 Commits

Author SHA1 Message Date
Delyan Angelov
fc5826b7ca
cgen: minimise sizeof(EmptyStruct) to 0 for gcc/clang and to 1 for tcc/msvc, by changing EMPTY_STRUCT_DECLARATION and EMPTY_STRUCT_INITIALIZATION (#16733) 2022-12-22 21:47:39 +02:00
yuyi
e01dac885c
builtin: fix m.len to 0, after calling map.clear() (#16720) 2022-12-22 21:36:33 +02:00
Delyan Angelov
f9043c84a7
builtin: optimise the initialisation of the common 1 byte element arrays []u8 2022-12-22 20:41:32 +02:00
Delyan Angelov
8f8a186158
builtin: support -d trace_vmemset, -d trace_vmemcmp, -d trace_vmemmove and -d trace_vmemcpy too 2022-12-22 20:08:53 +02:00
Delyan Angelov
b67705f568
builtin: move the -d trace_*alloc lines at the start of their corresponding functions, implement -d trace_memdup too 2022-12-22 19:36:15 +02:00
Delyan Angelov
3da4f37b01
cgen: improve generated source compatibility with latest Alpine (lacking libexecinfo-dev and execinfo.h) and the prebuilt tcc (#16743) 2022-12-22 15:01:51 +02:00
yuyi
e519bdf0eb
checker: check generic method receiver type mismatch (#16739) 2022-12-22 13:37:46 +02:00
yuyi
82a3551313
checker, cgen: fix match expr with branch returning (#16741) 2022-12-22 12:55:44 +02:00
Swastik Baranwal
3c5cfa22d1
parser: disallow the array init: attr, when the len: attr is not provided (#16735) 2022-12-21 21:24:16 +02:00
Delyan Angelov
87f8069728
ci: fix warnings for compiling builder_test.v too 2022-12-21 21:14:21 +02:00
Alexander Medvednikov
88e33a83de gg: fix draw_image on macos native; vcreate: vweb template 2022-12-21 19:33:37 +03:00
yuyi
ccbb8ab0ca
ast, parser: fix generic struct init with nested generic struct (#16736) 2022-12-21 18:32:54 +02:00
Delyan Angelov
1cde55478d
cgen: fix cgen errors for overloaded operators using reference types for the receiver and operand (fix #16725) (fix #15859) (#16726) 2022-12-21 09:10:30 +02:00
Felipe Pena
2f9becc98d
cgen: fix debug generated code with -g, while fixing #16690 (#16723) 2022-12-20 16:41:42 +02:00
Delyan Angelov
3c920f2ee6
x.json: fix parsing of time fields, that have just a single date encoded inside the parsed string (fix #16722) 2022-12-20 16:34:09 +02:00
pancake
c84eb29b78
js: use write() on the freestanding backend (#16704) 2022-12-20 13:16:06 +02:00
John
eb8e8b8642
rand: add Blackman/Vigna xoroshiro128++ PRNG (#16712) 2022-12-20 10:53:30 +03:00
Felipe Pena
0fe7ae3a60
cgen: remove repeated code (#16718) 2022-12-20 10:52:37 +03:00
Larpon
7e4dc24f1b
math: add math.vec module with generic 2D, 3D and 4D vector operations (#16710) 2022-12-19 18:10:48 +02:00
yuyi
2090e4a12f
ast, cgen: optimize generic struct with inconsistent generic types (#16708) 2022-12-19 15:02:27 +02:00
Delyan Angelov
353fdb4ca0 ci: workaround for v vet failing for v clean-code over the new v bench script (using \ in its path on windows). 2022-12-19 12:31:16 +02:00
Delyan Angelov
cbd34cd6e7
bench: add bench_string_key_in_map_vs_string_value_in_array.v 2022-12-19 11:56:00 +02:00
yuyi
aad95ac818
cgen: fix generic struct init with inconsistent generic types (fix #16677) (#16702) 2022-12-19 10:43:27 +02:00
Felipe Pena
04936b00c5
cgen: fix struct selector with or block (#16695) 2022-12-18 14:22:06 +02:00
Delyan Angelov
de5ae63401
parser: improve precision of struct field type positions in errors 2022-12-18 13:34:39 +02:00
Swastik Baranwal
5b4a16e864
checker: add err for unknown generic struct field (#16698) 2022-12-18 11:46:37 +02:00
yuyi
ba07e48691
ast, checker: fix checking generic struct type mismatch (#16701) 2022-12-18 10:29:44 +02:00
Delyan Angelov
9f1239c56e vweb,net: fix vweb crash when the connection was closed prematurely (tested with Chrome on windows, refreshing as fast as possible) 2022-12-17 19:08:59 +02:00
yuyi
e83a8416d5
ast, parser: fix generic struct init with inconsistent generic types (#16697) 2022-12-17 18:17:43 +02:00
Felipe Pena
9921598c91
cgen: fix struct field initialisation with a fixed array (#16692) 2022-12-17 18:15:17 +02:00
Delyan Angelov
1aec40a126
vweb: flush stdout after the Running app on message, fix potential invalid map value access in serve_if_static 2022-12-17 18:04:50 +02:00
Felipe Pena
65a020e385
cgen: fix comptime checking optional type with IS operator (#16688) 2022-12-16 16:53:04 +03:00
l-m
f0a252d0e6
builtin: apply .nogrow flags to gcboehm array (#16689) 2022-12-16 07:57:50 +02:00
Delyan Angelov
0a11955284
parser: support an unambiguous sizeof[T]() and isreftype[T]() (part 1) (#16684) 2022-12-15 19:21:52 +02:00
Ikko Ashimine
e5e73ebbfa
regex: fix typo in regex.v (#16683) 2022-12-15 18:54:07 +02:00
Swastik Baranwal
bd1d96de0e
cgen: add support for alias map keys (#16682) 2022-12-15 18:53:23 +02:00
Delyan Angelov
3643785981
pref: deprecate -error-limit in favour of the documented -message-limit option. 2022-12-15 10:37:57 +02:00
yuyi
fd472d2d41
toml: minor cleanup in toml tests (#16679) 2022-12-15 10:16:42 +02:00
Makhnev Petr
db2111235e
tests: add a teamcity output format for V's test runner (#16681) 2022-12-15 09:29:09 +02:00
Felipe Pena
c3ee26f15f
checker,cgen: fix dump when using comptime variable val.${field.name} (#16671) 2022-12-14 20:45:28 +02:00
Delyan Angelov
f762d46c84
pg: add compatibility.h, using a PG_VERSION_NUM check in the preprocessor, to just hardcode the missing CONNECTION_ numbers 2022-12-14 18:27:42 +02:00
Delyan Angelov
3b683f11e0
pg: comment out C.CONNECTION_GSS_STARTUP, which is not available on Debian 10 (PG 11) 2022-12-14 16:39:29 +02:00
yuyi
8e3a90ae79
cgen: minor cleanup in struct_init() (#16676) 2022-12-14 15:25:09 +02:00
yuyi
8ab4c7742c
ast, checker: fix generic struct init with inconsistent generic types (#16675) 2022-12-14 14:57:12 +02:00
Delyan Angelov
173b1895d6
pg: cleanup implementation, make -cstrict pass with both gcc-11 and clang-12 (by tightening the C wrapper declarations) 2022-12-14 13:17:00 +02:00
Hitalo Souza
70bb989537
doc: update the README for json2 (#16657) 2022-12-14 10:21:29 +02:00
l-m
acbd93b54c
builtin: add .nogrow and .nofree flags to array (#16661) 2022-12-14 09:44:14 +02:00
Subhomoy Haldar
b07e447764
encoding.html: add escape() function (#16666) 2022-12-13 22:10:57 +02:00
yuyi
69f7c45bec
builtin: fix array init with array default (#16664) 2022-12-13 18:05:33 +02:00
Felipe Pena
738fe77300
cgen: fix short circuiting behaviour of logical expressions, when several PrefixExpr's are used in if conditions (#16660) 2022-12-13 13:09:03 +02:00