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

1050 Commits

Author SHA1 Message Date
Delyan Angelov
7f91b75cbc
builtin: fix leaks in os.execute() and []string{} == []string{} 2021-03-23 20:36:19 +02:00
Delyan Angelov
d098a3caca
builtin: make string.add() public temporarily till -autofree improves 2021-03-23 20:20:53 +02:00
Delyan Angelov
419ee8ae2a
builtin: fix a bug in []string.join() 2021-03-23 20:14:46 +02:00
Alexander Medvednikov
0c055a1ce9 all: s.contains(s2) instead of in 2021-03-23 11:38:56 +03:00
Delyan Angelov
c76c69ec35
all: simplify return if ... constructs to make more code compatible with -autofree 2021-03-22 16:45:29 +02:00
yuyi
320cd00203
string: fix replace_each() (#9415) 2021-03-22 09:46:45 +01:00
Alexander Medvednikov
4d77f3810f gc: enable on macos and add leak detection fns 2021-03-21 05:31:10 +03:00
spaceface
5873149c77
builtin: allow libgc to be used on windows as well (#9393) 2021-03-21 01:01:21 +01:00
Delyan Angelov
8810af76df
all: support -gc boehm on systems with libgc-dev installed (#9382) 2021-03-20 14:16:36 +01:00
spaceface
3f9e921c95
builtin: add a proper str() method to IError (#9379) 2021-03-20 01:55:16 +02:00
Delyan Angelov
ea3d1405ee
ci: fix failing -Werror job with tcc 2021-03-19 09:34:41 +02:00
Delyan Angelov
8fa7e67000
builtin: use return s.clone() instead of return s consistently, to make manual free easier 2021-03-18 22:23:36 +02:00
Delyan Angelov
00651c8deb
builtin: free all elements in a []string with -autofree too 2021-03-18 21:10:42 +02:00
Delyan Angelov
d4e16b6ddd
builtin: reduce memory allocations for s.trim, s.trim_left and s.trim_right 2021-03-18 19:52:33 +02:00
Delyan Angelov
09802707b1
tests: move rlock and shared array tests from builtin to sync 2021-03-18 19:51:11 +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
99cc02685b
cgen: implement IError.free() and use it for the builtin none const 2021-03-17 12:38:24 +02:00
crthpl
fafb035fb5
all: reimplement inline assembly (#8645) 2021-03-17 01:43:17 +01:00
yuyi
dd9f9c2718
checker: check array.sort(a < b) (#9321) 2021-03-17 01:42:51 +01:00
ka-weihe
2991cad4e8
map: fix delete in for-in (#9336) 2021-03-17 01:42:33 +01:00
shadowninja55
b4f7a975e8
builtin.string: optimize string.count where substr.len == 1 (#9337) 2021-03-17 00:19:48 +02:00
Delyan Angelov
1753445a64
builtin: make panics more IDE friendly 2021-03-16 20:50:11 +02:00
shadowninja55
d92f9e77b0
builtin.string: optimize string.split_nth() for len == 1 delim (#9325) 2021-03-16 20:30:27 +02:00
JalonSolov
6f550ebbdc
string: fix fields method when no whitespace (#9326) 2021-03-16 19:45:27 +02:00
Alexander Medvednikov
93df560cf9 builtin: deprecate string.split_by_whitespace in favor of fields() 2021-03-16 08:29:14 +03:00
Alexander Medvednikov
667a26335f builtin: fix substr() 2021-03-15 21:16:23 +01:00
Alexander Medvednikov
77d5fcca59 urllib: a temporary autofree fix 2021-03-15 21:12:11 +01:00
Delyan Angelov
7f0c8d1eec
builtin: fix a compilation warning with -d debug_malloc 2021-03-15 17:37:06 +02:00
Nick Treleaven
446631ceb5
checker: fixed array cannot implicitly convert to fooptr (again) (#9302) 2021-03-15 15:55:07 +02:00
Delyan Angelov
2f4a49994a
builtin: implement support for -d debug_malloc too 2021-03-14 18:29:00 +02:00
Delyan Angelov
d65ad68e77
builtin: add 0 terminators for strings returned by .to_lower, .to_upper, utf32_to_str_no_malloc/2 2021-03-14 18:21:45 +02:00
Delyan Angelov
b6d089b605
v.depgraph: ensure v -d debug_realloc -o v cmd/v works 2021-03-14 16:15:33 +02:00
Delyan Angelov
125be84e3d
builtin: fix -d debug_realloc, add realloc_data/3 2021-03-14 14:54:35 +02:00
Delyan Angelov
ddbe57e00a
v test-cleancode: ensure more .v files are kept vmft-ed 2021-03-14 12:17:31 +02:00
spaceface
eebc8a9d7a
builtin: cleanup option names (part 2) (#9294) 2021-03-14 12:11:52 +02:00
Delyan Angelov
69f1e7c9c3
v: fixes for v -autofree -o v2 cmd/v 2021-03-14 09:37:38 +02:00
Leah Lundqvist
64d0006ff9
jsgen: fix string and array for loops and improve casting (#9295) 2021-03-14 08:20:01 +02:00
spaceface
9ed9e7aff0
builtin: cleanup option names (part 1) (#9293) 2021-03-14 01:54:46 +01:00
spaceface
e9797c618a
all: implement error interfaces (#9291) 2021-03-13 18:13:50 +01:00
Delyan Angelov
0c33656a19
ci: fix failing option_print_errors_test.v 2021-03-12 20:36:19 +02:00
spaceface
be409b52e9
builtin: prepare for error interfaces (#9043) 2021-03-12 20:05:05 +02:00
Delyan Angelov
d7049ae2da
os: deprecate os.exec (returning ?os.Result), in favour of os.execute, which returns os.Result (#8974) 2021-03-08 20:52:13 +02:00
Miccah
a1e0f2bc46
gen: add argument names to compile-time method struct (#9174) 2021-03-07 14:28:43 +01:00
Larpon
07a1a9b84d
builtin: use fprintf to print to stderr on Android (#9130) 2021-03-05 19:12:42 +02:00
joe-conigliaro
2d73411396
checker: define missing C fn args & check C & JS args (#8770) 2021-03-05 17:41:11 +03:00
Lukas Neubert
80356edd8c
fmt: combine simple attributes into a single line (#9120) 2021-03-05 07:17:57 +02:00
Leah Lundqvist
65e888230a
jsgen: object equality checks, optimise casting and start builtin implementation (#9068) 2021-03-04 14:02:16 +01:00
yuyi
2b9ffbda42
cgen: fix array_sort by different order of a/b (#9106) 2021-03-04 11:19:02 +01:00
Delyan Angelov
488848e904
builtin: simplify copy/2 2021-03-02 18:14:42 +02:00
spaceface
b712af56fd
all: bring back panic(err.msg) -> panic(err) (#9022) 2021-03-01 00:18:14 +01:00