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

13664 Commits

Author SHA1 Message Date
Subhomoy Haldar
fcde63127f
rand: fix incorrect generic function call (#15327) 2022-08-02 20:11:49 +03:00
Sandro Martini
51ef8b62ba
log: cleanup tests (#15320) 2022-08-02 18:01:49 +03:00
Spydr
867f500d78
gitignore: ignore valgind vgcore.* debug files (#15321) 2022-08-02 17:59:29 +03:00
Delyan Angelov
45c601b79c
cgen: fix sorting of shared array fields (fix #15244) 2022-08-02 16:17:11 +03:00
Delyan Angelov
857e047d01
json: tag functions that cgen may call internally for json.encode/json.decode, as [markused] 2022-08-02 11:45:41 +03:00
Nacho Verdón
42efc383d2
encoding.binary: fix function names in comments (#15317) 2022-08-02 00:30:06 +03:00
Nacho Verdón
0555894e7f
.github: Add example on PR template title to avoid confusion (#15311) 2022-08-01 23:29:04 +03:00
yuyi
ce59fffb53
scanner: make scan_all_tokens_in_buffer() private (#15312) 2022-08-01 23:15:56 +03:00
yuyi
7546d1450c
scanner: minor optimization (#15313) 2022-08-01 23:09:27 +03:00
Spydr
dab8159b56
native: implement elf section types (#15316) 2022-08-01 23:04:59 +03:00
Delyan Angelov
a35356758c
log: make set_level(level Level) part of the log.Logger interface too (fix for discordv) 2022-08-01 15:09:32 +03:00
StunxFS
b08690d151
gen.c: simplify unwrap_generic method (#15288)
* gen.c: use `nil` instead of `0`
* replace `muttable` => `mut_table`
2022-08-01 11:40:37 +03:00
Spydr
b4fd9b5f92
native: add sections for string- and symbol-tables, reimplement elf program headers (#15305) 2022-08-01 10:15:06 +03:00
Nacho Verdón
9561fb406e
encoding.binary: add functions to read/write with an offset and at the end of the array, split files by endianness (#15301) 2022-08-01 08:20:14 +03:00
Dialga
dc78f1ba17
szip: update to 0.2.4 (#15296) 2022-08-01 00:47:45 +03:00
Delyan Angelov
fa75713bc3
tools: create the vmodules folder, when it does not exist, on v translate hw.c 2022-07-31 15:43:04 +03:00
Delyan Angelov
b8438ded32
markused: support vweb App.before_request() with -skip-unused 2022-07-30 18:56:05 +03:00
yuyi
014f44eab3
checker: improve error message of method_call_arg_no_mut_err.vv (#15281) 2022-07-30 18:11:10 +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
db79888daf
picoev: restore struct Picoev definition (#15278) 2022-07-30 14:30:13 +03:00
yuyi
6e8350a9c9
fmt: fix interface method with fntype argument (#15280) 2022-07-30 14:29:41 +03:00
yuyi
e6a04905e9
fmt: fix comptime method call (#15279) 2022-07-30 14:28:34 +03:00
yuyi
b6ce7cc198
checker: check invalid variable (fix #15240) (#15260) 2022-07-30 14:27:28 +03:00
Delyan Angelov
0133ff2cbf
checker: use reserved_type_names_chk.matches(word) instead of word in reserved_type_names 2022-07-29 23:23:34 +03:00
Delyan Angelov
f0a8d57735
checker: use array_builtin_methods_chk.matches(method_name) instead of method_name in array_builtin_methods 2022-07-29 23:23:34 +03:00
Delyan Angelov
336305daa5
scanner,parser,gen: use km.matches(word) instead of km.find(word) != -1 2022-07-29 23:23:33 +03:00
Delyan Angelov
2db8bd62a2
token: fix a new_keywords_matcher_from_array_trie bug (first word with idx 0 was ignored); add tests 2022-07-29 23:23:33 +03:00
Delyan Angelov
a42eb3b947
cgen: use a trie matcher for c_reserved checks as well 2022-07-29 23:23:32 +03:00
zakuro
8268df7e1d
parser: create and use Parser.unexpected to unify all unexpected token error messages (#15259) 2022-07-29 19:28:34 +03:00
yuyi
1be595605a
parser: fix optional fn argument (#15271) 2022-07-29 19:10:50 +03:00
yuyi
0bf23488dc
checker: check struct field's fn call (fix #15249) (#15257) 2022-07-29 19:00:51 +03:00
lemon
927ec1fadb
native: support ||, && and simple boolean expression evaluation (#15256) 2022-07-29 07:17:01 +03:00
Delyan Angelov
04b28d11be
cgen: use switch for matches with integer literals, instead of an if else if ladder (#15254) 2022-07-29 00:36:29 +03:00
yuyi
17ce1a0e8d
parser: check undefined ident in if guard expr (#15253) 2022-07-28 19:13:41 +03:00
Delyan Angelov
242ade8938
os: fix File.eof on FreeBSD (feof is a C macro there) 2022-07-28 17:26:55 +03:00
Reuben Thomas
ed56c3957e
os: add File.reopen and File.eof methods (#15184) 2022-07-28 16:21:23 +03:00
Tim Dupont
3d0a48b1bb
CHANGELOG.md: fix for a small typo (paramter -> parameter) (#15252) 2022-07-28 14:16:33 +03:00
Dialga
18ae726015
v.pkgconfig: add the default path for Debian 32bit (#15250) 2022-07-28 14:06:56 +03:00
Delyan Angelov
a16f9ac41f
mysql: include workaround for windows programs that just exit, when the libmysql.dll is not found, into vlib/mysql/README.md 2022-07-27 22:26:36 +03:00
l-m
10f3c9f127
builtin: add string.replace_char and string.normalize_tabs (#15239) 2022-07-27 22:04:39 +03:00
yuyi
60094d95e2
cgen: check comptime call method (no value) used as value (#15241) 2022-07-27 21:32:00 +03:00
Davide Beatrici
8af87a9e98
make: rename "V" to "VEXE" in GNUmakefile, to prevent conflicts while building RPMs (#15237)
This fixes a build failure when using "%make_build" in an RPM spec file:

make: 1: No such file or directory
make: *** [GNUmakefile💯 all] Error 127
2022-07-27 21:04:29 +03:00
yuyi
6a7eb82d9e
cgen: fix comptime for method call with arguments (#15236) 2022-07-27 03:22:05 +03:00
stringnick
afaab7ab4d
stdatomic: add/sub return result of op (#15235) 2022-07-27 03:21:03 +03:00
Hitalo de Jesus do Rosário Souza
e5e750d533
orm: default attribute (#15221) 2022-07-27 00:59:32 +03:00
yuyi
c976a691ad
scanner: correct error message of empty character literal (fix #15226) (#15228) 2022-07-26 15:07:08 +03:00
Bastian Buck
4ab72ccb69
os: add a security advisory for potential TOCTOU risks when using os.is_writable, os.is_executable etc (#15222) 2022-07-26 12:02:48 +03:00
yuyi
03b7c76b38
cgen: optimize auto_str_methods of [str:skip] fields (#15227) 2022-07-26 09:38:50 +03:00
yuyi
0b0c496eff
cgen: fix printing struct with skip fields (#15224) 2022-07-26 04:37:16 +03:00
Alexander Medvednikov
f1ebfb2d42 cgen: str:skip field 2022-07-25 17:25:47 +03:00