Commit graph

1717 commits

Author SHA1 Message Date
Turiiya
2a368cf53c
builtin, strings: improve consistency and behavior regarding explicit mutability (#21566) 2024-07-10 15:26:51 +03:00
yuyi
209063ffd0
fmt: implement wrapping function's super long arguments (fix #15545, fix #21643) (#21782) 2024-07-02 23:10:00 +03:00
Alexander Medvednikov
940fc41c19 encoding.binary: little_endian_f32_at 2024-07-01 14:08:37 +03:00
Turiiya
895bd71fa0
builtin: improve snake to camel case conversion (#21755) 2024-06-29 11:10:10 +03:00
Turiiya
6ecfc6f63a
builtin: fix assert '_ISspace'.camel_to_snake() == '_i_sspace' (#21736) 2024-06-27 08:23:39 +03:00
Turiiya
5b9358279a
vlib: simplify byte character conditions by using methods like is_capital, is_lower, is_letter etc (#21725) 2024-06-25 09:55:08 +03:00
Turiiya
c5c49d3685
builtin: fix assert 'JVM_PUBLIC_ACC'.camel_to_snake() == 'jvm_public_acc' (#21722) 2024-06-24 23:01:52 +03:00
Alexander Medvednikov
d7bc216713 string: fix leak in replace_once 2024-06-22 19:17:26 +03:00
Alexander Medvednikov
549e11bfa1 string: optimize is_ascii() 2024-06-22 18:25:52 +03:00
Turiiya
895bb87a32
builtin: improve performance of string.camel_to_snake (#21691) 2024-06-18 09:16:10 +03:00
kbkpbot
df1e4f1246
builtin: add string.camel_to_snake/0 and string.snake_to_camel/0 methods (#21679) 2024-06-15 21:02:44 +03:00
kbkpbot
02f65627bc
builtin: fix string.find_between(), when not found end string return '' (#21670) 2024-06-12 14:25:19 +03:00
Juan de Bruin
da4afef0d7
builtin: implement a JS version of string.split_any (#21612) 2024-06-08 07:10:57 +03:00
Turiiya
a2ce55d922
builtin: update last_index_u8, deprecate index_u8_last string methods, make consistent with last_index (#21604) 2024-06-04 13:21:47 +03:00
Alexander Medvednikov
1096173bd3 builtin: vfmt builtin.c.v 2024-06-02 10:43:48 +03:00
Alexander Medvednikov
4884396ee6 vdoc: fix multiline js string generation in search_index.js 2024-06-02 10:35:50 +03:00
Turiiya
0fdc32e225
builtin: simplify splint_nth methods (#21563) 2024-05-25 16:47:11 +03:00
Delyan Angelov
c9e6a120f6
builtin: reduce allocations in s.index_kmp/1 and s.replace/2 (#21561) 2024-05-25 03:25:38 +03:00
Turiiya
98ea85170b
builtin: make FnExitCb type public (#21552) 2024-05-23 11:16:55 +03:00
Delyan Angelov
84fbe2728d
builtin,v: reduce overhead and memory usage for very frequently called methods (#21540) 2024-05-21 09:11:56 +03:00
Alexander Medvednikov
736067dd18 V 0.4.6 2024-05-20 21:06:54 +03:00
Delyan Angelov
6752ce8914
builtin,dlmalloc: fixes for v vlib/v/gen/c/coutput_test.v for gcc14.1, which is stricter 2024-05-19 17:18:48 +03:00
Delyan Angelov
3a3a1085cf
builtin: simplify MessageError.msg() (#21524) 2024-05-18 22:36:24 +03:00
Turiiya
5329a0a671
builtin: fix empty string lower / upper assert (#21358) 2024-04-26 21:03:44 +03:00
Delyan Angelov
d66de0c514
builtin: fix undefined read s[0], from ''.is_lower() and ''.is_upper() in c7af2c2 2024-04-26 17:07:40 +03:00
Swastik Baranwal
c7af2c21d1
builtin.string: fix is_upper and is_lower with numbers (#21357) 2024-04-26 16:20:21 +03:00
Delyan Angelov
24cb4e2fa1
builtin: cleanup -d vplayground related code (#21329) 2024-04-21 23:00:30 +03:00
Turiiya
8aa9314a99
vlib: refactor empty string checks to use s == '' or s != '', instead of s.len == 0 (#21300) 2024-04-18 02:44:31 +03:00
Delyan Angelov
a8d0cdd31b
all: replace usages of C.atexit(cb) with at_exit(cb) or {} (part 2) (#21263) 2024-04-12 13:51:18 +03:00
Delyan Angelov
a222d7beb2
builtin: implement an at_exit(cb) wrapper for C.atexit (part 1) (#21254) 2024-04-12 09:15:13 +03:00
Turiiya
27cd1b106e
builtin: cleanup compare_strings functions (#21255) 2024-04-11 22:17:12 +03:00
Felipe Pena
625048c5b4
x.json2,checker,toml: allow field.typ compile-time checking with MatchExpr and add array of option checking (#21171) 2024-04-04 12:43:59 +03:00
Felipe Pena
24af002249
v,breaking: add ability to read enum, fn, interface and sumtype attributes in compile-time, change builtin StructAttribute to VAttribute (#21149) 2024-03-31 09:14:33 +03:00
Alexander Medvednikov
24ac0c1fb5 builtin: fix tests 2024-03-29 07:59:11 +03:00
Alexander Medvednikov
acf0107493 builtin: str.last_index(); pref: hide-auto-str; 2024-03-28 18:26:30 +03:00
Turiiya
f77bb32044
all: fix typos (#21089) 2024-03-25 12:18:27 +02:00
Felipe Pena
24d157205b
cgen: force C struct types which does not implement str() to be passed as ptr (#21054) 2024-03-21 00:24:38 +02:00
Felipe Pena
e6b43a166e
cgen: enable autofree for option (#21051) 2024-03-20 08:33:51 +02:00
Joe Conigliaro
a1c5c6c8f2
builtin: add missing return type to fn signature for C.GC_get_stack_base 2024-03-14 00:08:39 +11:00
Joe C
f315676882
coroutines: manually create photon vcpu's & add functions to set photon log output (#21012) 2024-03-14 00:00:42 +11:00
Kim Shrier
094b0328e5
builtin: fix a few grammar errors in builtin.string comments (#21010) 2024-03-13 13:14:50 +02:00
Delyan Angelov
a373bee98b
builtin: expose gc_disable(), gc_enable(), gc_is_enabled(), in addition to the existing gc_collect() (#21002) 2024-03-12 17:03:33 +02:00
cui fliter
78602846e5
all: fix typos in comments (#20963) 2024-03-04 18:41:55 +02:00
Delyan Angelov
a58f980b02
os: workaround a -prod -cc gcc bug, affecting os.open_file (fix #20923) (related to #20872) (#20960) 2024-03-04 18:15:28 +02:00
Delyan Angelov
497b613023
cgen: fix codegen for a.index/1, where a is []Fn (#20849) 2024-02-17 00:30:57 +02:00
Turiiya
d485cceee8
doc: update trim_doc_node_description, make module readmes more uniform (#20792) 2024-02-12 12:38:47 +02:00
Delyan Angelov
101b8a6b14
builtin: support -d gc_warn_on_stderr, to show the GC warnings, without installing a custom warn fn callback 2024-02-11 17:47:19 +02:00
Delyan Angelov
8793aebe65
builtin: add gc_collect/0, gc_get_warn_proc/0, gc_set_warn_proc/1. Use them to turn off GC warnings by default. (#20788) 2024-02-11 16:07:36 +02:00
Joe C
212adfab92
builtin,coroutines,cgen: fix using coroutines with boehm GC, by using a stack pointer corrector (#20771) 2024-02-10 15:20:11 +02:00
zeozeozeo
99579acaf2
builtin: link to user32 to fix boehm GC compilation on Windows with clang released from the LLVM project (fix #20724) (#20767) 2024-02-10 09:00:08 +02:00