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

162 Commits

Author SHA1 Message Date
Ethan Hansen
5001b17336
docs: add docstring for map.move() () 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 () 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 () 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 () 2022-12-22 21:47:39 +02:00
yuyi
e01dac885c
builtin: fix m.len to 0, after calling map.clear() () 2022-12-22 21:36:33 +02:00
shove
8b962f8446
checker: fix nested struct reference type field initialized check. (fix: ) () 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 () 2022-05-12 09:43:01 +03:00
Hunam
0699f324b5
builtin: add map.values() () 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 () 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 () 2021-08-12 21:46:38 +03:00
Uwe Krüger
5ee1ded3fb
gc: extend optimized mode to maps () 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) () 2021-04-12 16:22:02 +02:00
ka-weihe
0facc5a559
builtin: fix map.zeros_to_end () 2021-04-12 00:36:02 +03:00
ka-weihe
5273214ec2
map: rename methods () 2021-04-10 04:00:29 +02:00
ka-weihe
bca9409192
map: wrap up delete fix () 2021-04-07 14:12:12 +02:00
Alexander Medvednikov
ff9837386a Revert "map: wrap up delete fix ()"
This reverts commit cbcc0d34b5.
2021-04-07 03:40:43 +03:00
ka-weihe
cbcc0d34b5
map: wrap up delete fix () 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 () 2021-04-01 10:39:00 +02:00
Uwe Krüger
76dc4cf13f
gc: fix another alignment issue () 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 () 2021-03-24 19:49:16 +02:00
spaceface
624c1f3bcf
cgen: make bools take up a single byte, not 4 () 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 () 2021-02-14 19:31:42 +01:00
Nick Treleaven
84a16d8684
map: add move method () 2021-02-12 02:02:33 +02:00
Larpon
e83c39c81a
builtin: document rest of map.v () 2021-02-06 03:07:42 +01:00
Uwe Krüger
b74690cbec
builtin, checker, cgen: implement x = a[k] or { ... } for maps and arrays () 2021-01-19 06:06:57 +01:00
Lukas Neubert
ac2c3847af
all: update copyright to 2019-2021 () 2021-01-18 13:20:06 +01:00
zakuro
33694665f0
fmt: align each contiguous field of struct. not the whole. () 2021-01-12 04:38:43 +01:00
Nick Treleaven
8fc33bc27d
checker: warn when casting number or a voidptr to reference type outside unsafe () 2021-01-05 20:07:45 +02:00
Nick Treleaven
38e0aa350d
checker: support non-string map.keys method () 2021-01-03 15:55:06 +01:00
ka-weihe
1d339cff16
map: remove unused code () 2020-12-27 19:16:45 +01:00
ka-weihe
b9df7aae4d
map: cleanup () 2020-12-27 18:31:50 +01:00
Nick Treleaven
e813583bc1
checker: support integer and voidptr key types for maps () 2020-12-27 14:18:46 +01:00
Alexander Medvednikov
06e9951224 Revert "map: fix map.clone, refactor, fix map_get_1, map_set_1 non-string keys ()"
This reverts commit bcdf3ca0cf.
2020-12-27 12:04:08 +01:00
Nick Treleaven
bcdf3ca0cf
map: fix map.clone, refactor, fix map_get_1, map_set_1 non-string keys () 2020-12-27 11:54:12 +01:00
spaceface
214290d55b
fmt: add a space around single-line unsafe expressions () 2020-12-23 19:13:42 +01:00
Nick Treleaven
2147d8785b
map: add functions new_map/new_map_init_1 with key_bytes parameter () 2020-12-21 06:03:59 +01:00
Nick Treleaven
82d1b6a5b7
map: fix wrong use of map.cap and rename field () 2020-12-21 05:34:35 +01:00
Nick Treleaven
042449cd3d
cgen: use voidptr key methods: map_get_1, map_set_1, map_get_and_set_1 () 2020-12-19 01:05:16 +02:00