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

1509 Commits

Author SHA1 Message Date
Delyan Angelov
9edb48571f
pref,cgen: support -no-bounds-checking, instead of -d no_bounds_checking, and make it enable direct_array_access for all fns/methods. 2022-10-30 14:39:45 +02:00
Alexander Medvednikov
cc58d6a919 all: string interpolation fixes 2022-10-27 17:52:30 +03:00
Alexander Medvednikov
e1ffc76efd tests: fix some interpolation tests 2022-10-27 11:12:15 +03:00
Alexander Medvednikov
18c7da9a5e all: new string interpolation "hello {name}!" 2022-10-27 11:01:01 +03:00
yuyi
7b8044b8c4
cgen: fix using 'array' name variable in array_init (#16168) 2022-10-23 22:23:15 +03:00
l-m
a139bed785
builtin: add string.trim_indexes method, that can be used in string.trim, but also separately from it (#16144) 2022-10-22 12:56:05 +03:00
locriacyber
a3b050aced
vrepl: add support for Home and End keys (#16116) 2022-10-20 20:07:57 +03:00
yuyi
612faac0f0
all: change index expr returning optional to result too (#16097) 2022-10-19 21:04:16 +03:00
Delyan Angelov
71bff213ef
builtin: make the C. WIN32 API declarations more precise, to catch errors earlier (#16090) 2022-10-17 20:23:33 +03:00
yuyi
126c4c5751
builtin,math: fix math.min_i64.str() (fix #16086) (#16089) 2022-10-17 19:36:46 +03:00
Subhomoy Haldar
43b9a716c5
builtin,strconv: append ".0", to float string representations, to ensure clarity (#16079) 2022-10-17 15:41:07 +03:00
yuyi
f6844e9766
all: change optional to result of io (#16075) 2022-10-16 09:28:57 +03:00
yuyi
fb3d093e01
builtin: remove opt_ok2() (part 2) (#16054) 2022-10-13 10:35:41 +03:00
Rasheed
12d3664a09
builtin: add a declaration for C.putchar (#16037) 2022-10-11 20:53:12 +03:00
ChAoS_UnItY
95f57e9206
builtin: deprecate array.reduce in favour of arrays.fold (#16001) 2022-10-09 10:29:50 +03:00
Swastik Baranwal
b584e1df98
checker: allow EnumName(number) casts only inside unsafe{} blocks (#15932) 2022-10-02 22:39:11 +03:00
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