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

1493 Commits

Author SHA1 Message Date
Dominik Pytlewski
721328ef58
os: fix os.read_file and os.read_bytes for 0 sized /proc/ files on Linux (fix #15852) (#15853) 2022-09-25 22:54:46 +03:00
spaceface
201598e68a
builtin: fix gc.o compilation on macos (#15832) 2022-09-21 12:19:02 +03:00
Delyan Angelov
7e69619add
builtin, compiler: replace isnil(x) calls with x == unsafe { nil } (a little faster without -prod) (#15759) 2022-09-15 14:59:37 +03:00
shove
8b962f8446
checker: fix nested struct reference type field initialized check. (fix: #15741) (#15752) 2022-09-15 07:59:31 +03:00
Delyan Angelov
fc8e3d0971
builtin,strconv: speedup str.int() conversions (without -prod) 2022-09-08 11:28:19 +03:00
yuyi
a5aad6f791
cgen: fix alias of map delete (#15644) 2022-09-03 10:41:53 +03:00
ChAoS_UnItY
0b843b801f
checker: fix returning expression with void type (fix #15543) (#15554) 2022-08-27 09:00:14 +03:00
Larpon
9dd8228f91
arrays: move carray_to_varray from builtin, make it generic (#15503) 2022-08-23 11:12:50 +03:00
Larpon
dda475bcc8
builtin: add carray_to_varray, closes #15493 (#15499) 2022-08-22 20:15:54 +03:00
Delyan Angelov
18e737aee2 builtin,tests: fix int_test.v on macos, m1 2022-08-17 17:18:10 +03:00
Delyan Angelov
18cccb6caf
builtin: show non zero codes on bubbled error_with_code(msg,code) errors 2022-08-16 18:59:38 +03:00
Emily Hudson
90d9b200f9
gc: fix msvc not using libatomic_ops (#15418) 2022-08-14 13:16:52 +03:00
Delyan Angelov
4c0339242a
doc: fix example comment for string.strip_margin() 2022-08-14 08:06:52 +03:00
Delyan Angelov
77495c8d03
all: support assert condition, extra_message, evaluating and showing extra_message on assert failure (#15322) 2022-08-03 01:14:01 +03:00
Davide Beatrici
c9a5896468
bultin: always enable GC_THREADS, even with -d dynamic_boehm, otherwise multithread operation is unsafe (#15275)
According to upstream documentation, only GC_WIN32_THREADS is explicit.

This PR fixes a random memory corruption(s) with "-d dynamic_boehm" on OpenMandriva.
1679adc04d.log
```
DEBUG: + VFLAGS='-prod -d dynamic_boehm'
DEBUG: + /usr/bin/clang -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -std=gnu99 -w -o tmp_1 v.c -lm -lpthread -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -Wl,-O2 -Wl,--no-undefined -flto
DEBUG: + ./tmp_1 -no-parallel -o tmp_2 -prod -d dynamic_boehm cmd/v
DEBUG: + ./tmp_2 -o v -prod -d dynamic_boehm cmd/v
DEBUG: /var/tmp/rpm-tmp.mcjmqc: line 52:   644 Bus error               (core dumped) ./v build-tools
```
2022-07-30 14:59:12 +03:00
yuyi
6e8350a9c9
fmt: fix interface method with fntype argument (#15280) 2022-07-30 14:29:41 +03:00
l-m
10f3c9f127
builtin: add string.replace_char and string.normalize_tabs (#15239) 2022-07-27 22:04:39 +03:00
Alexander Medvednikov
d6de53362f checker: improve unused label check 2022-07-23 01:36:27 +03:00
Alexander Medvednikov
9099594a49 all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
Alexander Medvednikov
dc79f1392b all: voidptr(0) => unsafe { nil } (p.2) 2022-07-21 20:51:54 +03:00
Alexander Medvednikov
caa0c2f153 vfmt: voidptr(0) => unsafe { nil } (p.1) 2022-07-21 20:46:01 +03:00
Delyan Angelov
a4e0e0fa57
builtin: add drafts for __new_array_noscan, __new_array_with_default_noscan, __new_array_with_array_default_noscan for array_notd_gcboehm_opt.v 2022-07-12 10:00:58 +03:00
Larpon
9f3b6e3e3a
android: provide more predictable logging, add comptime termux support (#14984) 2022-07-07 18:28:29 +03:00
l-m
ed8c63cc0b
builtin: add a contains_only method on string (#14830) 2022-06-23 01:41:42 +03:00
Delyan Angelov
473d26ce47 builtin: enforce linking to libgc.a with -prod on macos 2022-06-20 21:29:27 +03:00
yuyi
01fdd5d07f
cgen: add a minor optimisation for array.push_many (#14770) 2022-06-17 09:44:13 +03:00
spaceface
26d051475a
cgen: ensure closures are kept alive when using the GC (#14736) 2022-06-10 19:48:50 +03:00
spaceface
4ed9780b80
all: enable -gc boehm by default (#14577) 2022-06-09 00:44:29 +03:00
Delyan Angelov
82d23dedf1
builtin: add flush_stdout and flush_stderr to builtin.js.v, for feature parity with builtin.c.v 2022-06-07 12:15:35 +03:00
ChAoS_UnItY
df80b33dc0
cgen: fix array init with it (fix #14679) (#14680) 2022-06-05 19:41:54 +03:00
Ikko Ashimine
7b25957a26
builtin: fix typo in array.v (#14688) 2022-06-05 18:49:40 +03:00
playX
db34adaec8
builtin.js: fix string.int method (#14564) 2022-05-31 11:52:11 +03:00
Delyan Angelov
0f3b2c2ae7
builtin: use C.fwrite (buffered) for _write_buf_to_fd (#14558) 2022-05-30 19:15:05 +03:00
Delyan Angelov
58ebc0680e
builtin: fix sporadic linking failures on v -cc gcc -gc boehm examples/hello_world.v 2022-05-30 15:17:01 +03:00
spaceface
ba859c584b
builtin: add static GC support on Windows with TCC (#14497) 2022-05-22 21:25:46 +03:00
Daniel Däschle
d3ffd983c8
markused: add _result_ok (#14495) 2022-05-22 14:52:38 +03:00
Vincenzo Palazzo
17bba712bd
checker: ban unsafe pointer/fn comparison (#14462) 2022-05-20 18:30:16 +03:00
yuyi
913164bc73
builtin: minor cleanup in string_interpolation.v (#14471) 2022-05-20 14:19:27 +03:00
Delyan Angelov
4e56147223 ci: vfmt builtin_d_use_libbacktrace.c.v 2022-05-17 19:41:57 +03:00
Ned
db4b49a5ca
builtin: print libbacktrace output to stderr, on panics/segfault crash (#14434) 2022-05-17 14:56:34 +03:00
WoodyAtHome
02c8a6057c
builtin.string: new fn (s string) is_ascii() bool (#14418) 2022-05-17 08:01:03 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
CC
901b8f0c24
builtin: add a map.clear() method (#14373) 2022-05-12 09:43:01 +03:00
David 'Epper' Marshall
a91226c376
docs: cleanup (#14327) 2022-05-07 20:18:42 +03:00
Delyan Angelov
56cf0b0a2e
builtin: inline manually isnil calls in array.push_many (very frequently called) 2022-05-07 12:55:40 +03:00
Alexander Medvednikov
14f06ead1b cgen: fix c2v consts; enum_decl() 2022-05-07 00:58:37 +03:00
Hunam
0699f324b5
builtin: add map.values() (#14301) 2022-05-06 20:42:01 +03:00
Daniel Däschle
76cdf75299
builtin,cgen: rename Option to _option (#14317) 2022-05-06 19:25:54 +03:00
Andréas Livet
9fde5b067b
docs: add missing function names in the builtin example doc comments (#14318) 2022-05-05 17:22:25 +03:00
Ned
76a7354506
builtin: add libbacktrace as option for generating stack traces (#14277) 2022-05-04 21:17:05 +03:00