Commit graph

1832 commits

Author SHA1 Message Date
yuyi
f00d93477c
cgen: fix assert [1, 2, 3]!.reverse() == [3, 2, 1]! (#22745) 2024-11-03 10:00:46 +02:00
yuyi
9e2592e429
cgen: fix assert [1, 2, 3]!.index(2) == 1 (#22727) 2024-11-02 10:49:00 +02:00
yuyi
3b828f3ca1
cgen: fix assert [1, 2, 3]!.contains(2) (#22725) 2024-11-02 10:16:54 +02:00
yuyi
2c887e2017
cgen: fix [1, 2, 3]!.map(it * 2) (#22722) 2024-11-01 09:39:17 +02:00
Felipe Pena
ee4f29fd87
v: optimize the compiler performance (#22709) 2024-10-31 20:40:30 +02:00
yuyi
97941b97f8
checker, cgen: implement methods reverse()/reverse_in_place() for fixed arrays (#22712) 2024-10-31 13:46:36 +02:00
yuyi
4e9b21f9d0
checker, cgen: implement methods sort_with_compare()/sorted_with_compare() for fixed arrays (#22702) 2024-10-31 06:52:06 +02:00
yuyi
c8ddf2197a
builtin, cgen: improve the assert informations (fix #22666) (#22668) 2024-10-27 17:45:08 +02:00
yuyi
4a7eca14c6
checker, cgen: implement method sort()/sorted() for fixed array (#22650) 2024-10-25 22:01:09 +03:00
yuyi
5ad0186895
checker, cgen: implement method map() for fixed arrays (#22644) 2024-10-25 11:49:48 +03:00
Delyan Angelov
8b36856692
builtin: support -d no_gc_threads for turning off passing -DGC_THREADS=1 while compiling the GC library 2024-10-23 16:10:19 +03:00
yuyi
fe6af05b59
checker: fix lambda expr with fntype params and restore fixed_array_any_all_test.v (#22625) 2024-10-23 15:38:53 +03:00
yuyi
a6c5289f89
builtin: temporary fix fixed_array_any_all_test.v (#22624) 2024-10-23 07:35:58 +03:00
yuyi
ea8ae7ba17
builtin: improve fixed_array_any_all_test.v (related #22609) (#22621) 2024-10-22 18:33:49 +03:00
yuyi
fa88da6e89
checker, gen: implement method .contains/1 for fixed arrays (#22617) 2024-10-22 18:17:06 +03:00
Hitalo Souza
b5795dcd76
builtin: improve performance of string.starts_with/1 and string.ends_with/1, when compiled with tcc (#22620) 2024-10-22 17:02:47 +03:00
yuyi
49e1b01488
checker, cgen: implement fixed array methods any() and all() (#22609) 2024-10-22 11:06:31 +03:00
yuyi
39c69c5fc8
checker, cgen: implement .index/1 method for fixed arrays (#22593) 2024-10-20 14:38:48 +03:00
Pepper Gray
ce8f62146b
utf8, readline: clarify UTF-8 vs UTF-32 usage (see also #22461) (#22558) 2024-10-18 11:18:31 +03:00
Delyan Angelov
a64dfc776b
builtin: remove unsafe{} blocks from data_to_hex_string/2 2024-10-16 14:19:18 +03:00
Delyan Angelov
c5e8ad19df
builtin: implement a s.hex() method, allowing shortening s.bytes().hex() chains, and reducing the intermediate allocations; add tests for it (#22540) 2024-10-16 14:18:10 +03:00
Jose Mendoza
75658415f1
builtin: add string.wrap method + tests (#22441) 2024-10-08 07:14:32 +03:00
kbkpbot
309c8d3778
strconv: fix e/g format (fix #22424) (#22430) 2024-10-07 08:43:04 +03:00
Delyan Angelov
4f9df0da72
builtin: unify memory allocation error handling, and avoid string interpolation, when allocation failed (#22423) 2024-10-06 20:56:58 +03:00
Delyan Angelov
209c30f3a6
v.builder: fix building with -cc msvc and non ASCII characters in paths on windows 11 (#22410) 2024-10-05 02:20:15 +03:00
kbkpbot
dc6a9583d7
v.builder, builtin: use ANSI encoding for the .rsp file under Windows; add builtin string_to_ansi_not_null_terminated + tests (#22409) 2024-10-04 20:29:13 +03:00
yuyi
5e00270ef2
builtin: cleanup push_many()/push_many_noscan() (#22383) 2024-10-01 20:16:13 +03:00
yuyi
c7bdc0a781
cgen: fix aliases of array insert(...)/prepend(...) (fix #22323) (#22324) 2024-09-27 07:41:13 +03:00
Meng Zhuo
b1c9941065
builtin: enable GC lib on rv64 build (#22319) 2024-09-26 10:58:33 +03:00
Meng Zhuo
c5837e4f89
builtin: drop C in int.v (#22245) 2024-09-18 16:52:19 +03:00
Felipe Pena
1187e1367c
all: add comptime support for traversing the method parameters with $for arg in method.params { (#22229) 2024-09-17 20:13:07 +03:00
Laurent Cheylus
c3b55a68a5
builtin: fix compilation with tcc on OpenBSD using libgc (#22234) 2024-09-16 17:02:30 +03:00
yuyi
ca5f47a966
builtin: cleanup string trim()/trim_left()/trim_right() (#22225) 2024-09-15 20:05:42 +03:00
yuyi
6eae77b61e
builtin: fix string.trim() (fix #13021) (#22205) 2024-09-13 07:27:40 +03:00
yuyi
008aaad999
fmt: remove the prefixed module name of const names, that are in the same module (related #22183) (#22185) 2024-09-10 11:25:56 +03:00
Delyan Angelov
6528efa405
builtin: remove string interpolation from panic/1, to be able to use tools like cbmc in more cases (#22182) 2024-09-09 07:45:23 +03:00
Kim Shrier
747f50f028
builtin: remove remaining references to v_calloc in function comments (#22179) 2024-09-08 12:10:33 +03:00
Delyan Angelov
b8c649b62a
builtin: small cleanup in array.free() (make debugging easier) (#22173) 2024-09-07 18:22:16 +03:00
yuyi
99bfb5b0fc
builtin: cleanup comments of struct string (#22159) 2024-09-04 07:31:50 +03:00
Delyan Angelov
ace4e93576
tests: move all slow vlib/builtin/map_issue_*_test.v files to vlib/v/slow_tests/, to speed up v test vlib/builtin 2024-09-02 07:56:20 +03:00
Delyan Angelov
e684c1d329
builtin: fix bug in .clear() caused by sizeof(u32) being 4, not 2 (fix #22148) 2024-09-02 07:38:51 +03:00
Delyan Angelov
33f74cf126
builtin: fix m.clear() having different observable behavior to m = {}, after multiple iterations of setting keys and clearing (fix #22145) (#22146) 2024-09-01 20:09:53 +03:00
Delyan Angelov
fc31b44399
builtin: fix incomplete m.clear(), allowing the map to have a duplicated entry for its first key (fix #22143) (#22144) 2024-09-01 17:27:28 +03:00
Delyan Angelov
673ac0a411
builtin: fix map.clear() not resetting map's metas and keys blocks (fix #22139) (#22140) 2024-09-01 12:02:03 +03:00
Delyan Angelov
217b191492
builtin: support -d builtin_print_use_fprintf, make the C fn declarations stricter (#22137) 2024-08-31 16:57:51 +03:00
yuyi
971feb8f89
builtin: cleanup u8.repeat() and rune.repeat() (#22100) 2024-08-23 08:24:35 +03:00
Delyan Angelov
6834ccb2d5 builtin,thirdparty: fix compilation of libgc with -cc msvc -gc boehm (thanks to @Ekopalypse) 2024-08-22 18:43:45 +03:00
yuyi
fdc3a9c11c
builtin,fmt: cleanup alignment using string.repeat() instead of strings.repeat() (#22087) 2024-08-21 09:18:10 +03:00
Alexander Medvednikov
ae1b9ed571 veb: deprecate x.vweb in favor of veb; checker: show missing variants in the sumtype error 2024-08-18 17:27:08 +03:00
yuyi
e9c9580370
all: remove the obsolete .code and .msg fields of IError (#22066) 2024-08-17 14:34:42 +03:00