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

158 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
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
Nick Treleaven
e813583bc1
checker: support integer and voidptr key types for maps (#7503) 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 (#7538)"
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 (#7538) 2020-12-27 11:54:12 +01:00
spaceface
214290d55b
fmt: add a space around single-line unsafe expressions (#7505) 2020-12-23 19:13:42 +01:00
Nick Treleaven
2147d8785b
map: add functions new_map/new_map_init_1 with key_bytes parameter (#7424) 2020-12-21 06:03:59 +01:00
Nick Treleaven
82d1b6a5b7
map: fix wrong use of map.cap and rename field (#7412) 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 (#7390) 2020-12-19 01:05:16 +02:00
Nick Treleaven
3976228ae0
map: add voidptr key methods (#7377) 2020-12-18 07:37:59 +01:00
Ned Palacios
c164586fd5
cgen: fix map clone (#7366) 2020-12-17 08:44:50 +01:00
Nick Treleaven
7c8fa62cc2
map: encapsulate key clone operation on voidptr (#7327) 2020-12-16 02:23:59 +01:00
Nick Treleaven
89ef316db3
map: use voidptr-based key equality and meta index methods (#7320) 2020-12-14 14:57:53 +02:00