Commit graph

169 commits

Author SHA1 Message Date
Turiiya
f77bb32044
all: fix typos (#21089) 2024-03-25 12:18:27 +02:00
Tim Marston
c4b8036970
v: add map update-init syntax: new_map := {...old_map, 'k1': 1, 'k2': 5} (#20561) 2024-01-17 17:55:57 +02:00
Anton
763f94388b
all: update copyright year (#20334) 2024-01-01 23:29:54 +02:00
Alexander Medvednikov
f09826e928 all: unwrap const() blocks 2023-11-25 10:02:51 +03:00
shove
2a6c1d9074
all: assigning 0 to reference fields now requires unsafe blocks (fix #14911) (#19955) 2023-11-23 11:16:26 +02:00
Joe C
757929392e
all: update attributes to use new syntax 2023-11-15 16:16:01 +11:00
Turiiya
f755118e7c
vlib: update doc comments (#19231) 2023-08-30 08:50:00 +03:00
Ethan Hansen
5001b17336
docs: add docstring for map.move() (#18430) 2023-06-16 09:45:16 +03:00
Delyan Angelov
6806086bf1
builtin: zero out internal map/array pointers on m.free(), to reduce the work for the GC mark phase for non escaping maps/arrays, used in hot loops (#18415) 2023-06-14 15:00:36 +03:00
Alexander Medvednikov
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
MatejMagat305
6d223b9a26
builtin: add a map.reserve/1 method (#17052) 2023-01-23 11:07:25 +02:00
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
shove
8b962f8446
checker: fix nested struct reference type field initialized check. (fix: #15741) (#15752) 2022-09-15 07:59:31 +03:00
Alexander Medvednikov
9099594a49 all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
CC
901b8f0c24
builtin: add a map.clear() method (#14373) 2022-05-12 09:43:01 +03:00
Hunam
0699f324b5
builtin: add map.values() (#14301) 2022-05-06 20:42:01 +03:00
Alexander Medvednikov
014c3c97f0 all: byte => u8 2022-04-15 14:45:52 +03:00
Delyan Angelov
8dc4b1d9a3
builtin: use malloc_noscan more (for map metas and in []byte.hex()) 2022-03-11 11:26:22 +02:00
Alexander Medvednikov
59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
Delyan Angelov
6d97b0a407
checker: improve checking of a << b, when a and b are numbers (#12589) 2021-11-29 03:48:49 +03:00
Alexander Medvednikov
7ea57bfa1e builtin: make map.keys() public 2021-11-04 19:09:37 +03:00
Delyan Angelov
bd65ceb463
v.markused: remove __print_assert_failure from all_fn_root_names 2021-09-17 21:47:22 +03:00
Delyan Angelov
47884dfd1f
builtin: move C. calls to .c.v files (#11164) 2021-08-12 21:46:38 +03:00
Uwe Krüger
5ee1ded3fb
gc: extend optimized mode to maps (#10426) 2021-06-13 06:26:43 +03:00
Delyan Angelov
159ee00563
builtin: remove import hash 2021-05-10 09:22:50 +03:00
ka-weihe
491fe49af6
map: rename methods (part 2) (#9698) 2021-04-12 16:22:02 +02:00
ka-weihe
0facc5a559
builtin: fix map.zeros_to_end (#9689) 2021-04-12 00:36:02 +03:00
ka-weihe
5273214ec2
map: rename methods (#9657) 2021-04-10 04:00:29 +02:00
ka-weihe
bca9409192
map: wrap up delete fix (#9626) 2021-04-07 14:12:12 +02:00
Alexander Medvednikov
ff9837386a Revert "map: wrap up delete fix (#9601)"
This reverts commit cbcc0d34b5.
2021-04-07 03:40:43 +03:00
ka-weihe
cbcc0d34b5
map: wrap up delete fix (#9601) 2021-04-06 15:57:08 +02:00
Delyan Angelov
1899845582
ci: fix build-vc job 2021-04-05 22:18:18 +03:00
Delyan Angelov
d11fb8497a
ci: fix some of v test-cleancode 3 2021-04-05 21:21:46 +03:00
Alexander Medvednikov
57e6138a61 all: remove byteptr and charptr; replace them with &byte and &char 2021-04-04 17:43:32 +03:00
ka-weihe
1a76cb1c36
map: fix misalignment (#9548) 2021-04-01 10:39:00 +02:00
Uwe Krüger
76dc4cf13f
gc: fix another alignment issue (#9489) 2021-03-27 18:59:51 +01:00
Uwe Krüger
522d70b48d
builtin,cgen: fix -gc boehm issues with maps; add a CI job for it to prevent regressions (#9453) 2021-03-24 19:49:16 +02:00
spaceface
624c1f3bcf
cgen: make bools take up a single byte, not 4 (#9352) 2021-03-18 15:23:29 +01:00
Delyan Angelov
125be84e3d
builtin: fix -d debug_realloc, add realloc_data/3 2021-03-14 14:54:35 +02:00
Nick Treleaven
ea803113c3
checker: check unsafe V function calls (#8752) 2021-02-14 19:31:42 +01:00
Nick Treleaven
84a16d8684
map: add move method (#8660) 2021-02-12 02:02:33 +02:00
Larpon
e83c39c81a
builtin: document rest of map.v (#8578) 2021-02-06 03:07:42 +01:00
Uwe Krüger
b74690cbec
builtin, checker, cgen: implement x = a[k] or { ... } for maps and arrays (#8193) 2021-01-19 06:06:57 +01:00
Lukas Neubert
ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
zakuro
33694665f0
fmt: align each contiguous field of struct. not the whole. (#7981) 2021-01-12 04:38:43 +01:00
Nick Treleaven
8fc33bc27d
checker: warn when casting number or a voidptr to reference type outside unsafe (#7900) 2021-01-05 20:07:45 +02:00
Nick Treleaven
38e0aa350d
checker: support non-string map.keys method (#7760) 2021-01-03 15:55:06 +01:00
ka-weihe
1d339cff16
map: remove unused code (#7622) 2020-12-27 19:16:45 +01:00
ka-weihe
b9df7aae4d
map: cleanup (#7621) 2020-12-27 18:31:50 +01:00