Commit graph

1832 commits

Author SHA1 Message Date
yuyi
ee16f6f094
builtin: cleanup interface IError, remove the obsolete .code and .msg fields, deprecated in 2022-02-11 (#22063) 2024-08-17 09:53:46 +03:00
yuyi
c69dfefedb
fmt: cleanup fields comments alignment and add ignore_newline config (#22027) 2024-08-12 10:56:32 +03:00
yuyi
c51d30bf53
fmt: fix alignment of struct init fields (#22025) 2024-08-11 09:11:24 +03:00
yuyi
19f080ffb8
all: change single blank comment to blank line (#22016) 2024-08-09 14:55:58 +03:00
yuyi
79ee4ae046
fmt: fix alignment of enumeration types (#21999) 2024-08-07 15:46:50 +03:00
yuyi
ddb6685d8a
fmt: fix and simplify align of struct fields (#21995) 2024-08-05 20:23:39 +03:00
Alexander Medvednikov
c4a434bd7f tmpl: fix an extra newline in @for; builtin: some i64 fixes 2024-07-31 13:30:30 +03:00
Delyan Angelov
f676daceb5
vlib: fix C warnings/errors for v -show-c-output -cstrict -cc clang-18 run examples/gg/additive.v 2024-07-30 17:15:15 +03:00
Delyan Angelov
6f20516a34
builtin: panic on trying to grow arrays with capacity bigger than 2^31, instead of overflowing a.cap (partial fix for #21918) (#21947) 2024-07-28 23:17:59 +03:00
yuyi
bf04adcc81
builtin: fix 'aaaa'.split('aa') (fix #21936) (#21951) 2024-07-28 13:25:14 +03:00
Alexander Medvednikov
b5452e0adf builtin: v_segmentation_fault_handler signal_number i32 2024-07-28 10:10:30 +03:00
Swastik Baranwal
69bc4be512
builtin: add s.trim_space_left/0 and s.trim_space_right/0 methods (#21903) 2024-07-21 22:38:59 +03:00
Delyan Angelov
bbbb86442d
builtin: support -d use_bundled_libgc to make it easier to debug/upgrade reliably libgc cloned from ivmai/bdwgc (#21869) 2024-07-15 04:34:14 +03:00
Felipe Pena
769e9147c3
v: change old attr syntax mention to new one in comments too (#21860) 2024-07-14 09:39:37 +03:00
Delyan Angelov
c2f7afdbf5
builtin: add pub fn arguments() []string {; make os.args use it, remove edge case in cgen (#21852) 2024-07-13 00:09:44 +03:00
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