yuyi
7fe3ef9a6e
fmt: fix fmt error of anon fn with if expr ( fix #14393 ) ( #14413 )
2022-05-16 09:48:21 +03:00
Larpon
5068b8b293
ftp: document all public methods ( #14408 )
2022-05-16 08:52:12 +03:00
Jah-On
02e026e298
clipboard: add [heap]
tag to the Clipboard structs ( #14412 )
2022-05-16 08:45:40 +03:00
WoodyAtHome
eeff02a8ee
net.openssl: read doesn't block infinitely ( #14406 )
2022-05-16 08:44:34 +03:00
spaceface
c01a8a1737
checker,gen: allow using methods as function pointers ( #14407 )
2022-05-15 18:28:37 +03:00
Delyan Angelov
c2bc9f4960
sync: only run channel_select_test.v when VTEST_RUN_FLAKY=1
2022-05-15 12:43:04 +03:00
crthpl
e4065bd57b
checker,cgen: fix if expressions in lock expression ( #14384 )
2022-05-15 12:31:07 +03:00
David 'Epper' Marshall
c28051020a
time: fix calculate_date_from_offset ( #14399 )
2022-05-15 10:55:24 +03:00
Delyan Angelov
c70e18ea8f
ci: add a skip list in compiler_test.v (for tmpl_parse_html.vv)
2022-05-15 10:23:13 +03:00
David 'Epper' Marshall
8d141878ce
math: cbrt fix ( #14395 )
2022-05-14 21:06:38 +03:00
yuyi
fe9f97074b
cgen: fix appending struct to interface array ( #14388 )
2022-05-14 17:49:42 +03:00
Alexander Medvednikov
3adad32355
tmpl: fix a test
2022-05-14 17:48:50 +03:00
Alexander Medvednikov
b42c824cdb
vweb: simplify @foo by removing V_TEMPLATE rule
2022-05-14 17:46:30 +03:00
j. redhead
441637eeb4
checker: fix optionals in infix expression check ( fix #14354 ) ( #14390 )
2022-05-14 00:54:49 +03:00
Delyan Angelov
714ce4e7fc
ci: fix .out regression after d407a64
2022-05-13 11:18:17 +03:00
playX
6ec4185017
checker: allow to pass alias to array as a pointer (c2v) ( #14389 )
2022-05-13 10:17:28 +03:00
Daniel Däschle
d407a6449d
parser: fix dollar ( closes #14292 ) ( #14378 )
2022-05-13 08:30:10 +03:00
Delyan Angelov
ed12a5c84c
math.big: reduce memory usage of Integer.str() (free intermediary Integers), optimise some operations using [direct_array_access]
( #14353 )
2022-05-13 08:21:34 +03:00
yuyi
3c95504a35
checker, cgen: fix generic fn with array and fixed array arguments ( #14385 )
2022-05-13 06:57:48 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! ( #14366 )
2022-05-13 06:56:21 +03:00
Delyan Angelov
8ef9dc6247
ci: run v fmt -w vlib/v/checker/fn.v
(fix CI regression after 4952967
)
2022-05-12 21:24:12 +03:00
Delyan Angelov
668d1b04d2
parser: make script mode errors more informative, when a top level declaration is encountered, after script mode had already started
2022-05-12 21:14:00 +03:00
Hunam
20139ad756
checker: fix typo ( #14368 )
2022-05-12 12:23:32 +03:00
playX
4952967366
checker: alias C2V fix ( #14377 )
2022-05-12 12:19:31 +03:00
yuyi
f48f7014f0
checker: check error for generic sumtype types ( #14374 )
2022-05-12 11:57:57 +03:00
penguindark
e93a8766e5
regex: fix #14370 , last IST not managed in advance tests ( #14372 )
2022-05-12 11:49:57 +03:00
Delyan Angelov
b7ca4c1668
checker: fix a compiler panic on fntest()?(&int,&int){return test()?}
2022-05-12 11:36:32 +03:00
yuyi
8830af5c89
rand: minor cleanup in choose() ( #14376 )
2022-05-12 11:20:38 +03:00
yuyi
5bc4fea9e0
checker: check error for cast function to string ( #14375 )
2022-05-12 10:04:38 +03:00
CC
901b8f0c24
builtin: add a map.clear() method ( #14373 )
2022-05-12 09:43:01 +03:00
spaceface
49382f1f43
gen: make the closure implementation more performant ( #14352 )
2022-05-12 00:05:14 +03:00
Emily Hudson
c19b037880
net: select with deadlines ( #14369 )
2022-05-12 00:03:48 +03:00
yuyi
cd4fa041ff
checker: check generic sumtype declare error ( #14367 )
2022-05-11 17:39:58 +03:00
Larpon
34a252ef84
os: add raw_execute
on Windows ( #14363 )
2022-05-11 16:56:03 +03:00
David 'Epper' Marshall
26b81d68b5
time: update doc comments ( #14359 )
2022-05-11 16:55:19 +03:00
Larpon
0ec1c8d9f0
szip: expose zip_folder ( #14356 )
2022-05-11 16:48:41 +03:00
yuyi
3afc7c4c6d
parser: check error for generic struct parameter ( #14362 )
2022-05-11 13:24:54 +03:00
Delyan Angelov
cf536b848b
Revert "strings: reduce time spent in Builder.writeln (very frequently called)"
...
This reverts commit b53b1cc7cb
.
2022-05-11 09:19:37 +03:00
yuyi
8f765ed5f1
checker: minor cleanup and speedups in fn_call() ( #14343 )
2022-05-10 16:41:47 +03:00
yuyi
5697d4375b
cgen: fix error for printing aliases of multi fixed array ( #14348 )
2022-05-10 14:03:18 +03:00
yuyi
606d8cfaca
checker: check error for returning aliases of fixed array ( #14349 )
2022-05-10 14:01:55 +03:00
Isaiah
9e09b709e3
net.http: fix crash on Windows when using Boehm GC ( #14351 )
2022-05-10 14:00:55 +03:00
yuyi
940c78bdfd
checker: minor cleanup in method_call() ( #14342 )
2022-05-09 18:01:44 +03:00
Subhomoy Haldar
79f8a3c796
rand: update README.md ( #14341 )
...
* update README for rand module
* use concrete values
* make sure code works
2022-05-09 17:59:20 +03:00
StunxFS
d24dce8eb3
parser,checker: support $compile_error('message')
and $compile_warn('message')
( #14320 )
2022-05-09 08:18:26 +03:00
Dialga
4400f9891e
szip: fix extracting dot folders ( #13387 )
2022-05-09 07:45:36 +03:00
yuyi
8519996201
checker: fix error for match sumtype that referenced before ( #14338 )
2022-05-09 07:32:51 +03:00
Merlin Diavova
106487d62f
pg: resolve PG string datetime values to V time.Time ones ( #14336 )
...
Co-authored-by: Merlin Diavova <md@merlindiaova.org>
2022-05-08 15:37:46 +03:00
David 'Epper' Marshall
650fb493bd
regex: add split ( #14329 )
2022-05-08 15:21:39 +03:00
Delyan Angelov
084f2867b6
time: let time.parse_rfc3339('2015-01-06T15:47:32.080254511Z') succeed (dockerd timestamps, Go's RFC3339Nano).
2022-05-08 14:54:57 +03:00
WoodyAtHome
a0a3499bdc
net.smtp: correct date in smtp body ( #14326 )
2022-05-08 09:15:45 +03:00
Merlin Diavova
f8747d05dc
pg: add type 18 for pg boolean data type ( #14335 )
2022-05-08 07:17:43 +03:00
StunxFS
d5e70552eb
checker: check error for json.decode
( fix #6732 ) ( #14305 )
2022-05-08 07:17:11 +03:00
David 'Epper' Marshall
aef95721a4
strings: builder: add clear ( #14328 )
2022-05-08 07:15:42 +03:00
yuyi
b04d46770b
ast, checker, cgen: fix error for generic method with generic fn type argument ( fix #14239 ) ( #14333 )
2022-05-07 20:22:20 +03:00
yuyi
724e7f037a
cgen: fix error for if cond with optional expr ( #14334 )
2022-05-07 20:20:00 +03:00
David 'Epper' Marshall
a91226c376
docs: cleanup ( #14327 )
2022-05-07 20:18:42 +03:00
Delyan Angelov
b53b1cc7cb
strings: reduce time spent in Builder.writeln (very frequently called)
2022-05-07 12:55:41 +03:00
Delyan Angelov
7ecd65221e
v.util: support -d trace_cached_read_source_file
2022-05-07 12:55:41 +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
Delyan Angelov
7f974a275a
docs: fix teh
typo
2022-05-07 12:55:40 +03:00
Alexander Medvednikov
ca42ace367
Revert "checker: remove more unnecessary void
errors"
...
This reverts commit 89c1e7f980
.
2022-05-07 11:03:12 +03:00
Alexander Medvednikov
35cfa0da7c
doc: closures work on arm64 too
2022-05-07 11:02:53 +03:00
playX
6a6c005dc0
checker: c2v fixes ( #14332 )
2022-05-07 09:50:41 +03:00
Alexander Medvednikov
89c1e7f980
checker: remove more unnecessary void
errors
2022-05-07 09:09:18 +03:00
yuyi
70184ad1f8
scanner: minor simplification in scanner.v ( #14331 )
2022-05-07 08:30:15 +03:00
Alexander Medvednikov
14f06ead1b
cgen: fix c2v consts; enum_decl()
2022-05-07 00:58:37 +03:00
yuyi
621574c12a
checker: fix error for generic method on nested struct ( #14322 )
2022-05-07 00:51:04 +03:00
Hunam
0699f324b5
builtin: add map.values()
( #14301 )
2022-05-06 20:42:01 +03:00
Lathanao
ce99a306c0
net.http: make parse_form return POST requests with json data as a map with a json
key, containing the json payload ( #14289 )
2022-05-06 20:23:36 +03:00
Ekopalypse
2027a1969b
v.builder: harmonise the default settings of the different Windows compilers ( #14314 )
2022-05-06 19:28:13 +03:00
Daniel Däschle
76cdf75299
builtin,cgen: rename Option
to _option
( #14317 )
2022-05-06 19:25:54 +03:00
yuyi
45fe87c9e3
checker: minor cleanup in fn_call() ( #14307 )
2022-05-05 21:15:54 +03:00
yuyi
3091f31019
checker: check for optional argument in dump() ( #14316 )
2022-05-05 21:15:22 +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
Daniel Däschle
89fe82b732
checker: fix returning error on reference results ( #14313 )
2022-05-05 17:02:49 +03:00
yuyi
b6058bfd6e
parser, checker: fix generic method on nested struct ( fix #14089 ) ( #14310 )
2022-05-05 11:24:20 +03:00
playX
8afdb1c3ef
checker: c2v: allow passing fixed array as pointer to functions; bool <-> int ( #14309 )
2022-05-05 11:23:57 +03:00
StunxFS
7499506cf8
.gitignore: minor cleanup ( #14279 )
2022-05-05 10:17:24 +03:00
Delyan Angelov
7170a09382
vfmt: fix stackoverflow on long nested infix expressions
2022-05-05 07:41:43 +03:00
Ned
76a7354506
builtin: add libbacktrace as option for generating stack traces ( #14277 )
2022-05-04 21:17:05 +03:00
yuyi
4242e7610f
checker: add comptime_selector() ( #14286 )
2022-05-04 19:25:58 +03:00
yuyi
e2aa5c9b3f
parser: make peek_token_after_var_list() private ( #14288 )
2022-05-04 19:25:45 +03:00
Ikko Ashimine
223b96a59a
builtin: fix typo in array_bare.v ( #14299 )
2022-05-04 19:25:17 +03:00
Delyan Angelov
1a4d9017e2
builtin: improve support for large arrays ([]int{len: 1_000_000_000}
now works), fix an arr.repeat() bug ( #14294 )
2022-05-04 18:42:06 +03:00
yuyi
ac90a2b53d
checker: check error for fn call argument mismatch ( fix #14280 ) ( #14283 )
2022-05-04 12:13:22 +03:00
playX
3bd6455178
checker: allow rune->any int and vice versa when translated ( #14285 )
2022-05-04 12:08:34 +03:00
Alexander Medvednikov
3d4b8dffdf
checker: temporary c2v const fix
2022-05-04 08:28:27 +03:00
yuyi
f321422964
checker, cgen: check comptime selector that has no field name ( #14282 )
2022-05-04 07:06:52 +03:00
Alexander Medvednikov
1e9156fd71
checker: c2v rune comparison fix
2022-05-04 06:49:45 +03:00
yuyi
3732db2bcc
cgen: cleanup in gen_array_contains_methods() ( #14274 )
2022-05-03 20:46:07 +03:00
playX
146051b231
checker: allow fixed array to pointer and vice versa when translated ( #14275 )
2022-05-03 20:44:45 +03:00
Delyan Angelov
04a77c731e
tests: add // vtest flaky: true
to atomic_test.v
2022-05-03 20:42:12 +03:00
yuyi
63eacede95
checker: check argument mismatch of array.filter/all/any() ( #14273 )
2022-05-03 16:56:18 +03:00
yuyi
276bd8060c
cgen: fix error for fixed array in operate ( #14269 )
2022-05-03 12:45:04 +03:00
Delyan Angelov
0e5c1cee48
builtin: improve musl/Alpine support (define weak backtrace/backtrace_symbols/backtrace_symbols_fd symbols) ( #14250 )
2022-05-03 09:17:53 +03:00
Delyan Angelov
4da2908d63
vdoc: fix panic on empty //
comment on v doc -f html file.v
; turn expected code block after empty example
to a warning
2022-05-03 00:02:12 +03:00
Delyan Angelov
ab1c265679
builtin: add missing panic_result_not_set/1 callback function.
2022-05-02 22:40:26 +03:00
spaceface
db185598d2
checker: refactor comptime_if_branch ( #14259 )
2022-05-02 22:24:20 +03:00
yuyi
990afe37e1
checker: fix a bug in generics array init ( #14258 )
2022-05-02 16:18:33 +03:00
yuyi
d72a25098a
parser: minor cleanup in interface_decl() ( #14257 )
2022-05-02 16:17:46 +03:00
yuyi
25c1b174ca
checker: fix generic fn infering fn type argument ( fix #14243 ) ( #14256 )
2022-05-02 16:17:27 +03:00
yuyi
b9cf2db6a8
parser: fix inline array's element access ( #14253 )
2022-05-02 16:16:32 +03:00
playX
afbe6bf3a2
cgen: fix const decl gen when translated ( #14255 )
2022-05-02 15:01:59 +03:00
Isaiah
a4fd349cf1
builder: allow -compress
to work on windows too, when upx
is installed ( #14252 )
...
Allow `-compress` flag on Windows if upx is installed. If upx not installed, same behavior as on linux/mac
2022-05-02 14:28:31 +03:00
yuyi
968d2b4654
cgen: fix fixed array init with it
( #14251 )
2022-05-02 02:00:45 +03:00
spaceface
332e821518
checker, gen: add support for a [minify] struct attribute ( #14247 )
2022-05-02 01:59:17 +03:00
David 'Epper' Marshall
91c1157810
time: relative update ( #14240 )
2022-05-01 10:47:05 +03:00
Daniel Däschle
ec92d467d1
cgen: fix unsafe return error ( #14233 )
2022-04-30 17:31:28 +03:00
playX
0b54196962
checker: allow pointer index for translated code ( #14231 )
2022-04-30 17:30:55 +03:00
Daniel Däschle
9f8a34a528
all: rename result to _result ( #14232 )
2022-04-30 17:10:30 +03:00
Delyan Angelov
5277ce7dce
tests: support for marking _test.v files with // vtest flaky: true
, to reduce false positives from the CI
2022-04-30 13:30:02 +03:00
David 'Epper' Marshall
a2338dbb7c
docs: document more builtin
functions/methods ( #14229 )
2022-04-30 12:31:23 +03:00
spaceface
dab649ec8a
cgen: rewrite the closure implementation ( #14223 )
2022-04-30 09:32:46 +03:00
Alexander Medvednikov
ce31a01a70
checker: allow voidptr arithmetic in translated code
2022-04-30 05:52:37 +03:00
yuyi
cd30b6ea82
parser: make sure interface field names use uppercase letters ( #14228 )
2022-04-30 05:29:33 +03:00
Daniel Däschle
08fd0ce0de
all: basic implementation of result type ( #14140 )
2022-04-30 01:59:14 +03:00
StunxFS
db185e6580
checker: check for reserved type names in for in
( fix #14072 ) ( #14212 )
2022-04-30 01:25:29 +03:00
David 'Epper' Marshall
881d0c04f1
time: add custom formatter ( #14202 )
2022-04-29 15:57:08 +03:00
yuyi
ec865cfb37
parser: check interface methods name ( fix #14217 ) ( #14218 )
2022-04-29 15:48:03 +03:00
yuyi
317acfda97
checker: check struct field name using uppercase letters ( #14220 )
2022-04-29 14:57:14 +03:00
Wertzui123
872f739396
builtin: ignore C++ 0xE06D7363 exception errors on windows ( #14225 )
2022-04-29 14:55:29 +03:00
StunxFS
995485c649
builtin: add string.len_utf8()
method ( #14208 )
2022-04-29 10:23:57 +03:00
StunxFS
8b798acadd
cgen: fix use of C reserved words inside defer
statement ( fix #14101 ) ( #14211 )
2022-04-29 08:04:59 +03:00
Alexander Medvednikov
77645fcf35
builtin: define atoi & ftell
2022-04-29 04:31:51 +03:00
spaceface
14309594fe
ast: add a type_size() method ( #14213 )
2022-04-28 23:35:10 +03:00
StunxFS
e24482a143
transformer: minor optimization for 'string literal'.len
( #14207 )
2022-04-28 22:35:16 +03:00
playX
e56385d57d
checker: disable op overloading on structures for translated code ( #14209 )
2022-04-28 20:46:46 +03:00
yuyi
7aca67fb60
ast, parser: fix complex map init ( #14206 )
2022-04-28 17:37:19 +03:00
yuyi
dd94ab890a
cgen: fix go anon fn call with ref argument ( fix #14192 ) ( #14197 )
2022-04-28 14:43:20 +03:00
yuyi
c802688690
ast: fix error for complex map operating ( #14204 )
2022-04-28 13:20:56 +03:00
Atom
a225b25117
arrays: rephrase doc string ( #14205 )
2022-04-28 13:17:53 +03:00
Delyan Angelov
4538efd8f4
eval: small cleanup in the handling of $if platform {
2022-04-28 13:15:09 +03:00
Delyan Angelov
e0ed8f8278
eval: make the interpreter backtrace more efficient and informative.
2022-04-28 12:31:30 +03:00
Delyan Angelov
f72297c331
eval: add support for C.read/3, C.malloc/1, $if openbsd {
2022-04-28 11:30:36 +03:00
Delyan Angelov
be04ec0620
pref: add support for -thread-stack-size 4194304
(default set to 8MB) ( #14168 )
2022-04-28 08:46:33 +03:00
yuyi
7dd5d9ee61
checker: fix error for array of sumtype appending literal value ( #14200 )
2022-04-28 08:44:30 +03:00
yuyi
09f8b6a380
checker: check error in for_c_stmt with optional call ( #14190 )
2022-04-28 08:43:16 +03:00
tzSharing
eb03fad934
gg: improve some loops in draw_rounded_rect* methods ( #14195 )
2022-04-27 22:57:48 +03:00
Delyan Angelov
f53b9b4f12
ci: fix tcc compilation of atomic_test.v
2022-04-27 22:50:18 +03:00
Alexander Medvednikov
7dbfa86f25
all: atomic int fixes
2022-04-27 18:31:21 +03:00
yuyi
82ac39eca6
math: fix error for math.abs(0.0)/math.abs(0) (related #14165 ) ( #14191 )
2022-04-27 13:23:37 +03:00
yuyi
752e105f25
cgen: fix error for generic sumtype casting to typenode ( #14188 )
2022-04-27 11:32:43 +03:00
tzSharing
85f616877f
gg: fix gg.draw_rounded_rect_empty() graphical abnormalities and some optimizations ( #14186 )
2022-04-27 11:22:57 +03:00
playX
b76095f28a
checker: allow + - * on pointers for translated code ( #14183 )
2022-04-26 21:00:44 +03:00
R cqls
c26b7666c7
gg: some stuff required to have svg and png screenshots working on v ui ( #14180 )
2022-04-26 20:59:36 +03:00
yuyi
be513b4c27
cgen: split up array_init() ( #14178 )
2022-04-26 20:58:47 +03:00
Larpon
1c48a8d760
strconv: add missing doc strings ( #14164 )
2022-04-26 18:09:36 +03:00
yuyi
660201c188
cgen: fix error for cast to empty interface ( fix #14162 ) ( #14176 )
2022-04-26 13:26:48 +03:00
Brian Callahan
b9a0e2d285
sokol: support compilation on OpenBSD ( #14169 )
2022-04-26 13:14:00 +03:00
yuyi
38afd74d26
ast, checker, cgen: fix error for multi-return in or expr ( fix #14167 ) ( #14172 )
2022-04-26 12:17:05 +03:00
playX
95880dfe5c
checker: allow indexing through alias to int ( #14177 )
2022-04-26 12:15:35 +03:00
playX
dce2173ac9
checker: c2v fixes ( #14161 )
2022-04-26 01:34:26 +03:00
Alexander Medvednikov
501b293e84
checker: remove already handled "undefined" errors
2022-04-25 16:53:34 +03:00
Larpon
d799abd139
regex: rephrase doc string ( #14159 )
2022-04-25 16:03:13 +03:00
yuyi
e42dc8e228
checker: fix error for match aliases ( #14157 )
2022-04-25 14:42:43 +03:00
yuyi
f89c81087b
checker: check error for array.index() argument ( #14147 )
2022-04-25 14:42:31 +03:00
yuyi
aeba110d01
cgen: fix error for printing multi fixed array ( #14141 )
2022-04-25 14:42:05 +03:00
Larpon
283d181047
cli: add missing doc strings ( #14158 )
2022-04-25 14:41:46 +03:00
yuyi
88f22b4367
cgen: fix error for anon fn decl inside ternary ( #14150 )
2022-04-25 12:36:03 +03:00
Delyan Angelov
d35d67c2bd
eval: enable v interpret examples/hanoi.v
2022-04-25 12:20:37 +03:00
Nick Treleaven
d8a5df9044
checker: error if smaller signed == unsigned ( #14078 )
2022-04-25 12:09:25 +03:00
Delyan Angelov
147e6e669f
cgen: fix pushing to an array of string pointers ( fix #14156 )
2022-04-25 11:26:24 +03:00
yuyi
922cee9162
parser, checker, cgen: fix error for fn call using anon fn call argument ( #14155 )
2022-04-25 11:26:14 +03:00
Delyan Angelov
1291b621f6
ci: bump test retries for go_anon_fn_variable_call_test.v to 3
2022-04-25 10:32:41 +03:00
fleur
ddbe812f1b
cgen: add callconv support for fns from ptr ( #14151 )
2022-04-25 08:51:03 +03:00
Haren S
11ee2b6409
builder: improve macOS 10.5 and PPC support ( #14152 )
2022-04-25 08:17:00 +03:00
stackotter
563469ed9f
vfmt: fix array_init line wrapping ( #14154 )
2022-04-25 08:11:44 +03:00
yuyi
c819f0f86f
checker, cgen: fix printing in 'for v in a' ( #14146 )
2022-04-24 13:30:13 +03:00
Alexander Medvednikov
9355048b6c
tmpl: minor fixes and optimizations
2022-04-23 16:01:44 +03:00
Delyan Angelov
3388caa6c5
ci: bump vtest retry to 6 for channel_select_test.v (fails sporadically in the windows-gcc job)
2022-04-23 15:36:19 +03:00
yuyi
d934472b17
checker: simplify checking array.contains() argument ( #14133 )
2022-04-22 22:34:13 +03:00
yuyi
b86320a669
parser: minor cleanup in stmt() ( #14136 )
2022-04-22 22:33:13 +03:00
yuyi
5dce091379
checker, cgen: fix generic empty interface to multi struct ( #14132 )
2022-04-22 11:02:51 +03:00
Alexander Medvednikov
9b565bf765
cgen: fix enum switch bug in translated code
2022-04-22 02:31:32 +03:00
tzSharing
03d21a727e
gg: fix gg.draw_rounded_rect_filled() graphical abnormalities ( #14128 )
2022-04-22 00:16:10 +03:00
Larpon
506259adb6
os: add behavior info to is_dir_empty
documentation ( #14110 )
2022-04-21 18:21:00 +03:00
yuyi
26b0e7fd34
fmt: remove extra parentheses ( #14125 )
2022-04-21 18:20:32 +03:00
Delyan Angelov
2080557f50
ast: allow a := match x { 101 { ... for {...} ... y }
2022-04-21 13:31:06 +03:00
yuyi
8a18f9175a
cgen: fix error for if expr with nested match expr ( #14122 )
2022-04-21 13:02:31 +03:00
yuyi
448938be0d
parser: fix generic anon fn decl with type only argument ( #14124 )
2022-04-21 12:53:13 +03:00
yuyi
99eb9fdaab
checker: fix error for fn with array of aliases argument ( #14123 )
2022-04-21 12:52:09 +03:00
yuyi
f13583b04a
checker: check array builtin method's arguments ( #14119 )
2022-04-21 12:51:04 +03:00
yuyi
8013bd43b0
checker: check map builtin method's arguments ( #14120 )
2022-04-21 12:49:46 +03:00
ChAoS_UnItY
c5824c36f2
checker, cgen: allow static (fixed) arrays in in
operator ( #14121 )
2022-04-21 10:32:29 +03:00
Delyan Angelov
31b28af179
bootstrap: remove -I ./thirdparty/stdatomic/nix from make files ( #14111 )
2022-04-21 00:12:50 +03:00
lemon
960225f7a7
builtin: fix -cc gcc -gc boehm
on linux and macos ( #14115 )
2022-04-21 00:12:17 +03:00
Nick Treleaven
1533b77404
builtin: remove unnecessary casts for defunct small unsigned warning ( #14108 )
2022-04-20 21:47:09 +03:00
yuyi
0260c2a552
checker: minor cleanup in assign_stmt() ( #14107 )
2022-04-20 21:03:41 +03:00
Hunam
0374f021c5
os: small cleanup of function description ( #14112 )
2022-04-20 20:58:41 +03:00
mjh
1546645f63
datatypes: fix bst child access, when .root is 0 ( #14080 )
2022-04-20 16:49:18 +03:00
Larpon
a1342e85c3
os: add info about overwritten content to write_file
( #14109 )
2022-04-20 15:29:58 +03:00
yuyi
52ea0b8cc3
ast: minor cleanup of types.v ( #14103 )
2022-04-20 14:24:13 +03:00
yuyi
ce4c2afc9c
checker, cgen: use 'stmts.last()' instead of 'stmts[stmts.len - 1]' ( #14105 )
2022-04-20 14:23:32 +03:00
yuyi
44ba19716b
checker: fix error for fn with multi return ( #14095 )
2022-04-20 13:09:40 +03:00
yuyi
0c3b69eaef
checker: fix error for assign array of aliases ( #14096 )
2022-04-20 13:08:47 +03:00
Alexander Medvednikov
364656b312
builtin: define C.abs()
2022-04-20 13:03:30 +03:00
yuyi
8cc79e4299
checker: check error for arguments of array.contains() ( #14102 )
2022-04-20 11:00:59 +03:00
playX
711e90cf99
v.util: add math to builtin_module_names (temporary fix for C2V) ( #14100 )
2022-04-20 10:57:55 +03:00
playX
f6a0c26a85
checker: c2v fixes ( #14091 )
2022-04-20 01:09:34 +03:00
Delyan Angelov
9646e4b9d8
sync: use #insert for atomic.h, so that bootstrapping can be simplified
2022-04-19 20:06:20 +03:00
Delyan Angelov
006df58451
checker, cgen: add support for #insert, to simplify bootstrapping V
2022-04-19 19:37:04 +03:00
JalonSolov
daf5d32327
checker: fix error message when number of generic parameters is incorrect ( #14090 )
2022-04-19 18:34:23 +03:00
yuyi
a318a2e09e
examples: fix optional in string interpolation and format error ( #14079 )
2022-04-19 13:29:53 +03:00
yuyi
e16ce3af88
token: minor cleanup of token.v ( #14083 )
2022-04-19 13:28:27 +03:00
yuyi
6164654d11
checker: check fn return type mismatch ( #14081 )
2022-04-19 13:04:41 +03:00
Nick Treleaven
4400efeb9f
checker: Revert part of small_unsigned == signed ( #13967 ) ( #14075 )
...
`gcc -W` doesn't error for e.g. u16 == i32, only for u32 == i16.
Any u16 value can fit in an i32.
2022-04-18 21:30:09 +03:00
yuyi
7ef64bde50
checker: check error for fn decl with optional arguments ( #14076 )
2022-04-18 21:22:31 +03:00
yuyi
d0a11f50ca
cgen: minor cleanup of infix_expr.v ( #14070 )
2022-04-18 15:05:19 +03:00
yuyi
fe371845da
ast, checker, cgen: fix aggregations type check ( #14066 )
2022-04-18 12:38:08 +03:00
spaceface
775c4c34b5
builtin: compile the gc statically by default ( #14063 )
2022-04-18 10:50:21 +03:00
Ikko Ashimine
56a3539ea9
io: fix typo in readerwriter.v ( #14060 )
...
seperate -> separate
2022-04-17 17:40:14 +03:00
yuyi
17c34b09a6
checker, cgen: minor cleanup of last expr stmt expression ( #14057 )
2022-04-17 14:08:43 +03:00
yuyi
cb44f5981e
checker, cgen: fix error for if expr with generic sumtype ( #14056 )
2022-04-17 08:19:44 +03:00
Vincenzo Palazzo
4f14f7714f
checker: ensure that the variant SubType exists ( #14053 )
...
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-04-16 19:29:10 +03:00
Delyan Angelov
8a57f7ed2d
v.util: always compile vfmt with -d vfmt
to enable more efficient parsing
2022-04-16 14:05:55 +03:00
Julien de Carufel
16ead4e63c
cgen: fix infix generics bug ( #14048 )
2022-04-16 13:23:19 +03:00
Delyan Angelov
5b7e538119
v.pref: show the VCROSS_COMPILER_NAME notice only when the output is not a .c file
2022-04-16 10:46:03 +03:00
Delyan Angelov
4a71b27c52
ci: add test_byte_vs_u8 to int_test.v
2022-04-15 21:42:07 +03:00
Delyan Angelov
d75c408868
ci: fix typeof_simple_types_test.v
2022-04-15 21:22:32 +03:00
Delyan Angelov
82c5621621
ci: fix typeof_simple_types_test.v
2022-04-15 21:21:44 +03:00
Delyan Angelov
675f8b6300
ci: fix generic_fn_infer_struct_test.v
2022-04-15 21:21:12 +03:00
Delyan Angelov
ad231cec2f
ci: fix code_test.v
2022-04-15 21:20:03 +03:00
Delyan Angelov
87a373d82c
ci: fix coutput_test.v
2022-04-15 21:18:55 +03:00
Delyan Angelov
c7aedb8e8d
ci: fix fmt_test.v
2022-04-15 21:16:31 +03:00
Delyan Angelov
375361b787
ci: fix ./v check-md -hide-warnings .
2022-04-15 21:08:09 +03:00
Delyan Angelov
840f474fb5
ci: fix ./v -progress test-cleancode
2022-04-15 21:04:10 +03:00
Delyan Angelov
e802e0b9cb
ci: fix more test-all failures
2022-04-15 21:02:03 +03:00
Delyan Angelov
bb2a324d61
ci: more gen.js fixes
2022-04-15 20:51:04 +03:00
Delyan Angelov
868d3e1008
ci: fix failing tests for mysql, crypto.rc4, strings
2022-04-15 20:51:04 +03:00
Alexander Medvednikov
c03fe020bf
parser: do not allow [x]byte{}
2022-04-15 20:40:37 +03:00
Delyan Angelov
6f5a513d8b
ci: fix v build-examples
2022-04-15 20:31:10 +03:00
Delyan Angelov
173e6a943b
checker: fix tests (adjust byte to u8 in .out files too)
2022-04-15 20:15:03 +03:00
Delyan Angelov
cc8803c602
builtin: fix failing embed_file_test.v (pub fn (data &u8) vbytes(len int) []u8 {
)
2022-04-15 19:57:00 +03:00
Alexander Medvednikov
78cb6e2b41
all: handle fixed []u8
2022-04-15 18:35:56 +03:00
Alexander Medvednikov
1c6f63ac0a
tests: use u8 everywhere
2022-04-15 18:34:15 +03:00
Alexander Medvednikov
fbb9e65c0f
all: ~500 more byte=>u8
2022-04-15 18:25:45 +03:00
Alexander Medvednikov
ae6a25f44e
websocket, utf: u8 fixes
2022-04-15 16:24:02 +03:00
Alexander Medvednikov
e97ebf8cfc
sokol: byte => u8
2022-04-15 16:12:05 +03:00
Alexander Medvednikov
258d1f77dc
net: fix byte buffers
2022-04-15 15:57:45 +03:00
Alexander Medvednikov
af73e195da
net: byte fixes
2022-04-15 15:55:39 +03:00
Alexander Medvednikov
fb192d949b
all: replace []byte with []u8
2022-04-15 15:35:35 +03:00
Alexander Medvednikov
0527ac633e
ast: remove .byte
2022-04-15 15:30:37 +03:00
Alexander Medvednikov
dbcf6e9c33
os: fix Process on windows
2022-04-15 15:23:05 +03:00
Alexander Medvednikov
c14984899b
builtin: fix windows fn definitions
2022-04-15 15:18:21 +03:00
Alexander Medvednikov
a1372e284c
builtin: update alloc fn definitions
2022-04-15 15:16:10 +03:00
Alexander Medvednikov
c3ad4e2069
encoding.base64: use u8
2022-04-15 15:10:34 +03:00
Alexander Medvednikov
d4a0d6f73c
all: byte => u8
2022-04-15 14:58:56 +03:00
Alexander Medvednikov
b49d873217
builtin: [1000]u8 fix
2022-04-15 14:48:39 +03:00
Alexander Medvednikov
014c3c97f0
all: byte => u8
2022-04-15 14:45:52 +03:00
Alexander Medvednikov
7f3b91e688
builtin: more byte => u8
2022-04-15 14:10:11 +03:00
Alexander Medvednikov
1e7eb713fb
cgen: remove byte references from cheaders.v
2022-04-15 14:04:53 +03:00
Alexander Medvednikov
ba7b329c73
builtin: more byte=>u8
2022-04-15 13:55:56 +03:00
Alexander Medvednikov
e6ff1508d2
all: make u8 the primary type, byte the alias
2022-04-15 13:43:03 +03:00
Delyan Angelov
566f150b24
net.http: add parse_request_head/1, cleanup existing code
2022-04-15 10:33:44 +03:00
Delyan Angelov
c3ee4fb2a2
crypto: make public all Digest.checksum() methods
2022-04-15 09:02:42 +03:00
Alexander Medvednikov
3b36f16365
all: volatile globals
2022-04-15 02:39:38 +03:00
Alexander Medvednikov
0dff050735
builtin: u8/byte clean up
2022-04-14 16:43:34 +03:00
yuyi
2d6d6c9ac9
json: fix json decode with sumtype of multi array type ( #14035 )
2022-04-14 15:36:24 +03:00
yuyi
c4dff0d797
cgen: format the generated source code by gen_str_for_union_sum_type() ( #14026 )
2022-04-14 15:26:10 +03:00
yuyi
72c2dc805d
cgen: fix error for generics struct that parent has str to string ( #14037 )
2022-04-14 15:23:50 +03:00
Delyan Angelov
f6c9a60f99
pref: only show the support cross compiler warning/VCROSS_COMPILER_NAME message for the C backend
2022-04-14 15:04:00 +03:00
Delyan Angelov
bf62b2e33e
vfmt: stabilise the attribute sorting order (sort first by length of atributes, then in alphabetical order of their names)
2022-04-14 14:53:45 +03:00
Delyan Angelov
f1f75897b3
sync: use asserts in channel code only when -d debug
is passed
2022-04-14 14:00:57 +03:00
Delyan Angelov
e555335bf0
ci: fix windows-msvc builds, as well as the windows-cross job, turn on deprecation notices for [windows_stdcall] and [_fastcall]
2022-04-14 13:36:51 +03:00
fleur
68401d9dc8
gen: add callconv attribute for fn and type ( #14027 )
2022-04-14 11:29:52 +03:00
Delyan Angelov
5905590e78
builder, pref: use i686-w64-mingw32-gcc for cross compiling 32bit windows apps with v -m32 -os windows hw.v
2022-04-14 10:42:25 +03:00
Vincenzo Palazzo
48c295150f
checker: fixes typechecking for a sum type with an alias type ( #13974 )
2022-04-13 18:38:26 +03:00
yuyi
dc08105022
json: fix error for json decode with sumtype ( #14025 )
2022-04-13 18:06:28 +03:00
Delyan Angelov
e5809363de
docs: describe the contents of vlib/v/gen/c/testdata/ and how to write tests for the checker, that still do not have good codegen counterpart
2022-04-13 14:55:26 +03:00
Alexander Medvednikov
d7adb67d52
cgen: fix [cinit]
2022-04-13 02:55:47 +03:00
Alexander Medvednikov
2525a30b5f
cgen: [cinit] attr for globals
2022-04-13 00:30:51 +03:00
yuyi
e3e5bef139
ast, parser: fix formatting of if
with inline comments ( fix #7796 ) ( #14018 )
2022-04-13 00:15:27 +03:00
Nick Treleaven
c780de6282
checker: disallow 'small_unsigned == signed' ( #13967 )
2022-04-12 19:37:30 +03:00
fleur
6718958058
cgen: add a [_fastcall]
fn attribute ( #14016 )
2022-04-12 17:06:56 +03:00
牧心
a810fbb80e
cgen: fix infix_expr_in_optimization compile error when treating some kind cannot directly use '==' ( #14015 )
2022-04-12 16:19:44 +03:00
Delyan Angelov
8788512c4d
checker: make using err.msg and err.code produce an *actual* notice, even with the present compatibility hack (will be *removed* in 2022-06-01)
2022-04-12 14:56:02 +03:00
Delyan Angelov
4c7cdd2a2d
checker,cgen: use faster sym.idx == ast.error_type_idx
integer comparisons, instead of sym.name == "IError"
2022-04-12 14:49:51 +03:00
Delyan Angelov
62032c43db
ast: fix Table.rewrite_already_registered_symbol calls (they were setting sym.idx to 0)
2022-04-12 14:49:51 +03:00
Delyan Angelov
9b43713ec5
net: simplify TcpListener.accept, use C.accept(l.sock.handle, 0, 0)
, since we do not care about the local address of the accepted connection
2022-04-12 11:47:41 +03:00
Delyan Angelov
716cb17aea
math.big: wrap all asserts in module code (not in tests) in $if debug {}
( #14012 )
2022-04-12 09:38:53 +03:00
crthpl
afb07e0e16
cgen: fix deadlock when returning multiple values in lock ( #14014 )
2022-04-12 09:21:27 +03:00
yuyi
3e3b2e25db
parser, fmt: fix the formatting of fn headers with inline comments ( #14010 )
2022-04-11 22:31:06 +03:00
Larpon
07207db998
examples: reduce C. prefix usage, rename fontstash enums ( #14011 )
2022-04-11 22:23:06 +03:00
Delyan Angelov
382586da6d
ci: fix toml segfault (remove unused low level builtin option IError.msg compatibility hack)
2022-04-11 21:49:59 +03:00
Delyan Angelov
e64c8cce62
ci: bump size of EMPTY_STRUCT_DECLARATION's _dummy_pad field to 8 (a voidptr, instead of char)
2022-04-11 17:53:18 +03:00
yuyi
5551cb248c
ast, parser, fmt: fix formatting of consts with embedded comments ( #14008 )
2022-04-11 17:27:41 +03:00
牧心
25d8faabf6
cgen: fix alloc empty struct array error ( #14007 )
2022-04-11 14:16:09 +03:00
Delyan Angelov
843ce43077
strconv: cleanup atof.c.v - use a ParserState enum, clarify comments
2022-04-11 12:01:47 +03:00
Delyan Angelov
e4dfffd70b
toml: remove math import (used only for math.max and math.max_u32)
2022-04-11 10:22:31 +03:00
Nick Treleaven
1938bc48e7
toml.scanner: make end_of_text, at, next and peek return u32 ( #13998 )
2022-04-11 10:12:04 +03:00
yuyi
fa66183f43
checker: check error for map of generic struct init ( #13999 )
2022-04-11 10:07:23 +03:00
Delyan Angelov
a0e7a46be4
rand: speed up MT19937RNG.u64
2022-04-10 13:07:35 +03:00
Delyan Angelov
6c25f5b291
rand: fix needless array allocation in MT19937RNG.u64()
2022-04-10 13:02:31 +03:00
Subhomoy Haldar
3f90809035
rand: add missing pub modifiers for .byte() and .u32() methods ( #13992 )
2022-04-10 11:43:46 +03:00
牧心
11d9a67e3b
cgen: fix invalid operands to an_alias in an_array_of_aliased_values
( #13994 )
2022-04-10 11:42:17 +03:00
yuyi
93a5d03182
parser: improve embedded struct parsing/better error for Architecture []string
( #13995 )
2022-04-10 10:24:36 +03:00
Vincenzo Palazzo
3571f66a82
pref: fix access in invalid position on v search ''
( #13993 )
2022-04-10 10:21:58 +03:00
yuyi
473bc0254d
checker: check error for array of generic struct init ( #13987 )
2022-04-09 21:50:34 +03:00
Delyan Angelov
89d64b21ea
ci: remove manual free(f) in an autofree test, after 58febe46
, which does it automatically now
2022-04-09 20:06:27 +03:00
Delyan Angelov
df30b79971
checker: allow for arr.any(opt_fn()?)
, add test
2022-04-09 19:50:10 +03:00
Daniel Oberhoff
58febe4607
cgen: fix autofree of heap variables ( #13823 )
2022-04-09 17:37:39 +03:00
yuyi
704e3c6e72
cgen: fix error for fn with fixed array argument ( fix #13976 ) ( #13982 )
2022-04-09 15:57:27 +03:00
Delyan Angelov
60e718e7c6
test: save removing the nonexistent binary output for v fmt and v vet tests
2022-04-09 13:04:52 +03:00
Vincenzo Palazzo
2d867a2766
ast: fix reported errors, when arrays of types defined in modules are involved ( #13952 )
2022-04-08 17:38:34 +03:00
yuyi
2a88b313d4
cgen: format json encode/decode generated c codes ( #13972 )
2022-04-08 17:27:05 +03:00
yuyi
617608b23d
cgen: fix optional struct declarations for empty structs ( #13970 )
2022-04-08 14:51:37 +03:00
Larpon
45a427e68b
clipboard: fix segfault when pasting to some X11 apps. Fixes #13891 ( #13971 )
2022-04-08 13:32:38 +03:00
Larpon
52f1c615a6
fontstash: document all functions ( #13969 )
2022-04-08 13:22:23 +03:00
Joe Conigliaro
a0c07454b1
checker: remove debug code from previous commit
2022-04-08 18:27:14 +10:00
Joe Conigliaro
426e9d1734
checker: fix condition for checking if tmpl var is inherited
2022-04-08 18:25:08 +10:00
Joe Conigliaro
e1c8b07fa5
checker/tests: format test added in prev commit & rename chekcer prop
2022-04-08 17:41:23 +10:00
Joe Conigliaro
8dc2601080
all: comptime_call - simplify tmpl scoping, solves many issues.
2022-04-08 17:33:24 +10:00
Delyan Angelov
5a695c81dc
ci: fix the recorded output for compare_structs.c.must_have after eea46c4
2022-04-07 18:08:56 +03:00
crthpl
b232a3b0d1
cgen: fix .filter()
and .map()
on shared arrays ( #13954 )
2022-04-07 18:05:11 +03:00
Delyan Angelov
eea46c4e1a
cgen: fix error, when a struct with over 8 fields, is used as a method receiver directly.
2022-04-07 17:20:14 +03:00
Subhomoy Haldar
022fae1e7f
rand: make mt19937 automatically seeded, add seed_len to wyrand ( #13966 )
2022-04-07 16:00:30 +03:00
playX
6a820c2845
checker: allow all binary operations when translating code produced by c2v ( #13964 )
2022-04-07 12:22:24 +03:00
yuyi
e7fd8c4e7c
cgen: fix error for dereference mut interface in loop ( fix #13913 ) ( #13941 )
2022-04-07 12:01:54 +03:00
yuyi
a58dde48f8
cgen: fix error for optional multi return ( #13959 )
2022-04-07 09:12:23 +03:00
yuyi
c9dcdf6744
cgen: fix json decode with optional argument ( fix #13943 ) ( #13958 )
2022-04-06 19:34:22 +03:00
Larpon
56e6fd01c5
gg: document pub functions in text_rendering and m4/vector ( #13961 )
2022-04-06 19:34:02 +03:00
Delyan Angelov
c5d8d27b90
ci: fix -cstrict failures for vweb_test.v etc.
2022-04-06 08:54:01 +03:00
Vincenzo Palazzo
6412f8ba0b
checker: add a known error on alias cast with generics ( #13946 )
2022-04-05 19:09:46 +03:00
Larpon
1482db6d1a
gg: add missing doc strings to android, recorder and gg.c.v ( #13936 )
2022-04-05 18:42:01 +03:00
Vincenzo Palazzo
359f16fdfd
parser: fixed parsing prototype function with recursive type ( #13922 )
2022-04-05 18:39:49 +03:00
yuyi
0cba579a7b
cgen: simplify codegen for optional consts ( #13948 )
2022-04-05 17:54:23 +03:00
Delyan Angelov
2ecfd1b351
ci: fix clang sanitize errors for json_decode
2022-04-05 17:52:10 +03:00
Larpon
11ccf06441
time: add missing doc string to parse.v ( #13933 )
2022-04-05 13:21:37 +03:00
Larpon
2350dbbd57
gg: add missing doc strings to pub fns in image.* ( #13934 )
2022-04-05 13:21:03 +03:00
Larpon
0b046c14a8
clipboard: add doc strings to all implementations ( #13932 )
2022-04-05 13:06:32 +03:00
Delyan Angelov
f5e4d17cf3
json: return errors with more context, on failed json.decode() calls.
2022-04-05 12:06:08 +03:00
yuyi
f6b8e1e13f
cgen: fix error for const using nested optionals ( #13939 )
2022-04-05 05:58:11 +03:00
Delyan Angelov
0bd8fbc9a8
term, term.ui: fix a panic on !=linux unixes when running examples/term.ui/
2022-04-04 19:25:25 +03:00
Nick Treleaven
2cd9c91e98
vdoc: highlight terminal examples for -comments -color
( #13937 )
2022-04-04 18:13:24 +03:00
Larpon
aa9e2ebb25
gg: document all draw functions ( #13931 )
2022-04-04 18:09:19 +03:00
pancake
5369379738
repl: handle exit(n) ( #13930 )
2022-04-04 16:22:34 +03:00
Alexander Medvednikov
92bfd9b353
cgen: fixed array index for translated code
2022-04-04 12:09:29 +03:00
StunxFS
725b472d37
checker: fix typos ( #13929 )
2022-04-04 10:07:53 +03:00
Nick Treleaven
91b40304b7
vdoc: highlight ..
, ...
as punctuation & postfix ops as operators ( #13924 )
2022-04-04 09:21:54 +03:00
Alexander Medvednikov
719a3b5de3
cgen: fix fixed arrays assignment in translated code
2022-04-04 06:20:54 +03:00
Alexander Medvednikov
a55e930c00
checker: fix pointer checks in translated code
2022-04-04 05:35:15 +03:00
Alexander Medvednikov
cc227d8520
checker: fix non-numeric type check for translated code
2022-04-04 04:59:14 +03:00
Nick Treleaven
d10135e2c4
vdoc: HTML highlight generic function as function, not name ( #13923 )
2022-04-03 23:41:02 +03:00
Delyan Angelov
44603f8e59
checker: add suggestions for misspelled mod.func_name()
calls
2022-04-03 20:07:52 +03:00
Vincenzo Palazzo
51c1d666c2
checker: fix operator overloads (for large structs with > 8 fields, the method receiver is normally auto converted to a reference) ( #13889 )
2022-04-03 19:30:29 +03:00
StunxFS
38853568b4
encoding.csv: allow passing a custom delimiter to the new_reader
function ( #13910 )
2022-04-03 19:13:43 +03:00
Nick Treleaven
782d5374c9
builtin: add an array.drop(n)
method ( #13907 )
2022-04-03 17:05:50 +03:00
Delyan Angelov
a1e9cae5d2
tests: add a vlib/v/tests/known_errors/known_errors_test.v test runner
2022-04-03 12:54:22 +03:00
yuyi
0497b885dc
checker: minor cleanup in find_unreachable_statements_after_noreturn_calls() ( #13903 )
2022-04-03 11:19:19 +03:00
yuyi
8c55a9ecd3
builtin: minor optimization of array.push() and array.push_noscan() ( #13904 )
2022-04-03 11:04:18 +03:00
Cameron Katri
340543dfc0
cli: add automatic manpage generation with -man ( #13911 )
2022-04-03 10:12:47 +03:00
Delyan Angelov
71dc6c224a
tests: make vlib/net/udp_test.v more stable, and less noisy on the tests-sanitize-address-gcc job
2022-04-02 20:00:26 +03:00
Cameron Katri
d585fbea8a
time: implement Time.strftime(fmt string) as a wrapper for strftime(3) ( #13898 )
2022-04-02 18:33:37 +03:00
Nick Treleaven
42f92db0ab
v.doc: parse multi-line examples (so they get highlighted) ( #13894 )
2022-04-02 18:29:12 +03:00
yuyi
faa55b46de
cgen: fix array of fixed array ( fix #13895 ) ( #13901 )
2022-04-02 18:00:59 +03:00
yuyi
0bf0c73a49
checker: fix error for returning optional ( #13902 )
2022-04-02 17:25:01 +03:00
pancake
af79c1e6ef
os: implement os.config_dir() like in Go's UserConfigDir ( #13893 )
2022-04-01 22:04:43 +03:00
Vincenzo Palazzo
d7817863c6
checker: type inference over a generic type should compile ( #13824 )
2022-04-01 19:31:27 +03:00
Delyan Angelov
9d2529b611
ci: reduce repetitions in test_global_mutex in init_global_test.v
...
With the old number of repetitions (2500000), that test alone could take over
30 seconds, in the CI environment.
2022-04-01 19:23:15 +03:00
yuyi
6987f2c087
time: fix error for time.local() on windows ( #13892 )
2022-04-01 17:16:46 +03:00
Vincenzo Palazzo
02c80bd445
time: fix repetitive time.now().local().local().local() offsetting the time further and further ( #13861 )
2022-04-01 00:11:17 +03:00
yuyi
bc98c11d9d
parser, checker, cgen: minor cleanup of go_expr() ( #13875 )
2022-03-31 19:58:04 +03:00
yuyi
db3bbb58cf
cgen: fix error for cross assign of the reserved name variable ( #13884 )
2022-03-31 19:55:21 +03:00
Nick Treleaven
a87cd9663e
vdoc: highlight inline examples for -f html
( #13879 )
2022-03-31 19:32:32 +03:00
R cqls
5c43493183
sokol: add support for compiling with -d darwin_sokol_glcore33
on macos ( #13885 )
2022-03-31 16:52:21 +03:00
Cameron Katri
b15240185e
builder,cgen: iOS fixes ( #13883 )
2022-03-31 11:51:13 +03:00
kylepritchard
6137ce23c0
math: allow acos(0)
( fix #13876 ) ( #13877 )
2022-03-30 21:36:50 +03:00
yuyi
ae1cb5697e
cgen: minor cleanup in ref_or_deref_arg() ( #13874 )
2022-03-30 21:06:38 +03:00
yuyi
d40a502981
checker: minor cleanup in fn_call() ( #13873 )
2022-03-30 21:05:17 +03:00
Subhomoy Haldar
7ef7188f4b
math.big: add bit_len, optimize gcd, add documentation ( #13872 )
2022-03-30 15:52:09 +03:00
Delyan Angelov
8121a8ada0
ci,cgen: comment out including stdbool.h for now
...
Fails tcc tests on windows, see: https://github.com/vlang/v/runs/5749951315?check_suite_focus=true
and vlib/v/checker/tests/globals_run/function_stored_in_global.vv
2022-03-30 14:26:20 +03:00
Delyan Angelov
566735b298
cgen: add nil
to c_reserved (it is a macro defined in MacTypes.h on macos)
2022-03-30 13:33:03 +03:00
Cameron Katri
093994655c
v.builder: fix iOS compilation from non-macOS, allow -cc to override the default cross compiler ( #13866 )
2022-03-30 10:26:13 +03:00
Cameron Katri
3e69d3813b
v.builder: fix linker flags for systems with Procursus ( #13865 )
2022-03-30 10:15:52 +03:00
Delyan Angelov
cc637e5ee8
checker: make the misssing shared/mut modifer in fn and method calls error clearer
2022-03-30 01:45:40 +03:00
yuyi
55d9464890
checker: fix error for marking as referenced ( #13859 )
2022-03-30 01:33:10 +03:00
yuyi
42a67831bf
parser: fix printing slice of multiline raw string ( #13856 )
2022-03-29 18:06:11 +03:00
yuyi
c71770d9c5
checker: fix error for array of anon fn call ( #13858 )
2022-03-29 18:04:30 +03:00
Delyan Angelov
04cc037955
ci: fix -cstrict compilation of term.ui tests
2022-03-29 18:03:05 +03:00
Delyan Angelov
7ee93c8a20
docs: show the full information for deprecated functions
2022-03-29 15:17:55 +03:00
yuyi
fd34ebd84e
checker: check the count of generics in fn arguments ( #13855 )
2022-03-29 10:04:19 +03:00
Delyan Angelov
4f551d76c0
term.ui: fix conflicting C struct declarations when compiling programs, importing term.ui before term, on windows
2022-03-29 09:31:24 +03:00
yuyi
509367b293
cgen: minor cleanup in expr_is_multi_return_call() ( #13846 )
2022-03-28 20:38:23 +03:00
yuyi
dd1a8cbadc
parser: check error for struct field type using 'mut' ( #13847 )
2022-03-28 18:13:38 +03:00
yuyi
62553dcc2e
cgen: fix crash for casting bool to int ( fix #13825 ) ( #13844 )
2022-03-28 12:20:47 +03:00
Subhomoy Haldar
f75ce9dd82
rand: move functions from rand.util to the main module ( #13840 )
2022-03-27 17:38:59 +03:00
yuyi
875ad1f6ea
ast: minor cleanup in ast.v ( #13839 )
2022-03-27 16:21:40 +03:00
Nick Treleaven
02f72c8230
builtin: improve docs for array methods that take an it
expression, like .map, .filter etc ( #13836 )
...
Move explanation about boolean `it` expressions to `filter`, as `sort`
doesn't take a boolean expression. Also move `any` example.
Add 2 filter examples.
Add map example from docs.md.
2022-03-27 14:28:15 +03:00
Delyan Angelov
0e496a8de2
tests: add an autofree regression test before return value ownership changes
2022-03-27 09:50:37 +03:00
Delyan Angelov
bea0d500d0
parser: ignore upper letter case restriction for fn C.xyz
declarations
2022-03-26 21:20:28 +02:00
Nick Treleaven
fcb57312b9
parser: error if parameter name starts with a capital ( #13827 )
2022-03-26 19:56:34 +02:00
Delyan Angelov
8c396356bb
context: make the examples in the vlib/context/README.md immediately runnable
2022-03-26 13:25:45 +02:00
Delyan Angelov
7f28d91190
ci: fix again -usecache regression on macos
2022-03-26 09:47:44 +02:00
Alexander Medvednikov
0248349e7c
cgen: global/const fixes
2022-03-25 23:33:01 +03:00
Nick Treleaven
ea4410cdb5
builtin: document the rune.length_in_bytes method ( #13826 )
2022-03-25 20:09:39 +02:00
Delyan Angelov
347db755c8
tests: sort the test files before further processing in valgrind_test.v
2022-03-25 09:41:45 +02:00
Delyan Angelov
ddc2c49365
cgen: autofree out of scope variables in reverse order of their creation
2022-03-25 09:39:12 +02:00
Delyan Angelov
d6c40865f9
strings: cleanup unsafe casts in some of strings.Builder ops ( #13819 )
2022-03-25 00:07:15 +02:00
Delyan Angelov
5b492e26dd
builtin: support a.flags.set(.noslices | .noshrink), use it in the particles example ( #13818 )
2022-03-24 23:37:13 +02:00
Nick Treleaven
a4ab3c1f14
checker: disallow mut_ptr = &immutable_var
( #13814 )
2022-03-24 20:43:25 +02:00
Delyan Angelov
9bbb52e9cc
checker: add a check for dump(c)
, where typeof(c) == "char"
2022-03-24 12:11:59 +02:00
yuyi
78d9975798
ast, cgen: restore Type.str() and fix error for it ( #13815 )
2022-03-24 11:45:06 +02:00
yuyi
1566f7f766
checker: minor cleanup in check_types.v ( #13816 )
2022-03-24 08:59:05 +02:00
Delyan Angelov
5b668dba2b
sync: document sync.thread_id()
2022-03-23 19:52:20 +02:00
Delyan Angelov
ce576d01c4
sync: add sync.thread_id() u64 {
( #13810 )
2022-03-23 19:19:14 +03:00
Nick Treleaven
2e963e36ac
rand: add pub fn shuffle<T>(mut a []T) {
function + tests ( #13811 )
2022-03-23 15:31:26 +02:00
yuyi
35cd8112a5
ast, checker, cgen: fix error for printing alias that has str method ( #13809 )
2022-03-23 11:52:48 +02:00
Vincenzo Palazzo
8b072aa962
checker: check if generic values have the same types ( #13718 )
2022-03-23 09:13:10 +02:00
yuyi
dff39bac78
cgen: fix error for defining global anonymous functions ( #13808 )
2022-03-23 08:09:15 +02:00
yuyi
e3dca82f9c
strconv: minor cleanup in f64_to_str_lnd1() ( #13804 )
2022-03-22 20:15:59 +02:00
yuyi
0337882240
checker: check redefine global 'main' function ( #13803 )
2022-03-22 17:39:12 +02:00
yuyi
a9837ba95d
cgen: minor cleanup in go_expr() ( #13801 )
2022-03-22 12:07:46 +02:00
yuyi
56f5ed4789
strconv: fix error for string interpolation of float format ( #13800 )
2022-03-22 12:00:18 +02:00
Nick Treleaven
afbccf79f7
builtin: don't memdup element for array.pop
(depends on how cgen works) ( #13789 )
...
The voidptr returned is immediately dereferenced in cgen so the memory
is copied before the array can be appended to: `*(int*)array_pop(&a)`
2022-03-21 23:34:35 +02:00
yuyi
f66d2f5d43
cgen: simplify in index_of_array() and add test ( #13792 )
2022-03-21 22:03:45 +02:00
Delyan Angelov
381cf4b61d
ci: bump retries to 3, for flaky vlib/v/tests/go_array_wait_test.v
2022-03-21 21:47:01 +02:00
yuyi
c0437afbcd
cgen: fix error for casting int to interface ( #13790 )
2022-03-21 21:18:11 +02:00
Delyan Angelov
9ad64b0bd8
vweb: support -d trace_request
and -d trace_response
2022-03-21 19:48:47 +02:00
Delyan Angelov
3bae489e35
examples: make the vweb_assets.v example more robust (always change work folder to the folder of the executable). Document the vweb.Context.handle_static behaviour.
2022-03-21 19:05:18 +02:00
yuyi
5815ab8d00
cgen: minor cleanup in index.v ( #13788 )
2022-03-21 13:10:10 +02:00
yuyi
81bb1ea71f
tests: cleanup go_anon_fn_variable_call_test.v ( #13786 )
2022-03-21 13:04:43 +02:00
El Koulali András
f5036629ca
cgen: add true
and false
to C reserved words ( #13781 )
2022-03-21 11:00:30 +02:00
yuyi
d9cca53bd0
checker: check error for index of optional ( #13785 )
2022-03-21 10:17:57 +02:00
Delyan Angelov
21e9b1deb0
ci: fix -usecache failure on macos
2022-03-21 08:52:25 +02:00
Alexander Medvednikov
80c94ea73e
cgen: fix c2v consts in .o files
2022-03-21 04:56:37 +03:00
yuyi
c4b424717c
cgen: fix error for map get anon fn value ( #13782 )
2022-03-21 00:20:55 +02:00
Delyan Angelov
caa0e25939
cgen: fix struct type dependency sorting, when struct field types, are aliases to struct types from other modules ( #13779 )
2022-03-20 20:23:48 +02:00
Delyan Angelov
71edaa071a
builtin: use malloc, instead of calloc in array.ensure_cap/1
2022-03-20 15:08:42 +02:00
yuyi
0a78847782
checker: check error for unknown type in anon fn field of struct ( #13778 )
2022-03-20 13:28:35 +02:00
yuyi
8c3687aa10
checker: check error for struct field init with nobody anon fn ( #13777 )
2022-03-20 13:04:31 +02:00
Delyan Angelov
8ab0bcb6aa
Revert "builtin: improve performance for common array ops, based on VTune analysis"
...
This reverts commit 57db261538
.
2022-03-20 12:57:27 +02:00
Delyan Angelov
57db261538
builtin: improve performance for common array ops, based on VTune analysis
2022-03-20 12:42:04 +02:00
yuyi
3e40cd5baa
ast, checker, cgen: fix error for go anon fn variable call ( #13776 )
2022-03-20 07:45:23 +02:00
Delyan Angelov
c05634ebd1
ci: fix sanitize job failures after 02b889d
2022-03-19 21:45:58 +02:00
Delyan Angelov
02b889dac3
cgen: generate smaller switch statements for sumtypes/enums with else{}
2022-03-19 21:12:27 +02:00
Delyan Angelov
eb7c9cec3d
parser: short circuit if conditions in Parser.name_expr
2022-03-19 20:31:03 +02:00
Delyan Angelov
4dd68d3965
ast: small cleanup of using simple string interpolation in a string builder .write_string/1 parameter
2022-03-19 17:25:53 +02:00
Delyan Angelov
0cc63107ff
cgen: fix duplicate auto generation of free methods, add test
2022-03-19 01:01:08 +02:00
Delyan Angelov
ee6b23c2a7
toml: use toml.parse_text and toml.parse_file in the tests
2022-03-18 23:32:06 +02:00
yuyi
5237d1d446
cgen: fix error for empty interface ( #13764 )
2022-03-18 22:41:06 +02:00
Larpon
156efec278
toml: deprecate input.auto_config() and toml.parse() ( #13770 )
2022-03-18 22:33:51 +02:00
yuyi
3e41be1ff4
checker: minor cleanup in check_or_last_stmt() ( #13763 )
2022-03-18 22:27:53 +02:00
Delyan Angelov
1734e72638
v.vmod: make the v.mod parser more robust, show line numbers in errors, add tests
2022-03-18 22:23:11 +02:00
yuyi
5f79fa8a30
checker: handle invalid smartcast with if/match none ident or selector ( fix #12317 ) ( #13762 )
2022-03-18 17:50:54 +03:00
Nick Treleaven
f903ef24e8
cgen: simplify slicing fixed array ( #13767 )
2022-03-18 17:50:30 +03:00
yuyi
bb2ddb98a3
parser: check if guard condition ( #13765 )
2022-03-18 17:49:20 +03:00
Delyan Angelov
54b0a2aa62
toml: fix toml.scanner.new_simple/1 to *always* create a scanner, based on text, not a file path
2022-03-18 16:14:44 +02:00
Delyan Angelov
0ca87ad09f
parser: fix small performance regression after 1d83ab6b
(by avoiding needless interpolation in hot paths)
2022-03-18 12:52:03 +02:00
Delyan Angelov
817bedec5d
checker: show available sumtype variants in match branches on typos
2022-03-18 11:50:28 +02:00
Nick Treleaven
00563a130d
cgen: fix double evaluation of rvalue array expression in slice ( #13737 )
2022-03-18 11:43:15 +02:00
Hunam
8a2d3f6470
strings: add a Builder.ensure_cap()
method ( #13755 )
2022-03-18 10:36:53 +02:00
yuyi
136f39a2d4
cgen: cleanup in if_expr() ( #13754 )
2022-03-17 01:09:49 +02:00
Delyan Angelov
7a4715288c
checker: make the errors for call expression shared/mut mismatches more detailed
2022-03-16 22:45:35 +02:00
yuyi
7f62346213
cgen: fix error for if expr returning sumtype ( #13752 )
2022-03-16 15:43:17 +02:00
yuyi
315e07abf6
checker: minor cleanup in match_expr() ( #13753 )
2022-03-16 15:39:57 +02:00
yuyi
33167960ed
checker: check the sumtype mismatch returned by match expr ( #13751 )
2022-03-16 09:31:38 +02:00
yuyi
57cba4d3f0
ast: minor cleanup in is_blank_ident() ( #13748 )
2022-03-16 09:30:37 +02:00
Delyan Angelov
089c93b613
x: add a mostly empty vlib/x/x.v file, to workaround a v doc
bug
...
The bug is that `v doc` ignores README.md in a folder without .v files,
leading to tree nodes with empty # links and no content.
2022-03-15 20:19:39 +02:00
yuyi
49155ec312
parser: notice unnecessary parenthesis of reference ( fix #11179 ) ( #13739 )
2022-03-15 16:11:53 +02:00
yuyi
92cafd8851
checker: check invalid 'mut' keyword in infix expr ( #13742 )
2022-03-15 14:50:17 +03:00
yuyi
1d83ab6be1
parser: check using invalid keyword with none ident ( #13743 )
2022-03-15 12:58:03 +02:00
playX
78b1cbefff
builtin.wasm_bare: fix malloc invocation ( #13740 )
2022-03-15 12:55:39 +02:00
Nick Treleaven
34dd4f34ab
checker: fix cgen error on sliced references ( #13736 )
2022-03-14 19:52:37 +02:00
yuyi
ea3c0166c0
ast: fix error for typeof aggregate ( #13735 )
2022-03-14 18:42:47 +02:00
yuyi
dbb18e3656
parser: fix error for match branch with array expression ( #13733 )
2022-03-14 16:19:05 +02:00
pancake
a1d0db792e
native: initial support for typeof() expressions ( #13730 )
2022-03-14 15:15:06 +02:00
kylepritchard
a8f6574471
math: allow i64 in digits function and add count_digits function ( #13729 )
2022-03-14 10:41:01 +02:00
playX
c8b0f51c13
builtin.wasm_bare: use walloc as malloc/free implementation ( #13731 )
2022-03-14 09:20:20 +02:00
yuyi
f7feb634d2
checker: fix error for if mut with immutable variable ( #13728 )
2022-03-13 16:33:50 +02:00
Mihai Galos
9495aacf3e
datatypes.fsm: add a fsm_graph.v tool ( #13723 )
2022-03-13 11:40:03 +02:00
Adam Oates
424ef0b2b8
stbi: fixed panic when trying to load JPG ( #13724 )
2022-03-13 09:57:34 +02:00
yuyi
27f9bc9ba0
checker: check error for match mut with immutable variable ( fix #9704 #8976 ) ( #13725 )
2022-03-13 09:53:29 +02:00
Delyan Angelov
83762fa4a4
native: align the disassembly/comment column in the -v -b native
output
2022-03-12 11:09:09 +02:00
Subhomoy Haldar
40504e8600
rand: further bridge gap b/w rand module and PRNG interface ( #13719 )
2022-03-12 09:41:12 +02:00
Delyan Angelov
a3e9409196
strconv: fix a double free bug in v_sprintf/remove_tail_zeros_old, reduce leaks
2022-03-11 19:32:08 +02:00
yuyi
795fe5844c
strconv: fix strconv.v_printf() ( #13716 )
2022-03-11 17:00:57 +02:00
yuyi
10ab758aa7
ast: minor cleanup in pref_arch_to_table_language() ( #13714 )
2022-03-11 14:56:48 +02:00
Delyan Angelov
8dc4b1d9a3
builtin: use malloc_noscan more (for map metas and in []byte.hex())
2022-03-11 11:26:22 +02:00
yuyi
1993bf2a12
parser: cleanup map syntax ( #13713 )
2022-03-11 12:15:52 +03:00
yuyi
c1c3ae2a18
parser: minor cleanup in fn_args() ( #13711 )
2022-03-11 10:42:03 +02:00
yuyi
3f351036a2
parser: fix error for fn with type only argument ( fix #13704 ) ( #13709 )
2022-03-10 22:52:06 +02:00
yuyi
dd06698ee3
ast: rename TypeSymbol.is_public to TypeSymbol.is_pub ( #13710 )
2022-03-10 22:18:57 +02:00
Delyan Angelov
f3388df577
ci: fix dump_expression.vv when v is actually vprod (-‸ლ)
2022-03-10 18:13:00 +02:00
Delyan Angelov
e8c8f0e7c0
v.ast: fix dump(os.real_path(Makefile))
printing main.os.real_path
2022-03-10 11:24:46 +02:00
Nick Treleaven
4bea35b028
vlib/arrays: fix copy
to not use memcpy for array, map, string ( #13703 )
2022-03-10 01:30:51 +03:00
JalonSolov
de2fc87995
os: handle trailing backslash on windows path when quoting ( #13705 )
2022-03-10 01:29:37 +03:00
Nick Treleaven
7231a3f135
vlib: add mut
for the first parameter of builtin.copy, arrays.copy and crypto ( #13702 )
2022-03-09 20:26:00 +02:00
yuyi
4c33003f86
checker: check error for infix compare optional ( #13701 )
2022-03-09 20:20:21 +02:00
Nick Treleaven
54de04a916
arrays: improve fold/reduce docs ( #13700 )
2022-03-09 20:04:49 +02:00
yuyi
6c7243f2f7
checker: remove redundant 'c.expected_type = ast.void_type' ( #13687 )
2022-03-09 12:33:23 +02:00
Mihai Galos
d5b087de10
vlib: add a datatypes.fsm module ( #13668 )
2022-03-09 12:14:54 +02:00
pancake
3f1e232c9b
native: support comparing two idents and avoid printing idents ( #13686 )
2022-03-08 19:52:30 +02:00
Delyan Angelov
10474f35f6
net.http: clarify error message in Request.ssl_do
2022-03-08 18:17:34 +02:00
yuyi
3fe8204062
checker: fix if expr with enum value ( #13685 )
2022-03-08 11:55:17 +02:00
Delyan Angelov
f6aba9a3fe
util: make check_module_is_installed more robust to ~/.vmodules paths with spaces
2022-03-08 11:33:03 +02:00
yuyi
cea3149369
checker: fix match expr with enum type value ( #13683 )
2022-03-08 09:50:17 +02:00
Nick Treleaven
17fcc788f2
arrays: add generic copy fn ( #13677 )
2022-03-08 09:44:04 +02:00
Delyan Angelov
beb1b8ce1b
tools: add v scan file.v
2022-03-07 18:25:38 +02:00
pancake
b20c911d3e
native: generate relocatable ELFs and support relative strings ( #13671 )
2022-03-07 18:24:01 +02:00
yuyi
e6270b05dc
checker: check unsigned integer compared with negative value ( #13670 )
2022-03-07 10:26:40 +02:00
Alexander Medvednikov
36ec47cd20
all: replace "NB:" with "Note:" (docs/comments)
2022-03-06 20:01:22 +03:00
Delyan Angelov
f74b65b63f
docs: change term.input to term.ui in vlib/term/README.md
2022-03-06 15:50:22 +02:00
yuyi
c8e33ad219
cgen: fix error for array of reference auto_str ( #13665 )
2022-03-06 12:15:31 +02:00
Delyan Angelov
b0f651bf81
sync: enable tcc compilation of sync programs on Amazon Linux 2 (and other Red Hat distros like CentOS) by default ( #13664 )
2022-03-05 19:13:47 +02:00
yuyi
6380b9eb15
cgen: minor cleanup of struct.v ( #13661 )
2022-03-05 17:19:20 +02:00
yuyi
22fda7c3dd
cgen: fix error for time struct init with update ( #13660 )
2022-03-05 13:28:48 +02:00
yuyi
8136157f87
checker: fix error for 'or expr with nested match expr' ( #13658 )
2022-03-05 13:06:08 +02:00
Ned
0e5ae7126f
x/json2: fix decoder errors ( #13655 )
...
* x/json2: fix decoder errors, refactoring
* x/json2: add error-catching tests
* x/json2: add missing docs
* x/json2: fmt
2022-03-05 13:02:43 +02:00
kahsa
3ef437e679
sokol: reorder and add missing funcs ( #13652 )
2022-03-04 14:39:38 +03:00
Ned
437fa02f27
x.json2: add customized JSON output capability via Encoder ( #13654 )
2022-03-04 14:39:23 +03:00
Hunam
74d5106e8f
cli: print cli errors in red where possible ( #13647 )
2022-03-04 12:28:11 +02:00
yuyi
f70e5bd69b
parser: check assign expr with undefined variable ( #13653 )
2022-03-04 10:33:14 +02:00
ChAoS_UnItY
63b41e67fa
v.parser: change body_start_pos to function declaration's lcbr, resolve #13642 ( #13646 )
2022-03-03 19:51:27 +02:00
Delyan Angelov
4331d6dea0
v.builder: only add /DEBUG:FULL when -cflags does NOT contain custom /DEBUG options ( #13643 )
2022-03-03 16:47:41 +02:00
yuyi
a98eebde7f
checker: add a notice for potentially incorrect smartcasts ( #13644 )
2022-03-03 16:36:40 +02:00
yuyi
ac1b31dbba
checker: fix error for array of interface init in for_in ( #13636 )
2022-03-03 12:32:55 +02:00
Delyan Angelov
3364f2aadf
cgen: use ADDR for sumtype conversion instead of HEAP (fix regression after 7f8f571
)
2022-03-03 11:44:24 +02:00
yuyi
288b13b51d
all: cleanup smartcasts in the compiler ( #13639 )
2022-03-03 10:48:31 +02:00
Delyan Angelov
4e7db5bab0
v.builder: streamline get_os_cflags/0, use pref.os_from_string to centralise string -> v.pref.OS conversion
2022-03-03 10:43:50 +02:00
ChAoS_UnItY
6a3d34ae11
checker: fix #13626 , when unwrapped type is fixed array, and selector expr is 'len' ( #13627 )
2022-03-02 20:46:18 +02:00
yuyi
36e80266e6
ast: fix error for 'for smartcast' - part 2 ( #13635 )
2022-03-02 16:01:20 +02:00
yuyi
ffe6ff3cc8
cgen: fix error for print smartcast variable ( #13634 )
2022-03-02 12:32:54 +02:00
yuyi
22017ff8f4
parser: fix error for 'for smartcast' - part 1 ( #13629 )
2022-03-02 12:18:03 +02:00
yuyi
7f8f571ed2
cgen: fix error for optional cast to interface ( #13623 )
2022-03-01 19:21:55 +02:00
kahsa
6d57315aca
net: fix html dom debug print ( #13625 )
2022-03-01 19:20:40 +02:00
Ikko Ashimine
aa633dab41
utf8: fix typo in utf8_util.v ( #13624 )
2022-03-01 19:06:48 +02:00
Delyan Angelov
fd91811fe2
v.util: add set_source_for_path/2 to enable external tools to use util.formatted_error on pathless sources
2022-03-01 18:55:25 +02:00
yuyi
996bd41ce8
checker: simplify for smartcast in for_stmt() ( #13619 )
2022-03-01 12:31:48 +02:00
Joe Conigliaro
3b6e122d9d
all: comptime_call - update tmpl scope vars with caller scope vars after their properties got updated in checker
2022-03-01 02:13:29 +11:00
yuyi
0028e557f9
checker: cleanup smartcast in checker.v ( #13618 )
2022-02-28 17:06:37 +02:00
yuyi
9a2df0df0e
cgen: fix fn mut argument of interface type ( #13616 )
2022-02-28 13:31:04 +02:00
yuyi
013589e9fe
parser: minor cleanup in global_decl() ( #13617 )
2022-02-28 13:30:17 +02:00
Subhomoy Haldar
a0d9e6e1c2
rand: extend PRNG interface, add buffering support ( #13608 )
2022-02-28 13:17:54 +02:00
yuyi
efeb3e04da
ast: add table.is_sumtype_or_in_variant() ( #13615 )
2022-02-28 11:38:20 +03:00
yuyi
81c787ef91
checker: fix match expr with assign sumtype variable ( #13614 )
2022-02-28 11:37:59 +03:00
yuyi
bc16c61f6f
parser: check using 'mut' on fn_decl return type ( #13610 )
2022-02-27 14:23:43 +02:00
yuyi
0fb1eaef04
parser: check the redefinition of built-in IError ( #13606 )
2022-02-26 09:52:40 +02:00
yuyi
0d9792bdf2
ast: cleanup in find_method_with_generic_parent() ( #13600 )
2022-02-26 02:11:56 +03:00
Larpon
d80f5165dd
fmt: keep trailing comments after fn header decl ( #13596 )
2022-02-25 16:36:48 +03:00
yuyi
83ea97b1a3
parser: fix optional expr with array value ( #13599 )
2022-02-25 15:54:12 +03:00
Larpon
73f931b52e
fmt: improve single line const comment placement ( #13595 )
2022-02-25 14:46:12 +02:00
Bastian Buck
fa645516c3
crypto: implement Output Feedback (OFB) Mode for AES and DES ( #13583 )
2022-02-24 14:38:21 +02:00
Bastian Buck
0d07a64230
crypto: implement Counter (CTR) Mode for AES and DES ( #13582 )
2022-02-24 12:06:33 +02:00
yuyi
d30ad344e8
checker: check error for array of sumtype appendding ( #13593 )
2022-02-24 11:07:03 +02:00
yuyi
a28249c119
ast: fix for in iterator of generic struct ( fix #13579 ) ( #13585 )
2022-02-24 10:48:52 +02:00
Subhomoy Haldar
114a341f5f
rand: simplify rand.PRNG, move to optional types for error handling ( #13570 )
2022-02-23 12:36:14 +02:00
Bastian Buck
5c0b7b0d05
crypto: implement Cipher Feedback (CFB) Mode for AES and DES ( #13566 )
2022-02-23 11:55:16 +03:00
yuyi
b5e7cef1b1
ast: define 'const invalid_type_idx = -1' ( #13573 )
2022-02-23 11:54:43 +03:00
yuyi
c3ec738126
checker: check struct field reference type mismatch ( #13575 )
2022-02-23 11:53:22 +03:00
Delyan Angelov
d2e8302d21
ci: show failing compilation output in draw_fns_api_test.v (make diagnostic easier)
2022-02-22 16:53:06 +02:00
yuyi
6486fffc5a
checker: cleanup map = {}
processing ( #13563 )
2022-02-22 16:04:54 +02:00
Vincenzo Palazzo
6a876d4170
datatypes: small fix for the BST node constructor ( #13569 )
2022-02-22 15:41:30 +02:00
Larpon
1032cf5c04
checker: only cast as ast.Var if not unresolved, fixes #13561 ( #13562 )
2022-02-22 15:23:15 +02:00
Delyan Angelov
33d379d530
ci: vfmt vlib/net/socket.v
2022-02-22 15:21:20 +02:00
gcxfd
ee1de06678
net: extract a common Socket struct, reuse it by embedding in TcpSocket & UdpSocket ( #13559 )
2022-02-22 10:34:38 +02:00
Vincenzo Palazzo
7bd8503170
datatypes: add a binary search tree implementation ( #13453 )
2022-02-22 10:28:01 +02:00
Delyan Angelov
4a765bc33b
cgen: support -d trace_gen_source_line_info
2022-02-21 23:04:10 +02:00
Delyan Angelov
f2e5bb447e
os: remove dead code
2022-02-21 22:57:24 +02:00
yuyi
07e9ed1a1d
cgen: fix interface embedding method call ( #13553 )
2022-02-21 17:49:38 +02:00
playX
b842e89acc
all: initial implementation of compile-time types ( #13549 )
2022-02-21 17:42:54 +02:00
yuyi
83cdd8bedd
ast: add comments for struct 'StructInit' and 'StructInitField' ( #13551 )
2022-02-21 12:48:53 +02:00
simon place
8ba4a3dd01
math.complex: make mutable the Complex.re and Complex.im fields ( #13540 )
2022-02-21 12:39:45 +02:00
kahsa
809772db4e
gg: improve Context scale for Android ( #13545 )
2022-02-21 12:12:21 +02:00
yuyi
04654ed518
parser: check error for defer propagate ( fix #13534 ) ( #13536 )
2022-02-20 12:29:08 +02:00
yuyi
75ebac006d
cgen: fix struct init with multi nested embed update expr ( #13529 )
2022-02-19 20:46:44 +02:00
gcxfd
dbae2d6af4
net: add UdpSocket.address() method ( #13524 )
2022-02-19 20:45:55 +02:00
yuyi
09f08e1fee
cgen: fix error for interface and embedded struct build ( #13530 )
2022-02-19 20:43:40 +02:00
eyun
67e33bf9bc
checker: make public the valid_comptime_if_os list ( #13518 )
2022-02-19 15:22:33 +02:00
yuyi
0236931c78
cgen: fix generics with reference generic arguments ( #13525 )
2022-02-19 15:19:50 +02:00
Dialga
bcc4de19fc
v.builder: fix cross compiling directory with spaces ( #13522 )
2022-02-19 10:08:41 +02:00
yuyi
0208e9672d
checker: check array sort_with_compare callback function parameters ( #13511 )
2022-02-19 10:06:36 +02:00
Delyan Angelov
d86b18844e
net.unix: use byte() instead of u16() cast for addr.sun_family
2022-02-18 13:47:12 +02:00
Delyan Angelov
3c38abc56e
rand: fix rand.uuid_v4()'s clock_seq_hi_and_reserved field
2022-02-18 12:43:38 +02:00
Delyan Angelov
c9867a9ae4
net: ensure that net
and net.unix
can be imported together in the same program
2022-02-18 11:47:56 +02:00
yuyi
14073ac0fe
checker: fix error for array of sumtype init ( #13501 )
2022-02-18 11:47:24 +02:00
Subhomoy Haldar
072480352c
math.big: add get_bit, set_bit, big_mod_pow ( #13507 )
2022-02-18 11:53:39 +03:00
Delyan Angelov
ef5ea0ef21
ci: fix vweb failures (restore the ability to *force* vweb to listen to *only* local interfaces)
2022-02-18 10:18:04 +02:00
Joe Conigliaro
f4051e0252
checker: make sure generic struct instantiation uses a known type. closes #13506
2022-02-18 17:54:52 +11:00
Anton Zavodchikov
da9331f8ff
vweb: support ipv6 ( #13498 )
2022-02-17 23:13:36 +03:00
Joe Conigliaro
d739abbb3f
cgen: move var decl out of loop in global_decl()
2022-02-18 00:42:54 +11:00
Joe Conigliaro
07b15a209a
cgen: fix for prev commit - get usecache working with clang (fix duplicate symbols)
2022-02-17 22:24:58 +11:00
Joe Conigliaro
6fc654821f
cgen: get usecache working with clang (fix duplicate symbols)
2022-02-17 22:17:07 +11:00
Delyan Angelov
245b70cabc
checker: bump iface_level_cutoff_limit to 100 (fix ci)
2022-02-17 11:46:04 +02:00
Delyan Angelov
230dc26858
checker: bump iface_level_cutoff_limit to 99 (fix ci)
2022-02-17 11:42:34 +02:00
yuyi
4f9039991f
parser: cleanup in check_undefined_variables() ( #13496 )
2022-02-17 10:16:52 +02:00
Delyan Angelov
901a4d8b84
checker: restrict too deep recursion, to prevent stackoverflows on windows
...
For v itself, the nesting levels do not exceed 15, so a limit of 40 seems reasonable.
2022-02-17 10:04:11 +02:00
yuyi
842fd7a27e
parser: check assign expr with undefined variables of struct_init ( #13495 )
2022-02-17 10:21:03 +03:00
Delyan Angelov
89b99ad4c3
scanner: remove the restriction for \x00 in strings ( #13493 )
2022-02-16 23:41:05 +02:00
blackshirt
54b10e99a1
ed25519: make public ed25519.internal.edwars25519.Element ( #13488 )
2022-02-16 22:56:14 +02:00
Tarcisio Gruppi
f68144774d
fmt: fix map missing a comma after enum keys, leading to non parsable code ( #13481 )
2022-02-16 21:08:29 +02:00
yuyi
f8b8950b96
checker: check mut interface arguments ( #13479 )
2022-02-16 11:53:41 +02:00
Alexander Medvednikov
5a14748e7c
cgen: c2v enum fix
2022-02-16 12:05:32 +03:00
Delyan Angelov
9c24d09dc3
strconv: bug fix for "${239.5:0.0f}" ( #13483 )
2022-02-16 11:33:29 +03:00
starryskye
6d2a88e31f
net.smtp: add STARTTLS and implicit SSL support ( #13473 )
2022-02-16 09:18:51 +02:00
vyrus001
d4fc8601e0
builder: fix clang failing to link on windows due to an -ftlo error ( #13470 )
2022-02-16 09:13:26 +02:00
blackshirt
3ac4155f0c
crypto: add an ed25519 digital signature module ( #13476 )
2022-02-15 21:28:14 +02:00
Delyan Angelov
ff34b79d39
crypto: implement rand.bytes(needed_bytes int) ?[]byte
, use it consistently instead of the old rand.read(), which will change to be compatible with io and the pseudo random rand
module
2022-02-15 18:39:33 +02:00
Larpon
80444c8ec4
strings: add find_between_pair ( #13468 )
2022-02-15 15:12:15 +02:00
Delyan Angelov
d25652fbcf
parser, ast: support -d for trace_rewrite_already_registered_symbol, trace_register_sym, trace_parse_stmt, trace_parse_comptime, trace_parse_text, trace_parse_file, trace_parse_vet_file
2022-02-15 13:20:40 +02:00
yuyi
fb3dd82400
cgen: fix interface embedding complex cases ( #13472 )
2022-02-15 12:41:40 +02:00
yuyi
f9fc136c24
all: rename InterfaceDecl.ifaces to InterfaceDecl.embeds ( #13475 )
2022-02-15 11:17:39 +02:00
crthpl
e23db2f9b7
cgen: fix autogen free method for struct with shared field ( #13469 )
2022-02-15 03:55:06 +02:00
yuyi
dc0b0c83c6
ast: fix error for interface embedding call ( #13466 )
2022-02-14 19:22:44 +02:00
Delyan Angelov
f8bf3db568
markused: always include slice_ni & substr_ni too (support s#[] and a#[] in -skip-unused)
2022-02-14 19:05:30 +02:00
yuyi
8119a297f7
ast: fix error for 'struct embed is interface' ( #13465 )
2022-02-14 13:43:36 +02:00
yuyi
b2f984280b
checker: strengthen the judgment of generic type parameters replacement, merge generic type init tests ( #13460 )
2022-02-14 02:38:47 +02:00
yuyi
2e0f8ee9e2
ast: fix error for struct embedding with interface ( #13457 )
2022-02-14 02:33:47 +02:00
Vincenzo Palazzo
bf11df40e2
readline: give the possibility to ignore the empty line in the history ( #13452 )
2022-02-14 00:12:25 +02:00
blackshirt
57e850e932
crypto.sha512, crypto.sha256 : Make public the write()
and sum()
methods ( #13461 )
2022-02-14 00:10:50 +02:00
Delyan Angelov
74048e2f17
net: simplify the TcpConn.read_line/0 method, accumulate partially read lines, use a string builder, instead of concatenation
2022-02-13 22:42:38 +02:00
Vincenzo Palazzo
6ea4f361a1
urllib: fixed regression in the set function ( #13455 )
2022-02-13 15:06:00 +02:00
Delyan Angelov
bad30bdd79
os: allow using XDG_CACHE_HOME for choosing the folder returned by os.cache_dir()
on windows too
2022-02-13 11:18:51 +02:00
yuyi
5071a54b99
cgen: split up into for.v, match.v, struct.v ( #13454 )
2022-02-13 07:52:49 +03:00
yuyi
b5379255da
checker, cgen: fix error for struct embed with fn type ( #13450 )
2022-02-12 20:55:40 +02:00
Delyan Angelov
a74d28ae5f
sync,ci: bump vtest retry for channel_select_6_test.v
2022-02-12 19:22:27 +02:00
Delyan Angelov
799c95dc4e
tests: filter test_ fns with params from the list of automatically run test functions ( fix #13443 )
2022-02-12 17:30:20 +02:00
Delyan Angelov
11a0df5bee
tests: rename struct_with_reference_alias_field.v to struct_with_reference_alias_field_test.v
2022-02-12 15:29:22 +02:00
crthpl
0eee012ae9
cgen: fix x in shared_map
( #13442 )
2022-02-12 11:55:25 +02:00
Tim Basel
37c151efe5
docs, builtin, encoding.csv: update error implementations ( #13440 )
2022-02-12 11:54:10 +02:00
yuyi
ae0e90f5d8
cgen: fix struct init with embed field update ( #13444 )
2022-02-12 08:16:51 +03:00
yuyi
7178367de0
all: fix error for comptime for in field with generic fn ( fix #13409 ) ( #13439 )
2022-02-11 22:00:13 +02:00
Tim Basel
9d0a5942ac
builtin: change IError msg
and code
to methods + fix vlib, add a deprecation notice for the old usages ( #13041 )
2022-02-11 15:52:33 +02:00
Vincenzo Palazzo
61024d4b75
repl: support aliased module imports too ( #13423 )
2022-02-11 15:03:14 +02:00
Juergen Donnerstag
654bc49d3c
os: implement win_read_string on os.Process ( #13428 )
2022-02-11 13:02:00 +02:00
yuyi
a21f4563b3
checker: check the arity and the kinds of the type parameters in generic struct inits ( #13429 )
2022-02-11 11:21:07 +02:00
Vincenzo Palazzo
7f29418c63
strconv: change atof64 to return an error, if the parsed value is not a valid number ( #13424 )
2022-02-10 13:27:32 +02:00
Delyan Angelov
9ed18efa53
checker: error on redefining any of the public builtin functions, not just ['print', 'println', 'eprint', 'eprintln', 'isnil', 'panic', 'exit'] ( #13419 )
2022-02-10 12:26:30 +02:00
yuyi
f2eb50008d
parser, checker: cleanup struct short syntax processing ( #13416 )
2022-02-09 18:31:16 +02:00
Vincenzo Palazzo
0d1d259bb4
net.urllib: keep the query parameter order ( #13405 )
2022-02-09 17:36:12 +02:00
yuyi
4be3c92640
checker: check generic struct init without type parameter ( #13404 )
2022-02-09 14:06:45 +02:00
Delyan Angelov
356ccf247f
cgen: add an earlier error, to pin point the use of closures on windows
2022-02-09 08:35:11 +02:00
Delyan Angelov
dd835acb8d
sync: add Once.do_with_param/2 method in addition to the existing Once.do/1 (workaround the absence of closures on windows)
2022-02-08 17:15:28 +02:00
playX
4ef7d26133
arrays: add rotate_left and rotate_right ( #13388 )
2022-02-07 13:20:45 +02:00
Vincenzo Palazzo
10dcb2e0d9
parser: allow embedding interfaces from other modules ( #13385 )
2022-02-07 00:20:34 +02:00
Delyan Angelov
1dc239227d
docs, builtin: clean up the homepage of modules.vlang.io a little, do not use //==== comments for now in builtin
2022-02-06 23:51:40 +02:00
Delyan Angelov
191e99c248
v.doc: use the .parse_comments mode, instead of the older .toplevel_comments (the scanner/parser is now more robust)
2022-02-06 23:49:21 +02:00
Vincenzo Palazzo
d46ac40758
checker: add error for assigning none
values ( #13383 )
2022-02-06 16:08:23 +02:00
div72
939bc9f26f
v.parser: fix compilation of normal .v files with -translated ( #13363 )
2022-02-06 12:53:20 +02:00
Delyan Angelov
66f21cae55
rand: add pub fn rand.read(mut buf []byte)
and pub fn rand.bytes(needed int) ?[]byte{}
+ tests
2022-02-06 10:54:34 +02:00
yuyi
ece73836aa
cgen: fix error for struct with reference alias field ( #13380 )
2022-02-06 10:52:36 +02:00
Vincenzo Palazzo
4e13ee22e9
repl: reproduce the void print function error ( #13372 )
2022-02-06 08:05:25 +02:00
Alexander Medvednikov
f23d2c8cf4
cgen: c2v variadic fixes
2022-02-06 03:36:38 +03:00
div72
cec7e91714
v.parser, v.checker, v.gen: add support for [translated] tag ( #13373 )
2022-02-06 00:16:02 +02:00
Sandro Martini
054c8b1f13
log: update Logger interface, so that Log is usable even as a Logger instance; add a test to ensure it ( #13376 )
2022-02-05 22:09:55 +02:00
Delyan Angelov
5faabe7464
Revert "cgen: fix error for struct with reference alias fields ( #13374 )"
...
This reverts commit 4d485ae687
.
2022-02-05 18:52:37 +02:00
yuyi
4d485ae687
cgen: fix error for struct with reference alias fields ( #13374 )
2022-02-05 18:23:54 +02:00
Asher
47ee292ba4
vweb: make Context.mount_static_folder_at more robust ( #13361 )
2022-02-05 15:10:26 +02:00
yuyi
173b4652fb
parser: check orm sql statements, using undefined variables in where expr ( fix #13367 ) ( #13368 )
2022-02-05 11:32:41 +02:00
Vincenzo Palazzo
c9a8d6448d
fmt: preserve formatting with comments in a empty map ( #13362 )
2022-02-05 10:05:35 +02:00
Vincenzo Palazzo
b9fce4ef09
checker: make sure that the operator check is made on the concrete type ( #13360 )
2022-02-05 00:11:24 +02:00
Delyan Angelov
a054f868a0
v.util: use a normalised relative file path in the error messages with /, even on windows, to make the compiler error tests more robust
2022-02-04 17:56:08 +02:00
Delyan Angelov
d02c0636d8
encoding.hex: fix shift warning
2022-02-04 15:16:08 +02:00
yuyi
a61b4809dc
ast, parser, checker: fix generic struct init with inconsistent generic types ( #13359 )
2022-02-04 14:24:38 +02:00
Delyan Angelov
85d36ed231
checker: stricter type casting error messages
2022-02-03 14:18:30 +02:00
yuyi
be1e40dac0
cgen: fix error for sql statement inside fn call ( fix #13330 ) ( #13346 )
2022-02-02 18:05:31 +02:00
Delyan Angelov
9344c27021
builtin: save a call to array.ensure_cap in array.insert, array.push, array.push_many in most cases
2022-02-02 11:01:07 +02:00
crthpl
c0c07db7cc
cgen: fix struct field init from shared struct field ( #13343 )
2022-02-02 10:55:57 +02:00
penguindark
c3573454d1
regex: fix bug in replace_by_fn ( #13344 )
2022-02-02 10:52:18 +02:00
yuyi
b10b65e134
cgen: fix error for interface with multi-nested embed struct ( #13345 )
2022-02-02 09:11:29 +02:00
Delyan Angelov
b2c299da48
vweb: support vweb.run_at(app, localhost, 8099)
( #13337 )
2022-02-01 18:41:12 +02:00
Delyan Angelov
d8cce0a71d
ci: fix cgen for interface_struct_with_multi_nested_embed_test.v for gcc/clang
2022-02-01 17:12:15 +02:00
yuyi
a014844050
cgen: fix error for interface with multi nested embed structs ( fix #13331 ) ( #13336 )
2022-02-01 14:50:12 +02:00
Tarcisio Gruppi
51513ae19a
vfmt: keep file permissions with -w on !windows ( #13334 )
2022-02-01 14:49:06 +02:00
penguindark
7c1b249da0
regex: fix dot char problems on groups with * ( #13333 )
2022-02-01 13:49:37 +02:00
Delyan Angelov
db50e79d26
tools: implement cgen
tag for Markdown examples in v check-md
( #13332 )
2022-01-31 22:51:04 +02:00
yuyi
b34860e39b
ast, checker: fix error for calling complex nested generic type function ( fix #13025 ) ( #13328 )
2022-01-31 13:00:27 +02:00
Delyan Angelov
46a096b95d
Revert "v.util: make mod_path_to_full_name more robust"
...
This reverts commit b11ce91141
.
2022-01-31 06:57:50 +02:00
Delyan Angelov
b11ce91141
v.util: make mod_path_to_full_name more robust
2022-01-30 22:26:36 +02:00
Delyan Angelov
96c8188083
builtin: fix warnings for tests inside vlib/builtin/js
2022-01-30 16:36:56 +02:00
Delyan Angelov
f6cb772347
v.util: prepare for removing vlib/v/util/module.v - improve tracing, comment edge cases with actual data
2022-01-30 15:08:33 +02:00
Merlin Diavova
f3683b7cdc
os: add an .exit_code field to os.Command ( #13321 )
...
* Added os.Command.exit_code
* vfmt vlib/os/os_test.v
* extract os.Command to os.v, add a dummy panicing implementation on windows, just for parity, fix os_test.v on macos, skip test_command on windows.
Co-authored-by: Merlin Diavova <md@merlindiaova.org>
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2022-01-30 00:44:52 +02:00
Delyan Angelov
eb7f152f3d
gg: add a temporary import for gx + a gg.Color type alias for gx.Color, without using it
2022-01-29 21:42:19 +02:00
Delyan Angelov
afd3ca8273
gx: implement C1.over(C2), add gx.cyan and gx.magenta, fix + and - ops, add more tests
2022-01-29 21:40:09 +02:00
Benjamin Stigsen
a4fb5d2cfd
Fix gx.Color math operations ( #13315 )
2022-01-28 22:53:14 +02:00
Delyan Angelov
44dddecc09
builtin: use a pure V version of string.to_wide() on != windows ( #13314 )
2022-01-28 20:41:50 +02:00
Ken
e43794ad61
picoev: remove unused #flag
( #13311 )
2022-01-28 20:36:41 +02:00
Benjamin Stigsen
ceb05b163a
strings: rename Builder.write_b() to Builder.write_byte(), add deprecation ( #13313 )
2022-01-28 20:34:44 +02:00
Delyan Angelov
71d98717dc
checker: small cleanup of commit edc6c9e
2022-01-28 11:03:15 +02:00
Yamada Hayao
edc6c9e24f
checker: show error instead of panic, when using a somemodule.NonExistingEnum.enum_value
( #13295 )
2022-01-28 11:02:51 +02:00
Delyan Angelov
8491e83e3f
ci: bump retries to 8 for vlib/net/tcp_test.v
2022-01-28 10:07:37 +02:00
Larpon
41b9b2988a
examples: add port of simple triangle sokol sample ( #13298 )
2022-01-27 21:16:00 +02:00
Delyan Angelov
eb765f975c
ci: add a small delay between failed test retries. bump retries for channel_select_6_test.v to 8
2022-01-27 17:43:55 +02:00
Delyan Angelov
daa5be4c27
ci: skip vlib/v/checker/tests/modules/deprecated_module on windows for now
2022-01-27 15:38:52 +02:00
yuyi
9dce8194a8
cgen: fix error of method calls on nested embedded structs ( #13292 )
2022-01-27 13:20:56 +02:00
Delyan Angelov
f8f7bc8ead
ci: fix deprecated_module.out file too
2022-01-27 13:16:25 +02:00
Delyan Angelov
ebad7301f9
ci: fix failing deprecated_module test on windows
2022-01-27 13:15:34 +02:00
Delyan Angelov
e1a2ab345d
parser,ast,checker: add support for [deprecated: "use another module"] module obsolete
2022-01-27 12:34:14 +02:00
yuyi
3bd528b218
ast, checker, cgen: fix error for map sumtype value init ( #13290 )
2022-01-27 09:44:34 +02:00
Delyan Angelov
3fa9128716
cgen,pref: support -profile-fns strings__new_builder,i64_str -profile -
2022-01-26 20:39:47 +02:00
JalonSolov
01c72d44e8
net.http: add allow_redirect to FetchConfig ( #13285 )
2022-01-26 17:13:10 +02:00
Delyan Angelov
2d184559b6
ci: fix failing draw_fns_api_test.v on macos (after rename)
2022-01-26 15:32:06 +02:00
yuyi
291a1ffd8d
token: rename Position to Pos, rename position() to pos() ( #13279 )
2022-01-26 12:36:28 +02:00
yuyi
d71fc0d13f
checker: fix error for cast to alias of reference struct ( #13278 )
2022-01-26 12:32:14 +02:00
kahsa
867056dafb
gg: rename some variables (for consistency) ( #13280 )
2022-01-26 12:26:12 +02:00
Delyan Angelov
0979723636
gg: improve small circle (r<20) looks
2022-01-26 10:32:14 +02:00
Delyan Angelov
469282b20d
builtin: cleanup [trusted] tags for C function declarations
2022-01-25 19:31:40 +02:00
Alexander Medvednikov
4715fb67c1
checker: c2v fixes for enums and pointer to numbers
2022-01-25 20:15:45 +03:00
Tim Basel
1fdbdf4a6b
cli: make help fn's public ( #13275 )
2022-01-25 15:58:06 +02:00
Larpon
28ddd8440a
term.ui: add support for multi byte/UTF-8 events ( #13274 )
2022-01-25 14:46:48 +02:00
yuyi
ca1f675dba
ast, checker, cgen: implement if guard with multi return optional ( #13273 )
2022-01-25 14:36:33 +02:00
Subhomoy Haldar
fe77e64b3e
os: remove trim_space() in os.execute() on windows, to make implementations consistent ( #13272 )
2022-01-25 14:09:56 +02:00
Delyan Angelov
a913983408
ci: fix -cstrict jobs (use U postfix for u64 hash constants in embed.v)
2022-01-25 12:50:19 +02:00
crthpl
009a65b1fc
cgen: fix appending an array to a shared array ( #13265 )
2022-01-25 12:05:43 +02:00
Delyan Angelov
5f38ba896e
parser,cgen: handle const x = $embed_file("file.txt").to_string()
2022-01-25 11:40:07 +02:00
Delyan Angelov
32f2f0dfa1
term.ui: fix shift notices, remove warning for main example
2022-01-24 20:11:36 +02:00
yuyi
509a8fcaf1
cgen: fix 'for in mut val' with 'if val in' ( #13263 )
2022-01-24 17:08:21 +02:00
Delyan Angelov
1cea7b0c73
ci: vfmt vlib/net/http/request.v
2022-01-24 14:33:12 +02:00
kahsa
387b2db658
gg: cleanup reordering for readablity ( #13258 )
2022-01-24 14:12:34 +02:00
Delyan Angelov
0347dadf75
ci: vfmt checker.v
2022-01-24 14:01:35 +02:00
ZoaR
4ba9a2ffbe
net.http: implement a Request.allow_redirect field (true by default) ( #13259 )
2022-01-24 14:00:30 +02:00
yuyi
3bfad1b943
checker: fix method call errors for generic struct instances ( #13261 )
2022-01-24 12:45:19 +02:00
skurgs
7fd08eca96
checker: fix c error on improper string to rune cast ( #13197 ) ( #13257 )
2022-01-24 12:13:22 +02:00
Alexander Medvednikov
216a505c2a
builtin: more libc fn definitions
2022-01-24 06:14:31 +03:00
yuyi
edf0bc365c
checker: fix ui struct init error with default field value is const variable ( #13215 )
2022-01-23 18:37:52 +02:00
Benjamin Stigsen
4e0e2ef753
gg: additions, changes and fixes ( #13255 )
2022-01-23 18:18:17 +02:00
Delyan Angelov
34f0d442df
ci: separate other_ci.yml and paths_ci.yml; simplify make.bat ( #13254 )
2022-01-23 12:50:19 +02:00
Delyan Angelov
86a2562fa7
ci: skip repl_test.v on windows for now
2022-01-23 01:37:03 +02:00
Delyan Angelov
657270faa8
ci: show more details for REPL tests on windows
2022-01-23 01:37:03 +02:00
Delyan Angelov
86930873ac
ci: fix vsh_envbang_test.v
2022-01-23 01:37:02 +02:00
Delyan Angelov
fba9587323
ci: fix compiler_errors_test.v too
2022-01-23 00:09:32 +02:00
Delyan Angelov
359b674cff
ci: fix more failing tests
2022-01-22 23:18:09 +02:00
Delyan Angelov
9057e9f1dd
ci: fix vls compilation
2022-01-22 23:08:30 +02:00
Delyan Angelov
62c3ad4953
use os.quoted_path more
2022-01-22 22:22:22 +02:00
Delyan Angelov
fa6f7d4c83
os: add os.quoted_path/1, use it consistently for running V itself
2022-01-22 21:13:28 +02:00
Delyan Angelov
85ec0248e9
ci: rename types_test.v to toml_types_test.v
...
This is a workaround for a concurency bug, occuring sporadically when
test file names in different folders are duplicate.
The duplicate in this case was with vlib/v/ast/types_test.v
2022-01-22 20:25:06 +02:00
Delyan Angelov
9ebd56caa7
cgen,json: bugfix for json.decode; now [skip]
fields are initialised
2022-01-22 19:29:38 +02:00
yuyi
e66e35ced1
json: fix error for json encoding sumtype value ( #13248 )
2022-01-22 17:55:19 +02:00
Larpon
839ae6b2e4
toml: fix a doc string ( #13246 )
2022-01-22 10:27:16 +02:00
Larpon
2b4f7e7685
toml: add encode<T>
and decode<T>
( #13244 )
2022-01-21 21:21:31 +02:00
Larpon
7ae96f0e38
toml: add support for arrays and maps of primitives in reflect<T>
( #13245 )
2022-01-21 21:20:44 +02:00
crthpl
cbd3c14e83
cgen: fix codegen for struct field with a shared array of points ( #13222 )
2022-01-21 17:08:19 +02:00
yuyi
ffb263c2e1
ast: minor cleanup of commented struct Field ( #13231 )
2022-01-21 15:00:21 +02:00
yuyi
05ff8f516d
ast: fix error for generic sumtype init in generic fn call ( #13238 )
2022-01-21 14:46:55 +02:00
Charles WANG
79cb0db2ff
gg: add a working implementation for screen_size() on windows ( #13237 )
2022-01-21 14:43:12 +02:00
Tim Basel
6c8e7f53b5
transformer: fix some missing stmt
assignments ( #13236 )
2022-01-21 12:11:10 +02:00
yuyi
edbb39b81d
checker: correct error message of struct_decl() ( #13240 )
2022-01-21 12:10:09 +02:00
Delyan Angelov
295156e054
checker,cgen: implement v.profile.on/1, support [if profile]
and -d no_profile_startup
( #13232 )
2022-01-21 03:26:05 +02:00
Delyan Angelov
9e0156b46a
net: copy the freebsd address declarations for netbsd, openbsd, dragonfly
2022-01-20 20:15:50 +02:00
Delyan Angelov
62687842e2
Revert "math: add a new math.easing module ( #13226 )" ( #13235 )
...
This reverts commit 758d1f44ab
.
2022-01-20 18:57:53 +02:00
kahsa
758d1f44ab
math: add a new math.easing module ( #13226 )
2022-01-20 14:17:47 +02:00
yuyi
7c9cd855b4
cgen: fix fn call with fixed array literal arguments ( #13225 )
2022-01-20 15:04:16 +03:00
yuyi
d553071e65
parser, checker: correct error message for a fixed array size using a non constant ( fix #13219 ) ( #13228 )
2022-01-20 13:03:19 +02:00
yuyi
09797e493e
checker: check generics undefined operation of infix expression ( #13223 )
2022-01-20 08:57:25 +02:00
Tim Basel
14b33baa3b
transformer: refactor + apply transform to (hopefully) all nodes ( #13216 )
2022-01-20 08:40:16 +02:00
Wertzui123
d67be6302b
gg: add the gg.Context.remove_cached_image_by_idx() method ( #13206 )
2022-01-20 08:10:09 +02:00
yuyi
ba3308296b
ast: rename register_type_symbol to register_sym ( #13217 )
2022-01-19 20:16:23 +02:00
Delyan Angelov
d63f395061
runtime: simplify nr_cpus
2022-01-19 19:29:29 +02:00
Tim Basel
d714dcef75
cgen: fix return of mut symtype ( #13214 )
2022-01-19 14:37:40 +02:00
Alexander Medvednikov
38d3239b50
checker: c2v fixes
2022-01-19 15:26:24 +03:00
playX
c48a9e71f5
math.unsigned: add uint128 tests ( #13213 )
2022-01-19 11:18:46 +02:00
jeffmikels
7a2705d8ce
scanner: multibyte rune literals now support unicode, hex, and octal escape codes ( #13140 )
2022-01-19 03:23:25 +03:00
Tim Basel
bb6c46e1ef
gen: fix mut sumtype arguments for fields ( #13205 )
2022-01-18 19:53:09 +02:00
Delyan Angelov
95b0c3789f
docs: improve pub fn comments for the flag
module
2022-01-18 18:38:27 +02:00
yuyi
ef562c92a5
cgen: fix assigning a new value to the mut sumtype receiver ( #13204 )
2022-01-18 16:16:15 +02:00
Delyan Angelov
40a5c5c1a0
parser: make the $tmpl subparser more robust. The legacy .html mode, is now ON, only for .html template files.
...
Implement a .simple default mode, with *minimum* heuristcs, and only
supporting expansion of @expressions, @include, @if, @else, @for, @end.
The existing .html mode, with its complex state transitions for html/js/css
and heuristics, is now used *only* for template files, that have the `.html`
extension.
2022-01-18 14:57:45 +02:00
yuyi
f0b7e5049b
parser: check the receiver error of method call ( #13203 )
2022-01-18 12:47:06 +02:00
Delyan Angelov
d8263171ff
math.mathutil: remove deprecated mathutil_test.v (workaround spurious test failures, due to same _test.v name)
2022-01-17 17:52:57 +02:00
yuyi
39f80840d7
checker: check type mismatch in args of generics method calls ( fix #13193 ) ( #13196 )
2022-01-17 16:48:59 +02:00
Delyan Angelov
4597c74d1a
markused: fix v -gc boehm -skip-unused cmd/vls
2022-01-17 16:32:40 +02:00
trueFireblade
727c9fb4a1
all: add string range OrExpr ( #13189 )
2022-01-17 13:03:10 +03:00
Delyan Angelov
d1ac22e3bb
math.unsigned: small fix after rename
2022-01-17 11:35:02 +02:00
yuyi
851f265a5e
cgen: minor cleanup in match_expr() ( #13192 )
2022-01-17 11:26:20 +02:00
playX
8de1934f51
math: add an unsigned
module, implementing Uint128, Uint256 and methods on them ( #13186 )
2022-01-17 11:23:21 +02:00
yuyi
31615d67c4
ast: fix typos in resolve_init() ( #13191 )
2022-01-17 11:00:57 +02:00
Hunam
db48594bd4
datatypes: add an index method on LinkedList and Queue ( #13185 )
2022-01-16 19:11:10 +02:00
Delyan Angelov
2a3a4cfc84
math.bits: fix bits.div_64 behaviour for leading_zeros_64(y) = 0
2022-01-16 18:11:23 +02:00
yuyi
315b2deda9
cgen: fix match sumtype var returning sumtype value ( #13184 )
2022-01-16 13:12:27 +02:00
Delyan Angelov
6485b6eeb7
tests: skip valgrind tests, when valgrind is not present
2022-01-15 10:15:38 +02:00
yuyi
dfc23d939f
ast, checker, cgen: fix array of sumtype initialisation with a default init:
( #13178 )
2022-01-15 09:59:38 +02:00
playX
7fe62a8b3e
js,os: fix return
in or
blocks; Properly get path_delimiter and path_separator in JS ( #13179 )
2022-01-15 09:55:03 +02:00
trueFireblade
9fd65b5b18
checker: fix unrecognised empty argument names in anon fn's ( #13176 )
2022-01-15 08:23:30 +02:00
jeffmikels
f19197f9b0
builtin: make array.insert_many and array.prepend_many private ( #13172 )
2022-01-14 19:47:17 +02:00
yuyi
879d1d2f11
cgen: fix generics method with sumtype arguments ( #13166 )
2022-01-14 18:45:12 +02:00
playX
104e0c5692
js: fix break and continue in or blocks ( #13165 )
2022-01-14 18:43:18 +02:00
jeffmikels
9329b6c8c8
builtin: add more documentation ( #13160 )
2022-01-14 17:27:38 +02:00
yuyi
4660220f4c
util: fix the potential error of js_builder command ( #13170 )
2022-01-14 15:49:24 +02:00
jeffmikels
70aedaf184
builtin: add a string.parse_int/2 method (wrapping strconv.parse_int/3) ( #13164 )
2022-01-14 00:31:11 +02:00
jeffmikels
4189b7e280
builtin: add a byterune
method on []byte
( #13145 )
2022-01-13 22:26:17 +02:00
yuyi
155f897270
ast, parser, checker: fix generic struct field with default struct value ( #13158 )
2022-01-13 22:25:25 +02:00
Larpon
7fbd856bf8
os: add font module, move from gg ( #13144 )
2022-01-13 12:16:18 +02:00
yuyi
547169674d
cgen: fix fn call with mut sumtype argument ( #13143 )
2022-01-12 18:36:19 +02:00
Delyan Angelov
b658b65774
scanner,cgen,vfmt: keep original when using byte char literals, test all 256 byte values in the C backend
2022-01-12 14:45:38 +02:00
yuyi
89165ed259
cgen: minor cleanup in comptime_if_cond() ( #13142 )
2022-01-12 11:40:11 +02:00
jeffmikels
f99b79480d
cgen: reduce memory allocation and improve performance of cescape_nonascii ( #13141 )
2022-01-12 10:58:37 +02:00
jeffmikels
ab642cac43
scanner, cgen: improve support for escape codes in backticks/runes ( #13127 )
2022-01-11 22:36:18 +02:00
Delyan Angelov
c27ffc6054
ci: vfmt fmt.v ...
2022-01-11 17:32:15 +02:00
yuyi
f3d8bbdf3d
cgen: fix $if T.typ is Type {
( #13135 )
2022-01-11 16:25:16 +02:00
Tim Basel
10efe47f03
parser: add support for mutable if guards ( #13132 )
2022-01-11 15:32:58 +02:00
Delyan Angelov
ecc7accc8e
tests: test with valgrind rune.bytes(), fix leak in .str_escaped()
2022-01-11 15:23:40 +02:00
Delyan Angelov
8acd84d04a
builtin: reduce allocations in rune.bytes()
2022-01-11 15:23:39 +02:00
Ekopalypse
cb684b5c64
builtin: allow msvc users to link against a custom compiled Boehm library ( #13133 )
2022-01-11 15:23:21 +02:00
yuyi
1e52b2c134
cgen: fix cast in the index of reference fixed array ( fix #13128 ) ( #13131 )
2022-01-11 10:55:29 +02:00
jeffmikels
078229f213
builtin: add a rune.bytes() convenience method ( #13129 )
2022-01-11 09:55:51 +02:00
yuyi
791972ebc9
checker: check error for match conditions with parenthesis ( #13130 )
2022-01-11 09:50:20 +02:00
playX
65eb383cfd
dlmalloc: add a temporary workaround for a segfault ( #13120 )
2022-01-10 15:54:23 +02:00
Delyan Angelov
da0b89cc57
tools: improve support for renamed v executables (vlang self
now works too)
2022-01-10 15:45:28 +02:00
playX
c07ce3ff15
cgen,json2: improve -nofloat support ( #13117 )
2022-01-10 12:42:41 +02:00
yuyi
4ce6e663bf
cgen: check error for comptime call method argument ( #13115 )
2022-01-10 12:03:50 +02:00
yuyi
02f791d9fe
checker: fix returning optional empty map ( #13113 )
2022-01-10 09:12:46 +02:00
yuyi
236a1d0255
cgen: fix error for print comptime for method call ( #13108 )
2022-01-09 19:00:23 +02:00
yuyi
0ac450927c
checker: check array init with a void type value ( #13106 )
2022-01-09 16:53:37 +02:00
yuyi
86ba4517b1
parser: check error of anon fn argument type ( #13103 )
2022-01-09 16:15:34 +02:00
jeffmikels
5e5d62ed4c
arrays,docs: remove arrays.zip; improve docs ( #13082 )
2022-01-09 16:12:33 +02:00
kahsa
e2a0046849
net.html: add Tag.get_tags() ( #13102 )
2022-01-09 16:07:12 +02:00
penguindark
22fce6a525
sokol: update sokol_gfx.h to the LAST version, and fix example 06 ( #13100 )
2022-01-08 20:29:29 +02:00
yuyi
64c8fb061d
ast: fix generics with nested generic type parameter ( fix #13077 ) ( #13088 )
2022-01-08 19:19:45 +02:00
Ekopalypse
64028eedb8
toml: fix comment ends with crlf ( #13097 )
2022-01-08 19:16:32 +02:00
688862
83e9585d06
crypto: crypto.aes CBC mode moves to crypto.cipher ( #13084 )
2022-01-08 17:08:46 +02:00
Delyan Angelov
b778c1d097
net: make listen/bind errors more informative
2022-01-08 17:02:03 +02:00
Ken
9cbfa882e6
ast: support attributes for ast.SumType
( #13010 )
2022-01-08 17:35:10 +03:00
playX
4d166e3b55
all: add support for -os wasm32
(needs clang-12 installed for now) ( #13094 )
2022-01-08 11:06:32 +02:00
Delyan Angelov
ec55c0fcd2
docs: add vlib/builtin/wasm_bare to vlib/.vdocignore
2022-01-08 09:25:38 +02:00
playX
ac7e79ffd2
dlmalloc: fix WASM codegen bug ( #13090 )
2022-01-08 08:40:23 +02:00
Larpon
5cffa1a2e4
sokol: use V type for SG_SHADERSTAGE_[VS|FS] ( #13086 )
2022-01-07 19:52:44 +02:00
Delyan Angelov
5717066147
ci: fix $tmpl
regression detected by gitly tests (after a73e146
)
2022-01-07 19:19:31 +02:00
Larpon
3e9c1c1a3a
sokol: rename sapp consts, remove sapp prefix ( #13083 )
2022-01-07 18:01:07 +02:00
Larpon
17911432b9
android: fix and test compilation to raw Android C code ( #13080 )
2022-01-07 16:57:05 +02:00
Artem
a73e1462f0
tmpl.v: fix of is_html_open_tag function and allow usage of V template sign '@' in JS code ( #13067 )
2022-01-07 14:31:32 +02:00
Delyan Angelov
d3317cbd4f
tests: rename reference_var_followed_block_expr.v to reference_var_followed_block_expr_test.v
2022-01-07 14:11:53 +02:00
Delyan Angelov
571aa1bac9
tests: rename go_wait_with_fn_of_interface_para.v to go_wait_with_fn_of_interface_parameter_test.v
2022-01-07 14:08:44 +02:00
Delyan Angelov
26c63461f4
tests: rename testcase_leak.v to testcase_leak.vv
2022-01-07 14:05:46 +02:00
688862
2b42ea9883
crypto: add a crypto.des module ( #13065 )
2022-01-07 13:51:37 +02:00
Larpon
7276705684
checker: add support for apk comptime if ( #13079 )
2022-01-07 13:38:21 +02:00
jeffmikels
6e6d51a1c9
docs: add more documentation to each of the modules in vlib ( #13043 )
2022-01-07 13:28:50 +02:00
playX
287331bc19
builtin: add builtin/wasm_bare ( #13078 )
2022-01-07 13:16:06 +02:00
yuyi
c9d8fecc75
cgen: fix string range index in for mut var in ( #13076 )
2022-01-07 13:00:48 +02:00
yuyi
5bc72c9c01
cgen: fix comptime call in fn call ( #13075 )
2022-01-07 12:59:27 +02:00
Ken
7dc64de360
checker: fix error for cast to u8 ( #13072 )
2022-01-07 12:54:11 +02:00
Delyan Angelov
60527a5655
ci: run vfmt over cast_to_u8_test.v
2022-01-06 18:41:52 +02:00
yuyi
1c382ad2b4
checker: fix error for cast to u8 ( #13058 )
2022-01-06 18:36:31 +02:00
yuyi
1654d8b810
checker: fix generics with nested generic fn inst call ( #13059 )
2022-01-06 18:33:37 +02:00
Larpon
6dca022caf
sokol: fix missing import in sfons
. Fixes #13061 ( #13062 )
2022-01-06 18:21:41 +02:00
Delyan Angelov
8088f462c9
parser: fix parsers producing codegen statements (for [flag] enum MyEnum{}
) with mixed scope
2022-01-06 18:02:52 +02:00
Larpon
214853c373
sokol: small fixes to screenshot functions and docs ( #13055 )
2022-01-06 14:11:40 +02:00
playX
ec91de3504
builtin: use dlmalloc for -freestanding
( #13054 )
2022-01-06 14:10:37 +02:00
yuyi
fb66ec7cfb
cgen: fix codegen for aliases of fixed arrays of structs ( fix #13037 ) ( #13049 )
2022-01-06 11:54:22 +02:00
kahsa
fca699a439
net: add address_android.c.v to fix compilation for Android ( #13052 )
2022-01-06 11:48:30 +02:00
kahsa
075cd29c14
sqlite: add busy_timeout() ( #13053 )
2022-01-06 11:47:20 +02:00
Larpon
3ae4513e2e
sokol: update to floooh/sokol from 27-Dec-2021 (4ff3ed7) ( #13044 )
2022-01-05 18:23:14 +02:00
playX
70a0aab72b
vlib: add a dlmalloc module ( #12974 )
2022-01-05 18:17:47 +02:00
jeffmikels
a60b381d5e
docs: adding skeleton README.md files for all vlib modules ( #13034 )
2022-01-05 18:06:08 +02:00
Delyan Angelov
59357e873d
math: move the math.mathutil
generic min
/max
/abs
fns to math
( #13042 )
2022-01-05 18:02:20 +02:00
spaceface
de711da774
cgen: support larger closure parameters ( #13040 )
2022-01-05 16:22:20 +02:00
Tim Basel
897bbb7da5
cgen: fix cgen removing random chars from parameter_name ( #13038 )
2022-01-05 13:06:06 +02:00
Delyan Angelov
d3489d4246
builtin: s.trim_prefix/1 -> s.trim_string_left/1, s.trim_suffix/1 -> s.trim_string_right/1
2022-01-05 12:49:22 +02:00
Delyan Angelov
57fa9768d5
checker: update error message for if 'a' in 'abcd' {
2022-01-05 12:21:17 +02:00
yuyi
ba9aad1d92
checker: fix cast to byte in comptime if ( #13036 )
2022-01-05 09:27:10 +02:00
Delyan Angelov
89ac2a37c5
checker: add error for for x in t {
, where t.next()
returns multiple values
...
(Fix #9459 ).
2022-01-05 00:46:44 +02:00
Delyan Angelov
b3930c3d6a
checker: add error for .map() calling a fn with multiple return values (prevent inaccessible tuple leak)
2022-01-04 23:10:58 +02:00
yuyi
6c1ae4f689
ast: simplify mktyp() ( #13028 )
2022-01-04 18:37:18 +02:00
Delyan Angelov
0f01236e52
strconv: fix assert .f64() == 0
2022-01-04 17:51:48 +02:00
yuyi
b2538e83da
checker: fix generic fn using generic type in if expr ( #13027 )
2022-01-04 16:04:15 +02:00
yuyi
b94c5c2a9c
ast: fix fn_type_signature for anon functions with alias arguments ( #13024 )
2022-01-04 16:02:53 +02:00
yuyi
054bb272df
cgen: fix const fixed array of reference var using correct pointer ( #13023 )
2022-01-04 11:34:07 +02:00
Alexander Medvednikov
59ed4be49a
all: update copyright year
2022-01-04 12:21:12 +03:00
Delyan Angelov
feadf777c3
builder: fix a bug in error_context_lines
2022-01-04 10:59:39 +02:00
yuyi
00a0c1886e
ast, cgen: fix const fixed array of reference value ( #13022 )
2022-01-04 11:36:29 +03:00
pancake
4b55800ffd
v.eval: add tests and fix runtime cast crash ( #13019 )
2022-01-03 18:30:42 +02:00
yuyi
da989e19ca
net: fix errors of new_ip(), new_ip6() and ip6.str() ( #13020 )
2022-01-03 15:10:15 +02:00
Larpon
88a973b617
sokol: type alias all sgl
structs, support sgl_context
( #13018 )
2022-01-03 15:05:24 +02:00
Delyan Angelov
e03d52d322
toml: improve SKIP reporting, fix formatting
2022-01-03 13:25:06 +02:00
Delyan Angelov
ee858568ff
toml: ignore CRLF just like LF in line comments, support VTEST_HIDE_OK=1 in tests.
2022-01-03 12:54:16 +02:00
yuyi
d5b111ec99
net: fix typo in new_ip() ( #13017 )
2022-01-03 08:45:26 +02:00
penguindark
1ad4fbd841
regex: add a replace_n function ( #13016 )
2022-01-03 06:32:24 +02:00
Larpon
4d4398fa8a
sokol: type alias all gfx
structs ( #13014 )
2022-01-02 20:36:01 +02:00
Delyan Angelov
41e763f79c
checker: add error for type StructAlias = Struct struct Struct { field StructAlias }
2022-01-02 15:54:40 +02:00
yuyi
64f1ea6fe9
checker: extract containers.v, struct.v, for.v from checker.v ( #13012 )
2022-01-02 15:52:19 +02:00
Delyan Angelov
41078bc438
v.eval: fix hardcoded math ops in infix_gen.v, add interpret_test.v
2022-01-02 10:33:21 +02:00
Delyan Angelov
1521d08e84
eval: ignore ast.Module (fixes v interpret file.v
regression after 07cf6d9
)
2022-01-02 10:09:50 +02:00
Delyan Angelov
9278d4ec19
docs: fix a typo
2022-01-02 09:18:24 +02:00
Alexander Medvednikov
0e1cfd4a28
checker: simplify type sizeof check and fix c2v globals
2022-01-01 19:56:13 +03:00
penguindark
908296cdfb
regex: improve errors for edge cases ( #13008 )
...
* code cleaning, added more clear errors for dots and ORs
* added failed match index for better find functions, updated tests
* added index in match failed, updated tests
* test cleaning
* test check
2022-01-01 09:21:27 +02:00
pancake
7b4ba66720
js: use JS.String instead of string in builtin javascript functions ( #13004 )
2022-01-01 09:17:08 +02:00
yuyi
7622ff3f54
checker: check using const var as function ( #13006 )
2022-01-01 09:15:43 +02:00
yuyi
6438512529
checker: add error for for mut var in string {
( fix #12998 ) ( #13000 )
2021-12-31 09:54:06 +02:00
yuyi
a0a1807e2b
builtin: add charptr str() and change string format ( #12973 )
2021-12-30 23:34:24 +03:00
Delyan Angelov
b10ff1e41b
checker: infer generic interface type in i := Interface(Struct<u32>{})
2021-12-30 21:24:52 +02:00
Delyan Angelov
ae036b6146
checker: fix infinite recursion on generic interface cast
2021-12-30 19:28:42 +02:00
Delyan Angelov
df8384b62e
v.scanner: report the start of unfinished string literals too
2021-12-30 18:29:52 +02:00
Delyan Angelov
93c40e696d
all: add support for type MyEnumAlias = MyEnum
2021-12-30 13:42:06 +02:00
Delyan Angelov
bf9f684c59
ast: improve support for type aliases, in TypeSymbol.xyz_info methods
2021-12-30 13:17:10 +02:00
Delyan Angelov
7531f78f67
ast: remove const hack for global_table, use a proper global instead
2021-12-30 13:15:55 +02:00
yuyi
d421f28de4
checker: minor cleanup in cast_expr() ( #12995 )
2021-12-29 21:48:23 +02:00
Delyan Angelov
4114dd0815
v.builder: fix v -no-retry-compilation -cc tcc -usecache examples/tetris/
2021-12-29 21:45:01 +02:00
Delyan Angelov
99fdcd2e71
v.builder: fix v -cc tcc -no-retry-compilation build-module vlib/sync/stdatomic
2021-12-29 21:32:30 +02:00
Delyan Angelov
ca5154747e
cgen: fix v -usecache examples/news_fetcher.v
on macos (.sort() compare_ functions duplication)
2021-12-29 20:15:51 +02:00
Delyan Angelov
cb34309f6f
cgen: fix chained ./v -usecache -o v cmd/v
(and all other V programs that use maps)
2021-12-29 17:57:04 +02:00
yuyi
cc577e1bfb
parser: check variable redefinition error ( #12992 )
2021-12-29 13:44:08 +02:00
Delyan Angelov
69c90ef50d
hash.fnv1a: add generic fnv1a.sum64_struct/1 and fnv1a.sum32_struct/1 + tests
2021-12-29 12:03:24 +02:00
Delyan Angelov
7c78bf9466
hash.fnv1a: add fnv1a.sum64_bytes and fnv1a.sum32_bytes, add doc comments and tests
2021-12-29 11:27:26 +02:00
Delyan Angelov
9b8cf1ad37
markused: fix V compiler panics with -skip-unused, for code using generics
2021-12-29 09:48:13 +02:00
Hunam
5607cfbd32
datatypes: add a Queue.last() method ( #12987 )
2021-12-29 08:01:47 +02:00
Delyan Angelov
43fee6b3d5
all: fix registration of methods with the same name on different generic structs
2021-12-28 21:42:48 +02:00
Delyan Angelov
730b2a9263
sync: move sync.atomic2 to sync.stdatomic, cleanup
2021-12-28 10:16:22 +02:00
yuyi
c1711b8f05
checker: check string cast to number ( fix #12982 ) ( #12983 )
2021-12-28 07:55:39 +02:00
Alexander Medvednikov
6176ce9f03
all: c2v fixes
2021-12-28 08:00:56 +03:00
penguindark
dadc965082
regex: implement negation groups, more flexibility for bsls, small fixes ( #12981 )
...
* removed memory allocations in cleaning during clear calls
* first test implementation of negative groups, more flexibility for bsls
* fixed bsls failed tests
* fmt
* added \n to regex tests
2021-12-27 22:18:48 +02:00
Delyan Angelov
14648fa41e
parser: reduce max_expr_level to 310 (due to more limited stack size on windows)
2021-12-27 20:21:58 +02:00
yuyi
34e175a343
checker: minor cleanup of the fns classification ( #12977 )
2021-12-27 13:11:10 +02:00
Delyan Angelov
a2eb90ee4e
parser: prevent too deep recursions in p.check_undefined_variables
2021-12-27 12:30:17 +02:00
Toby Webb
35418b8413
cgen: fix compile error on locking interface value ( #12883 )
2021-12-26 20:01:00 +02:00
Delyan Angelov
c26e040d33
ci: bump retry count to 5 for tcp_test.v
2021-12-26 19:05:05 +02:00
yuyi
2e68af22d3
cgen: improve auto_str error messages ( #12972 )
2021-12-26 18:32:15 +02:00
yuyi
55d9c24063
ast: fix generic fn with multiple return ( #12971 )
2021-12-26 16:44:41 +02:00
Delyan Angelov
8a10dbcf27
vlib: rename adt
to datatypes
2021-12-26 16:01:36 +02:00
Larpon
2210f89ea3
sokol: type alias all sapp
structs ( #12962 )
2021-12-26 13:02:51 +02:00
pancake
04be2465dc
cgen: check call argument on methods ( #12965 )
2021-12-26 11:53:56 +02:00
yuyi
3b5de71e60
builtin: add none str() ( fix #12964 ) ( #12967 )
2021-12-26 11:41:51 +02:00
yuyi
03864e4ab8
checker: fix cast enum to alias ( #12968 )
2021-12-26 11:34:20 +02:00
Daniel Däschle
10f63b3cd7
cgen: remove "main" from inline sum type str ( #12963 )
2021-12-25 23:58:45 +03:00
Daniel Däschle
35282396ec
all: inline sum types ( #12912 )
2021-12-25 18:26:40 +03:00
Miccah
485b392cb3
adt: implement a binary MinHeap data structure ( #12956 )
2021-12-25 12:03:50 +02:00
yuyi
8764a3a973
checker: check errors of cast to byte ( #12961 )
2021-12-25 11:34:15 +02:00
yuyi
d0ad79cd8b
checker: fix generic array builtin method call ( #12957 )
2021-12-24 14:42:23 +02:00
yuyi
a83786d867
checker: minor cleanup in cast_expr() ( #12954 )
2021-12-24 11:38:27 +02:00
Miccah
d69d2c600b
adt: implement a doubly linked list ( #12950 )
2021-12-24 11:19:40 +02:00
yuyi
c0dcd1a9a5
ast: fix reference of alias char type ( #12951 )
2021-12-24 11:11:20 +02:00
Hunam
68452cff76
adt: add queue ( #12941 )
2021-12-23 18:57:15 +02:00
Hunam
54a6973548
adt: add linked list ( #12937 )
2021-12-23 18:23:04 +02:00
Delyan Angelov
fa2de89db9
orm: do not order by default, ordering is slow; also fix a bug for tables without defined primary keys
2021-12-23 16:43:22 +02:00
Hunam
d7deda5078
vlib: add an adt
module (Abstract Data Types) ( #12901 )
2021-12-23 15:16:29 +02:00
yuyi
d4f28c88b3
checker: minor cleanup in the checker.v ( #12945 )
2021-12-23 15:02:09 +02:00
Benjamin Stigsen
546c388b02
gg: renaming drawing functions ( #12913 )
2021-12-23 13:31:25 +02:00
yuyi
ad1ef6a9e2
cgen: fix map get assign blank var with optional ( #12943 )
2021-12-23 13:04:36 +02:00
playX
a2468e1e0c
js,os: fix integer arithmetic; add Process.close() and os.is_readable() for VJS; Make tetris run on JS backend ( #12940 )
2021-12-23 11:36:42 +02:00
yuyi
d3ccdfd75c
cgen: fix channel of sumtype ( #12938 )
2021-12-23 11:26:15 +02:00
Delyan Angelov
db1175e455
parser: handle [noreturn]
on methods too
2021-12-22 19:58:37 +02:00
yuyi
1028f0b59e
fmt: fix error of generic struct_init using module ( fix #12893 ) ( #12935 )
2021-12-22 19:11:09 +02:00
Delyan Angelov
e256f1b2aa
checker,cgen: stabilise generic method handling (fix a source code ordering issue)
2021-12-22 18:03:46 +02:00
penguindark
278c08704c
all: support slices with negative indexes #[start..end]
(gated arrays) ( #12914 )
2021-12-22 16:34:02 +03:00
playX
2b9f993574
gg: add text rendering, keyboard event handling for JS and other fixes ( #12932 )
2021-12-22 12:26:52 +02:00
yuyi
6eb44f472a
cgen: fix multiple return with sumtype ( #12930 )
2021-12-22 12:09:08 +02:00
yuyi
6a4fa6096e
cgen: fix blank ident in for_c_stmt ( #12931 )
2021-12-22 09:34:26 +02:00
pancake
cb65f2ff44
js: generate es5 methods for valueOf() and toString() ( #12928 )
...
Co-authored-by: pancake <pancake@nopcode.org>
2021-12-22 09:20:45 +02:00
zakuro
2693631643
parser: make codegen generate correct module name ( #12929 )
2021-12-22 10:55:57 +11:00
spaceface
cfb814a0e3
gen: support returning large types from closures on amd64 ( #12926 )
2021-12-22 00:18:45 +02:00
playX
b68c217d53
js: remove usage of default arguments for -es5
flag ( #12921 )
2021-12-21 20:23:40 +02:00
joe-conigliaro
07cf6d9f96
parser/scanner: make codegen impl use own parser. closes #12857 ( #12925 )
2021-12-21 19:48:06 +02:00
yuyi
fc83f0bfd0
cgen: clean up gen_assign_stmt() ( #12915 )
2021-12-21 19:23:55 +02:00
yuyi
de3665af69
cgen: fix interface method using struct embed ( #12924 )
2021-12-21 19:16:05 +02:00
playX
ade14491d4
gg: add event handling for mouse down/up and mouse leave/out on VJS ( #12917 )
2021-12-21 12:31:29 +02:00
yuyi
460f7c6637
cgen: fix fixed array of interfaces equality ( #12908 )
2021-12-20 19:09:22 +02:00
Delyan Angelov
68ada041e6
tests: support VTEST_ONLY_FN=*test_sincos* ./v test .
and ./v test -run-only test_sin .
2021-12-20 18:45:04 +02:00
playX
5f0160bf11
js,gg: more work on porting gg to JS backend ( #12903 )
2021-12-20 16:18:21 +03:00
Delyan Angelov
f81654e3a7
builtin: add s.match_glob(wildcard_pattern)
2021-12-20 14:17:08 +02:00
yuyi
7c85c2ab1f
checker: fix error of map selector assign ( #12902 )
2021-12-20 08:09:15 +02:00
Miccah
d07975335d
time: add Duration.str() ( #12897 )
...
* time: add str() method to Duration
* add Duration.str tests, move time.infinite to time.v, to be visible to the JS backend
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2021-12-19 19:32:42 +02:00
Delyan Angelov
840a92c14e
v.builder: change the default stack size for apps produced by MSVC to 16MB
2021-12-19 18:40:29 +02:00
yuyi
cd0b581445
ast: rename 'table.get_type_symbol()' to 'table.sym()' and more related calls ( #12898 )
2021-12-19 18:25:18 +02:00
yuyi
c957f59071
cgen: minor cleanup in cgen.v ( #12896 )
2021-12-19 14:31:04 +02:00
Delyan Angelov
41176c4967
cgen: add bool
and complex
to c_reserved
2021-12-19 13:44:54 +02:00
Leo Developer
a7019ac86c
cgen: fix parallel waiter function generation ( #12895 )
2021-12-19 13:38:48 +02:00
yuyi
2ab861ef89
cgen: fix generic array of interface method call ( fix #12882 ) ( #12888 )
2021-12-18 18:08:19 +02:00
yuyi
5e5c78ed37
cgen: minor cleanup of the field order in the Gen struct definition ( #12890 )
2021-12-18 17:52:33 +02:00
spaceface
de92f819f0
cgen: support closures with any number of parameters of any size on amd64 ( #12891 )
2021-12-18 17:33:24 +02:00
Benjamin Stigsen
3a504480d9
gg: add draw_arc_empty ( #12887 )
2021-12-18 12:39:14 +02:00
Sandro Martini
80995f3a2d
log: improve logging interface ( #12886 )
2021-12-18 12:38:43 +02:00
Delyan Angelov
927eecf7c0
ci: retry more return_in_lock_test.v
2021-12-18 10:19:13 +02:00
yuyi
7c255f0ff2
builtin, cgen: fix array of map init with default value ( #12885 )
2021-12-18 10:07:25 +02:00
ChAoS_UnItY
50d988ebc7
v.parser: forbid unsupported language functions/types in specific backends ( #12655 )
2021-12-18 10:00:31 +02:00
Benjamin Stigsen
75830f1fe3
gg: add draw_ellipse_filled() + draw_ellipse_empty() APIs ( #12869 )
2021-12-17 21:19:18 +02:00
pancake
08766da7e8
js: dont use async js_main in '-es5' mode ( #12870 )
2021-12-17 16:37:19 +02:00
Tim Basel
130d189fce
cgen: fix overwriting methods of embedded structs + empty struct for interfaces ( #12876 )
2021-12-17 15:32:31 +02:00
playX
b482da74e9
gg: move code using C types to c.v files, add js.v files ( #12873 )
2021-12-17 15:22:09 +02:00
yuyi
66070ec63e
cgen: fix error of 'map_a[map_b[key]] += 2' ( #12872 )
2021-12-17 15:17:08 +02:00
yuyi
c9f6a96936
cgen: fix array of interfaces equality error ( #12874 )
2021-12-17 14:58:17 +02:00
spaceface
d80dd77adf
cgen: support closures on arm32 as well ( #12875 )
2021-12-17 14:26:24 +02:00
zakuro
e5e3979e45
fmt: fix removal of selective imported types used in type decl ( #12868 )
2021-12-17 05:20:16 +02:00
zakuro
2f7ac7e407
cgen: fix c error when use reserved keyword as if guard var ( #12871 )
2021-12-17 04:50:52 +02:00
yuyi
f87f8ec3f7
cgen: fix defer with function variables ( fix #12854 ) ( #12866 )
2021-12-16 20:58:54 +02:00
Delyan Angelov
5f1eaaf3b1
ci: retry more channel_select_6_test.v
2021-12-16 20:12:40 +02:00
spaceface
c6b902d2b7
cgen: support closures on arm64 ( #12863 )
2021-12-16 18:02:05 +02:00
spaceface
8a34fb7857
ci: run the full V test suite on arm64 ( #12865 )
2021-12-16 17:44:21 +02:00
Delyan Angelov
6ff953d936
preludes,builder,cgen: add support for VTEST_RUNNER=tap and -test-runner tap ( #12523 )
2021-12-16 15:59:46 +02:00
Delyan Angelov
caac89d6ca
checker: fix function x is private
error in main, for pub const abc = x()
in a (sub)module
2021-12-16 12:03:49 +02:00
yuyi
674f99a658
checker: minor clean up in comptime_call() ( #12860 )
2021-12-16 11:47:47 +03:00
yuyi
d8a333058d
checker, cgen: fix generic map with generic type key ( #12859 )
2021-12-16 09:53:05 +02:00
Delyan Angelov
1261468d8e
ci: fix failed windows-msvc task (sokol examples)
2021-12-15 20:18:45 +02:00
Benjamin Stigsen
d90ef1f29f
gg: draw_arc fixes ( #12827 )
2021-12-15 21:17:07 +03:00
yuyi
c44115c67d
checker: fix goto label with comptime tmpl ( #12853 )
2021-12-15 18:48:43 +02:00
Delyan Angelov
2b981b011e
ast: fix bug in parsing -Isomething -Danother
from #flag and #pkgconfig directives
2021-12-15 17:55:52 +02:00
spaceface
65f12f3217
checker: fix invalid cast warning for flag enums ( #12848 )
2021-12-15 16:58:25 +02:00
playX
11d2b8b354
js: support -es5
flag ( #12846 )
2021-12-15 15:47:34 +02:00
Delyan Angelov
df7f2aa8a3
all: support [markused]
tags for fns/consts/globals
2021-12-15 14:34:49 +02:00
Delyan Angelov
1a6899e85e
cgen: fix building with -no-preludes -no-builtin -skip-unused
(part 2)
2021-12-15 13:30:21 +02:00
yuyi
2ce1647ea0
cgen: fix error of embedded struct generating interface_table ( #12847 )
2021-12-15 13:21:21 +02:00
Delyan Angelov
fa1a7a85f0
cgen: fix building with -no-preludes -no-builtin
(part 1)
2021-12-15 12:47:28 +02:00
Larpon
1d41d9daf9
json2: improve readability, add tests utilizing fix #12667 ( #12836 )
2021-12-15 12:20:05 +02:00
spaceface
d13fe7843c
v: fix build and failing tests on arm64 ( #12840 )
2021-12-15 09:00:38 +02:00
yuyi
1c629f4a93
cgen: fix ci error of empty struct init ( #12838 )
2021-12-15 08:49:30 +02:00
Delyan Angelov
c900dc1053
ci: use -Wno-excess-initializers for clang -cstrict, cleanup cgen
2021-12-14 17:14:45 +02:00
Delyan Angelov
96e9cc62b0
ci: fix clang macos build
2021-12-14 17:06:57 +02:00
Delyan Angelov
70564ae8b2
ci: fix generics test
2021-12-14 17:04:37 +02:00
Delyan Angelov
73e097c1cb
Revert "ci: fix clang build error on macos/freebsd"
...
This reverts commit d7abdd314d
.
2021-12-14 16:57:47 +02:00
Delyan Angelov
d7abdd314d
ci: fix clang build error on macos/freebsd
2021-12-14 15:39:08 +02:00
yuyi
eeb7d4a7fd
cgen: fix embedded struct init with complex fields ( #12831 )
2021-12-14 14:55:58 +02:00
Thomas Mangin
99f14a7ead
transformer: only enable array optimisation with -prod ( #12833 )
2021-12-14 13:05:54 +02:00
zakuro
eed882950c
fmt: remove extra comma of branch instead of parse error ( #12814 )
2021-12-14 08:14:43 +02:00
yuyi
731015cd9b
ci: revert "cgen: fix embedded struct init with complex fields ( fix #12823 ) ( #12825 )" ( #12830 )
...
This reverts commit b4b2a21453
.
2021-12-14 08:11:11 +02:00
yuyi
b4b2a21453
cgen: fix embedded struct init with complex fields ( fix #12823 ) ( #12825 )
2021-12-14 07:15:23 +03:00
Larpon
2a5356670b
toml: add as_strings()
method to map of Any
( #12824 )
2021-12-13 21:43:33 +02:00
Benjamin Stigsen
76f6f99bce
gg: add draw_ring() ( #12817 )
2021-12-13 21:03:42 +02:00
playX
cb4c67588c
os: add support for signal handling on JS backend ( #12818 )
2021-12-13 20:18:12 +02:00
yuyi
d5c0bdf954
cgen: clean up interface_table() ( #12816 )
2021-12-13 13:45:27 +02:00
yuyi
be5823069a
cgen: clean up struct_init ( #12815 )
2021-12-13 13:01:36 +02:00
yuyi
b303588491
cgen: fix struct init with interface field ( #12820 )
2021-12-13 12:55:46 +02:00
Delyan Angelov
3afbb9e90a
all: split all backends into cmd/tools/builders ( #12811 )
2021-12-12 22:10:43 +03:00
yuyi
57c1faadbe
cgen: fix multiple nested embed struct with duplicate field init ( #12805 )
2021-12-12 19:54:29 +02:00
yuyi
f407d6de02
ast, checker, cgen: fix generics multiple type comptime call ( fix #12777 ) ( #12806 )
2021-12-12 19:42:40 +02:00
Benjamin Stigsen
ab6e93394f
gg: add draw_empty_triangle() ( #12804 )
2021-12-12 19:41:27 +02:00
Leo Developer
8c1c70db04
checker: fix x.$(field.name) not working outside of $if ( #12802 )
2021-12-12 03:18:29 +02:00
Delyan Angelov
79de408ef0
parser,checker: support [generated] module xyz
(turns off notices). Use it for infix.v
.
2021-12-12 00:58:38 +02:00
Delyan Angelov
9b7a50b1a2
v: split the interpreter to cmd/tools/vinterpret.v
2021-12-12 00:06:44 +02:00
Delyan Angelov
adf353702e
v.eval: show sumtype or interface casts return void currently
only with -v
2021-12-11 23:45:54 +02:00
Leo Developer
2ced182816
cgen: fix order of comptime reflection fields ( #12799 )
2021-12-11 22:09:47 +02:00
Thomas Mangin
0d0d7323bb
transformer: provide direct_memory_access to arrays when safe ( #12724 )
2021-12-11 21:55:46 +02:00
Delyan Angelov
fe14e2fceb
cgen: use c_name()
for escaping goto label names too
2021-12-11 19:41:44 +02:00
Wertzui123
9e68a03f94
math: rename small to small_ to prevent C errors (workaround unescaped C labels) ( #12796 )
2021-12-11 19:35:40 +02:00
Delyan Angelov
24bc2ae406
cgen: add small
to c_reserved
2021-12-11 19:14:26 +02:00
Delyan Angelov
cde0cbd5ad
ci: fix failing tests-sanitize-address-clang
step for vlib/toml/tests/spaced_keys_test.v
2021-12-11 19:03:47 +02:00
Delyan Angelov
b3287f8159
Revert "v.scanner: reduce memory consumption for Scanner.ident_name"
...
This reverts commit b18cd37e59
.
2021-12-11 17:10:01 +02:00
Delyan Angelov
b18cd37e59
v.scanner: reduce memory consumption for Scanner.ident_name
2021-12-11 16:38:20 +02:00
Larpon
ba06eba39c
toml: fix implicit allocation overwrite of existing table ( #12793 )
2021-12-11 15:21:46 +02:00
Leo Developer
9bf777c1ee
vfmt: fix eating .zlib in $embed_file('v.png', .zlib)
( #12794 )
2021-12-11 15:21:26 +02:00
yuyi
7c7cdf8ce7
builtin: clean up array.v ( #12784 )
2021-12-11 11:17:00 +03:00
Alexander Medvednikov
a58c539ee6
checker: minor fixes
2021-12-11 10:56:37 +03:00
Alexander Medvednikov
19a47abcca
checker: split up checker.v: fn.v, if.v, interface.v, match.v, return.v
2021-12-11 10:51:01 +03:00
Alexander Medvednikov
ee6c0a0691
checker: split up checker.v: fn.v, if.v, interface.v, match.v
2021-12-11 10:48:07 +03:00
yuyi
feb12b62dc
tests: correct test file name ( #12787 )
2021-12-11 10:28:44 +03:00
yuyi
ade2a4cd01
cgen: fix multiple embed struct init ( #12791 )
2021-12-11 10:28:32 +03:00
Alexander Medvednikov
eaf0f9b4c1
checker: split up checker.v: assign.v, orm.v, comptime.v; c2v fixes
2021-12-11 10:23:58 +03:00
yuyi
ed4ecae57d
checker: fix notice of eval.infix.v on windows ( #12770 )
2021-12-10 15:28:32 +02:00
yuyi
9b4329d2f6
ast, checker, cgen: fix interface method with struct embed ( #12783 )
2021-12-10 14:56:13 +02:00
playX
b116170735
js: add support for Promise.wait() ( #12781 )
...
* builtin/js: Change Promise<T,E> to Promise<T>
* js: codegen support for Promise.wait()
* checker: checker support for Promise.wait()
2021-12-10 14:54:20 +02:00
yuyi
7fc9e614a3
ast, parser, checker: fix generic fn in builtin module ( #12769 )
2021-12-09 21:37:43 +02:00
Subhomoy Haldar
4c95127cbc
semver: add a Version.str() method with unit tests ( #12779 )
2021-12-09 21:25:55 +02:00
Alexander Medvednikov
8f9f681e81
checker: move check_types() on top; small c2v fixes
2021-12-09 05:44:41 +03:00
Delyan Angelov
0021fbbaa9
gg: support VGG_STOP_AT_FRAME=120 VGG_SCREENSHOT_FOLDER=. VGG_SCREENSHOT_FRAMES=10,20,30 ./v -d gg_record run examples/gg/bezier_anim.v
( #12767 )
2021-12-08 22:38:33 +02:00
zakuro
85f3372a32
readline: fix bug that full-width spaces are treated as eof ( #12763 )
2021-12-08 22:35:21 +02:00
zakuro
7379488cee
fmt: fix bug that adds unnecessary module name to generic types ( #12758 )
2021-12-08 22:33:58 +02:00
yuyi
d88e67a5ec
checker: fix const type with raw string literal ( #12761 )
2021-12-08 22:28:55 +02:00
Delyan Angelov
b1622c74b9
net.openssl: fix compilation of vpm.v on FreeBSD
2021-12-08 10:50:24 +02:00
yuyi
e433badcb8
parser, cgen: fix multiple comptime tmpl in one function ( #12757 )
2021-12-08 11:12:02 +03:00
crthpl
2fbf7fea75
all: initial interpreter code ( #12605 )
2021-12-08 11:09:10 +03:00
Delyan Angelov
525791fa3a
tests: mark semaphore_timed_test.v with vtest retry: 3
2021-12-08 01:09:58 +02:00
penguindark
7a0b63e795
stbi: add image writing functions ( #12754 )
2021-12-08 00:31:37 +02:00
Ekopalypse
a19dd36473
cgen: ensure the different gdi32 notations are always matched in is_gui_app ( #12756 )
2021-12-07 22:13:56 +02:00
Jordan Bonecutter
fd4e071621
net.openssl: use a pkgconfig directive, instead of a hardcoded path ( #12735 )
2021-12-07 22:11:47 +02:00
yuyi
c29a3cf6e8
parser: fix (absolute path) error ( #12747 )
2021-12-07 11:33:53 +02:00
yuyi
f60cf65284
cgen: fix comptime for_in methods call using str_intp ( #12746 )
2021-12-07 12:12:12 +03:00
playX
1cb06a2de4
js: ast.GoExpr support using promises on JS backend ( #12749 )
2021-12-07 12:11:54 +03:00
Tim Basel
c23ebec944
parser: support bool values in attributes ( #12750 )
2021-12-07 12:11:29 +03:00
Delyan Angelov
f86af7237f
stbi: add a link_to_libm.c.v helper, to ensure import stbi
works always.
2021-12-07 10:16:07 +02:00
Tim Basel
6d14275106
parser: support dot prefix for attributes ( #12744 )
2021-12-07 01:32:29 +03:00
yuyi
36fbd3c4fa
checker: check sumtype as mismatched type ( #12743 )
2021-12-07 01:31:47 +03:00
Toby Webb
ef16a8ec54
vweb: add json_pretty method ( #12745 )
2021-12-07 01:31:17 +03:00
Larpon
047f059fb8
examples: use fontstash
wrapper calls ( #12718 )
2021-12-06 23:39:43 +03:00
Delyan Angelov
1cd703d96b
fontstash: use #flag darwin -I/usr/local/Cellar/freetype/2.10.2/include/freetype2
2021-12-06 19:08:50 +02:00
Alexander Medvednikov
325e116b7a
cgen: 4 byte bool flagg for compatibility with some C software
2021-12-06 12:36:25 +03:00
Toby Webb
09955b7ce8
net.websocket: fix server not listening for IPv4 ( #12717 )
2021-12-06 11:10:25 +02:00
yuyi
d85111e3dd
cgen: fix comptime for_in methods call ( #12741 )
2021-12-06 10:55:27 +02:00
Delyan Angelov
3ab82a23c5
tools: cleanup the output of V, compiled with -d trace_parser
and -d trace_checker
2021-12-06 09:54:53 +02:00
Taillook
7d1dec5b44
sync: add sync.ManyTimes ( #12729 )
2021-12-05 19:44:25 +02:00
yuyi
ae2ae6e6fd
cgen: fix match sumtype var aggregate str_intp error ( #12732 )
2021-12-05 19:21:45 +02:00
Taillook
0c713f6edc
sync.once: add Once ( #12722 )
2021-12-05 18:56:03 +02:00
playX
105d7fcf75
js: support JS.await ( #12726 )
2021-12-05 13:33:53 +02:00
Delyan Angelov
e4850a007c
strings: add Builder.drain_builder/1 utility method
2021-12-05 11:59:18 +02:00
Delyan Angelov
229d2fb667
v.util.timers: improve tracing by supporting -d trace_timers_creation
2021-12-05 11:55:41 +02:00
yuyi
2754368873
ast: correct comments of the find_field_from_embeds ( #12723 )
2021-12-05 06:21:39 +02:00
Taillook
4b21d3e364
crypto.sha256: add missing documentation of sum ( #12716 )
2021-12-04 20:16:44 +02:00
penguindark
81a1490e31
builtin: add string.split_any/1 ( #12720 )
2021-12-04 20:13:40 +02:00
Leo Developer
ace63594bf
all: support $embed_file('embed.vv', .zlib)
( #12654 )
2021-12-04 19:43:19 +02:00
yuyi
0f50ac3260
ast: cleanup struct embeds related methods ( #12719 )
2021-12-04 18:46:41 +02:00
yuyi
0cb4557a8d
ast, checker, cgen: fix nested struct embed method call ( #12714 )
2021-12-04 14:51:42 +02:00
Delyan Angelov
d59aa14b26
builtin: fix {-7:08b} (interpolation of negative numbers with 0 padding), add tests
2021-12-04 13:11:05 +02:00
Delyan Angelov
89c08c6292
cgen: cleanup the generated code for dump(x)
2021-12-04 11:56:45 +02:00
yuyi
2d43fdb42a
ast, checker, cgen: fix nested struct embed error ( fix #12659 ) ( #12712 )
2021-12-04 11:19:19 +03:00
Larpon
7e6d4ebfe1
toml: add doc string to reflect methods ( #12666 )
2021-12-03 23:07:44 +02:00
Delyan Angelov
33163238e7
strconv: add a small performance optimisation
2021-12-03 20:14:14 +02:00
yuyi
365b46cad3
cgen: fix match sumtype print var aggregate error ( #12667 )
2021-12-03 20:00:00 +02:00
Delyan Angelov
4624de6cb5
cgen: support -d no_segfault_handler
and -d no_main
. Cleanup -d trace_xxx
descriptions in CONTRIBUTING.md
2021-12-03 19:01:45 +02:00
Larpon
1d6cc57d9c
toml: add reflection method ( #12664 )
2021-12-03 12:40:46 +02:00
playX
0da7e2f8ab
js: make vlib/v/util compile on JS backend ( #12660 )
2021-12-03 12:25:36 +02:00
Alexander Medvednikov
be5446bfa4
checker: update enum test
2021-12-03 09:07:33 +03:00
Alexander Medvednikov
209747d03e
checker: update enum test
2021-12-03 08:43:03 +03:00
Alexander Medvednikov
eca78a2906
checker: allow infix expressions in enum declarations
2021-12-03 07:45:37 +03:00
Delyan Angelov
c4363bc78b
builtin: explain and better organise the different cstring_to_vstring/tos/tos_clone/vstring family of conversion functions
2021-12-02 15:46:53 +02:00
yuyi
66a67de8c0
checker, cgen: fix match expr returning optional with error ( fix #12556 ) ( #12645 )
2021-12-02 12:22:48 +02:00
Larpon
7d0a36dd08
toml: solidify single-line escape validation ( #12644 )
2021-12-02 12:07:53 +02:00
Larpon
adddac4807
toml: add some meat to README.md ( #12649 )
2021-12-02 12:01:59 +02:00
Leo Developer
63b0798771
compress: add a new compress.zlib
module ( #12646 )
2021-12-02 12:01:44 +02:00
Larpon
5ab91dd471
toml: support multi-level map keys in arrays-of-tables ( #12641 )
2021-12-02 11:19:45 +02:00
Larpon
ebfacca252
toml: fix bug in unicode decoding ( #12643 )
2021-12-02 11:19:12 +02:00
Miccah
799d7b843c
net: properly convert IP address C strings to V strings ( #12648 )
2021-12-02 11:18:14 +02:00
Larpon
9cf7af0c75
toml: add better float validation ( #12640 )
2021-12-02 11:16:55 +02:00
Ulises Jeremias Cornejo Fandos
f7926ec9a4
vlib/context: add onecontext as submodule ( #12549 )
2021-12-02 11:15:07 +02:00
yuyi
2144471ce1
cgen: fix generic fn with anon fn in body ( #12647 )
2021-12-02 10:53:42 +02:00
yuyi
988779846f
checker: fix map init with enum keys ( #12637 )
2021-12-01 18:11:50 +02:00
Larpon
8494e387ec
strconv: fix format.md example snippets ( #12642 )
2021-12-01 17:23:35 +02:00
Delyan Angelov
d7bc2a88f7
builtin: add a non allocating rune.length_in_bytes() method and tests for it
2021-12-01 16:35:13 +02:00
Larpon
b3aedff3f8
toml: convert yaml value checks in iarna test suite ( #12629 )
2021-12-01 14:43:15 +02:00
pancake
6f297cdfaa
js: add missing start_digraph() for the js backend ( #12638 )
2021-12-01 14:05:18 +02:00
Delyan Angelov
f5d283721e
checker: add more string(x)
checks, with more detailed replacement suggestions
2021-12-01 11:28:00 +02:00
Delyan Angelov
79cb303a6c
sync: improve compatibility with -Wimpure-v
2021-12-01 11:24:51 +02:00
Delyan Angelov
47aa2b1f93
all: fix casting of string(MyString('abc'))
and byte(MyByte(123))
; improve TypeSymbol handling ( #12617 )
2021-12-01 09:50:53 +02:00
penguindark
519ca90cfa
regex: added default support for long queries ( #12635 )
2021-12-01 08:38:50 +02:00
Taillook
f86710dcc7
crypto.bcrypt: add doc comments for public bcrypt functions ( #12622 )
2021-11-30 19:41:59 +02:00
Larpon
6f193c4300
toml: remove obsolete comment from checker ( #12626 )
2021-11-30 19:40:31 +02:00
yuyi
547f326f33
cgen: cleanup auto_str_methods ( #12631 )
2021-11-30 19:39:55 +02:00
Larpon
758ba76d2b
toml: update testdata/.gitignore ( #12630 )
2021-11-30 16:01:20 +02:00
Larpon
5c8e626912
toml: add alexcrichton/toml-rs
test suite to CI ( #12624 )
2021-11-30 15:08:30 +02:00
yuyi
d1b0ce9e0c
cgen: fix error of the interface str method ( fix #12538 ) ( #12620 )
2021-11-30 15:03:44 +02:00
Larpon
7d9028db56
toml: add more checks for table redeclarations ( #12615 )
2021-11-30 15:01:00 +02:00
Larpon
f50f409ad7
toml: simplify bool keys in scanner and parser ( #12625 )
2021-11-30 14:26:47 +02:00
pancake
1b691e7612
native: implement for-c and for-in range loops ( #12155 )
2021-11-30 11:49:30 +02:00
Anton Zavodchikov
05db3533d3
picoev: use net
C definitions ( #12574 )
2021-11-30 11:15:59 +02:00
pancake
8ac7739db8
parser: forbid empty match statements 'match cond.op {else {}}' ( #12618 )
2021-11-30 09:32:48 +02:00
Delyan Angelov
6749979534
builder: fix the uhm fine
module lookup bug (part 1)
2021-11-29 22:54:52 +02:00
Taillook
bbc47562b3
crypto.blowfish: add doc comments for the public API ( #12609 )
2021-11-29 22:19:52 +02:00
Larpon
14424100e8
toml: comply with BurntSushi @eb989e5 ( #12616 )
2021-11-29 22:15:22 +02:00
Leo Developer
0f59d88ba6
v.embedfile: make path public ( #12614 )
2021-11-29 16:32:42 +02:00
playX
ddec89f9ee
js,vfmt: fix formatting for JS types; add fetch API ( #12608 )
2021-11-29 15:32:29 +02:00
yuyi
9825c7e06c
ast: fix generic sumtype of alias generic struct ( #12611 )
2021-11-29 15:12:00 +02:00
Larpon
65e9503556
toml: check for immutable tables ( #12612 )
2021-11-29 15:10:23 +02:00
Alexander Medvednikov
c14c324125
pref: .o build mode
2021-11-29 05:00:25 +03:00
Delyan Angelov
6d97b0a407
checker: improve checking of a << b, when a and b are numbers ( #12589 )
2021-11-29 03:48:49 +03:00
ChAoS_UnItY
fe37da31a8
v.transformer: fix string always escaped by transformer ( #12603 )
2021-11-28 23:53:30 +02:00
yuyi
6d6a23a1c9
checker: remove redundant code of find field with embed ( #12600 )
2021-11-28 21:31:19 +02:00
Delyan Angelov
87029e5707
encoding.base64: vfmt base64.c.v
2021-11-28 20:37:08 +02:00
Delyan Angelov
31fe02de8c
builtin,crypto: fix problems detected by -fsanitize=address,undefined and -fsanitize=memory
2021-11-28 20:35:18 +02:00
Delyan Angelov
b4c52b72cf
builtin: change the -d debug_malloc
byte pattern to M
so it is easier to spot with a plain text terminal.
2021-11-28 19:23:11 +02:00
Leo Developer
9c88317ca6
checker: add a warning if start value is higher than end value ( #12602 )
2021-11-28 18:46:52 +02:00
Delyan Angelov
5786dd84e6
tests: add a new import_x_json2.v
skipped valgrind test
2021-11-28 18:36:05 +02:00
Delyan Angelov
1913de0187
x.json2: fix compilation with -autofree
2021-11-28 18:32:04 +02:00
Delyan Angelov
969e0dce20
szip: cleanup after tests
2021-11-28 15:30:26 +02:00
Delyan Angelov
dc610a9a80
ci,crypto: fix -cstrict compilation
2021-11-28 15:30:13 +02:00
Larpon
0fc47b50a2
toml: fix date-time and time ms test inconsistency ( #12593 )
2021-11-28 12:42:32 +02:00
Taillook
783aba4552
vlib/crypto/bcrypt: Add bcrypt ( #12595 )
2021-11-28 12:40:50 +02:00
Leo Developer
f72d001db5
cgen: fix $embed_file not finding embedded file when using -prod ( #12596 )
2021-11-28 12:32:05 +02:00
Larpon
1d8ece7ac0
toml: fix, test and optimize nan
and inf
values ( #12592 )
2021-11-27 21:26:28 +02:00
Larpon
22043f2df1
toml: fix float checker bug for -0.01
( #12590 )
2021-11-27 21:03:26 +02:00
Larpon
d52b62a4f4
toml: improve parsing of bare keys to include -
and _
( #12588 )
2021-11-27 15:46:05 +02:00
Delyan Angelov
8315e82188
checker: improve naming for .stmts()
and c.stmts_ending_with_expression()
, add a better explanation for their purpose
2021-11-27 08:09:36 +02:00
Delyan Angelov
deaeffc4db
checker: add a check for unused x << y
expressions (where x != array) ( #12586 )
2021-11-27 07:38:35 +02:00
Joe Conigliaro
12585e88e1
checker: remove obsolete/slow const ordering code. close #12544
2021-11-27 05:36:27 +11:00
Larpon
4383cf7de5
toml: add iarna/toml-spec-tests
to CI tests ( #12583 )
2021-11-26 19:15:01 +02:00
pancake
89bab98833
native: implement a working hello world compilation for w64 ( #12577 )
2021-11-26 19:03:15 +02:00
Larpon
04b030b7ab
toml: add 1MB file parsing test to CI ( #12582 )
2021-11-26 18:11:14 +03:00
Larpon
253e38d9d7
toml: support implicit array of tables key change ( #12580 )
2021-11-26 15:06:28 +02:00
Delyan Angelov
6299a73e90
builder: prepare for v -b native -os windows run file.v
2021-11-26 12:05:58 +02:00
Sandro Martini
85633fe546
tests: test more edge cases for interfaces ( #5292 )
2021-11-26 11:10:03 +02:00
yuyi
cf274f262c
checker, cgen: fix fn type call of match expr ( #12579 )
2021-11-26 09:52:20 +02:00
Larpon
a59eabc4ab
toml: clean up and improve spaced and dotted key parsing ( #12576 )
2021-11-25 16:51:54 +02:00
playX
f584e70cf2
js: add fixes for generic structures and functions; add promise API; refactor modules ( #12575 )
2021-11-25 16:49:53 +02:00
yuyi
ac3910b8c2
checker: merge comptime_const_eval.v and noreturn.v into checker.v ( #12573 )
2021-11-25 12:41:26 +02:00
Larpon
9a2c563735
toml: add conversion of ast inf and nan to Any ( #12567 )
2021-11-25 12:33:54 +02:00
Larpon
11d70624af
toml: streamline value() api ( #12568 )
2021-11-24 20:39:22 +02:00
Larpon
f825306cff
toml: workaround #9507 ( #12566 )
2021-11-24 20:36:15 +02:00
playX
b0bc112168
jsdom, examples: add more WebGL APIs; add interactive 3D cube example running on VJS ( #12562 )
2021-11-24 20:31:39 +02:00
Larpon
ff95cf18d4
toml: expand short date time milliseconds in decoder ( #12564 )
2021-11-24 14:49:23 +02:00
yuyi
6f46fc2170
checker, cgen: fix for_in_mut iterator val ( #12563 )
2021-11-24 14:43:37 +02:00
yuyi
43a1d2cfea
ast: cleanup table.v ( #12561 )
2021-11-24 09:56:56 +02:00
pancake
70ff00efbb
bootstrapping: fix building V on OpenBSD ( #12558 )
2021-11-24 09:46:46 +02:00
Delyan Angelov
8e0de2036d
net: use vmemset(&hints, 0, int(sizeof(hints)))
, instead of zeroing the fields 1 by 1
2021-11-24 09:34:48 +02:00
yuyi
e42db5bee2
ast: fix vtl compile error of generic array type cname ( #12555 )
2021-11-23 20:11:51 +02:00
Larpon
1be6aed16e
toml: support checking and decoding quoted keys ( #12552 )
2021-11-23 16:59:07 +02:00
Larpon
0779b5fd8e
toml: fix implicit array allocation ( #12553 )
2021-11-23 16:51:24 +02:00
Larpon
49cd1b3d59
toml: make value of +nan
/-nan
decode to nan
( #12542 )
2021-11-23 16:23:16 +02:00
playX
12ffe04212
jsdom, builtin/js: WebGL W.I.P; Added support for casting V arrays to typed arrays ( #12551 )
...
* builtin/js: TypedArray support
* jsdom: WebGL W.I.P
2021-11-23 14:51:59 +02:00
Larpon
e9efed02f0
toml: fix decoding most large number values ( #12541 )
2021-11-23 13:23:16 +02:00
Larpon
3f0e532660
toml: fix unicode and escape value decoding ( #12534 )
2021-11-23 11:02:43 +02:00
yuyi
13a2d547b4
checker: fix vtl compile error ( #12550 )
2021-11-23 10:55:15 +02:00
zakuro
93bdff5589
fmt: remove unnecessary paren in assert stmt ( #12546 )
2021-11-23 07:30:54 +02:00
yuyi
fbe2b5cb58
checker: check argument type error of the generics fn declaration ( #12539 )
2021-11-22 22:39:20 +02:00
Delyan Angelov
d431145a39
v.util,tools: use os.join_path_single
2021-11-22 21:42:55 +02:00
Delyan Angelov
bd9564e38b
ci: fix failing ttf_test.v after making char
unavailable for variable names
2021-11-22 18:28:25 +02:00
yuyi
f37eb6a932
checker: check invalid fn parameter name ( #12540 )
2021-11-22 16:51:58 +02:00
Delyan Angelov
6914763493
vc: reduce further the average vc commit diff size
2021-11-22 16:46:28 +02:00
Delyan Angelov
5e8288528a
ci: fix v -b js vlib/builtin/js/array_test.js.v
2021-11-22 15:11:33 +02:00
Delyan Angelov
6a252ed015
os: implement a JS version of os.join_path_single too
2021-11-22 15:03:05 +02:00
Delyan Angelov
7a0dc60d04
os: re-add the leak in os.join_path (the os.join_path(x, ...arr)
case should be handled by V). Add a memleak free os.join_path_single version.
2021-11-22 14:40:55 +02:00
Delyan Angelov
5e1782bf9c
tests: add more common patterns of os function usage in the -autofree test import_os_and_use_its_constants.v
2021-11-22 13:37:06 +02:00
Delyan Angelov
c3b8e5e181
ci: fix compilation on FreeBSD
2021-11-22 09:32:13 +00:00
Delyan Angelov
84aa05f8fb
ci: fix macos build
2021-11-22 11:07:26 +02:00
Delyan Angelov
fe48380e85
os: cleanup; ci: fix a segfault in the tcc32 job when calling pref.vexe_path() -> os.real_path(os.executable())
2021-11-22 10:32:10 +02:00
Delyan Angelov
e77a11001e
os: make init_os_args_wide (windows), more simillar to the current init_os_args (unix)
2021-11-21 23:04:30 +02:00
Delyan Angelov
c7bd74e0f8
ci: fix build, remove [manualfree]
from os.vmodules_paths for now
2021-11-21 22:34:38 +02:00
Delyan Angelov
1aaac13a60
cgen: make os
less special, fix an -autofree leak on just import os
...
* Improve documentation of v.util.Surrounder
* Remove `os` from the list of "no auto free" `builtin` mods
* Fix -autofree freeing of `const x = []string{}`.
* Add a valgrind regression test.
* Implement os.getenv_opt in vlib/os/environment.js.v too.
2021-11-21 21:50:10 +02:00
Delyan Angelov
117c99d938
v.util: add Surrounder.builder_write_befores and Surrounder.builder_write_afters methods for writing to an existing strings.Builder
2021-11-21 20:56:47 +02:00
kahsa
480f3876ee
gg: fix system_font_path ( #12533 )
2021-11-21 19:12:15 +02:00
playX
243e66a106
js,jsdom: Canvas & context API; Added TypeSymbol.is_js_compatible & temporary hacks for JS ifaces ( #12526 )
2021-11-20 21:28:11 +02:00
Delyan Angelov
258d0d6df7
cgen: make dump(x)
use a single write call, fix memleaks for autogenerated .str() methods of nested structs ( #12529 )
2021-11-20 20:55:19 +02:00
Larpon
f1dd0e3355
toml: add value decoding ( #12521 )
2021-11-20 19:48:44 +02:00
Larpon
4b9e8e243c
toml: support arrays in value key query syntax ( #12527 )
2021-11-20 19:45:17 +02:00
Ned
82010e729d
checker: fix "unregistered" variadic interface call arguments ( #12525 )
2021-11-20 18:15:20 +02:00
Delyan Angelov
90ba856107
cgen: fix dump(x)
with fn (x &Type) str() string {
2021-11-20 13:12:03 +02:00
Delyan Angelov
24ffc1ffb2
os: fix os.rmdir_all for folders with recursive symlinks
2021-11-20 10:28:12 +02:00
Larpon
1bbc73384c
toml: fix memory corruption when returning new date/time types ( #12507 )
2021-11-19 20:35:11 +02:00
Larpon
a894a6cf36
toml: fix parsing of alphanumeric keys ( #12517 )
2021-11-19 20:34:21 +02:00
yuyi
eec8788333
checker: fix generics fn infer nested generic fn ( #12519 )
2021-11-19 20:31:55 +02:00
Delyan Angelov
b576181a66
cgen: fix const x := opt() or {}
side effect interference when the consts are in different files in the same module too
2021-11-19 19:02:33 +02:00
Delyan Angelov
e275220f05
cgen: fix const x := opt() or {}
side effect interference with parallel cgen
2021-11-19 18:15:06 +02:00
Delyan Angelov
762a7fde2a
os: add os.getenv_opt/1
2021-11-19 17:47:45 +02:00
yuyi
c2eb909c9b
cgen: fix multiple matches in one expr ( #12516 )
2021-11-19 13:52:28 +02:00
pancake
80a4ff9900
native: handle some more statements and dont echo warnings ( #12518 )
2021-11-19 13:50:44 +02:00
Delyan Angelov
fa995ca537
checker: add an error for x.method({})
calls, when method expects a struct
2021-11-19 13:30:45 +02:00
pancake
9eac656e55
native: support passing a directory, instead of just a .v file ( #12512 )
2021-11-19 10:30:46 +02:00
Larpon
76cf11e6b5
toml: add Any.default_to() method ( #12506 )
2021-11-19 10:26:45 +02:00
pancake
b367ed9ba3
native: support defining functions in any order ( #12511 )
2021-11-19 10:25:42 +02:00
yuyi
d498c365c2
checker: cleanup infer_fn_generic_types() ( #12515 )
2021-11-19 10:24:03 +02:00
Delyan Angelov
24ba660367
bitfield,flag: document the remaining functions
2021-11-18 20:15:26 +02:00
Larpon
96554fad71
toml: improve number conversion ( #12509 )
2021-11-18 19:46:19 +02:00
Delyan Angelov
3caeadfa0d
cgen,vfmt: support [weak]
tags for functions and globals
2021-11-18 18:32:39 +02:00
Larpon
7fba3e65e9
toml: support empty tables ( #12504 )
2021-11-18 15:39:44 +02:00
Larpon
24ea15c8f0
toml: remove fixed value tests from skip list ( #12503 )
2021-11-18 13:57:14 +02:00
kahsa
0ec02e3247
sqlite: add enum result code ( #12505 )
2021-11-18 13:56:15 +02:00
Larpon
7ec70d5477
toml: small refactor, move all json functionality to submodule ( #12502 )
2021-11-18 13:27:59 +02:00
Alexander Medvednikov
5bf28c5287
cgen: handle c2v fn casts
2021-11-18 11:58:00 +03:00
playX
1edb3e559e
js,jsdom: make JS structs plain objects; add more DOM API support for jsdom ( #12501 )
2021-11-18 10:09:53 +02:00
Larpon
409321327b
toml: don't use time.Time for time representation ( #12498 )
2021-11-18 07:44:24 +02:00
zakuro
b5e410e408
fmt: format explicit map init with parameter ( #12499 )
2021-11-18 08:34:30 +03:00
Don Park
ae54cd78f5
json2: encode ascii chars < 0x20 in json ( #12494 )
2021-11-18 08:34:00 +03:00
zakuro
26fbf1885d
checker: report error for test functions that have parameters ( #12500 )
2021-11-18 08:33:28 +03:00
Larpon
3b612899bf
toml: eat first nl if present in multiline strings ( #12496 )
2021-11-17 23:48:29 +02:00
Larpon
81455acd29
toml: simplify Doc.to_any() method ( #12495 )
2021-11-17 20:58:06 +02:00
Larpon
2f5fae06ee
toml: fix a few string value tests ( #12493 )
2021-11-17 20:54:48 +02:00
Delyan Angelov
2733319879
term: fix a leak in _test.v files in the default test runner without -autofree
2021-11-17 20:39:08 +02:00
Larpon
dbf469e000
toml: move to_burntsushi functionality ( #12492 )
2021-11-17 17:25:50 +02:00
Larpon
7cdc906683
toml: fix scanning of short unicode escapes ( #12491 )
2021-11-17 17:24:40 +02:00
yuyi
3e1fb22a04
checker: format checker.v ( #12490 )
2021-11-17 15:57:17 +02:00
yuyi
1370516f53
checker: check struct field using 'any' type ( #12489 )
2021-11-17 11:42:05 +02:00
playX
2eb02ff5a7
jsdom, js: start refactoring jsdom; improve JS interfaces; add two attributes for them ( #12488 )
2021-11-17 11:41:33 +02:00
Delyan Angelov
6ac109a7c3
builtin: add a [has_globals]
tag for all the .v files, with global declarations in them
2021-11-17 10:29:06 +02:00
Larpon
bd9ac598f7
toml: add support for validation of structure and values ( #12481 )
2021-11-17 08:30:40 +02:00
yuyi
5a89c0a480
ast: change CompFor to ComptimeFor ( #12482 )
2021-11-17 08:29:43 +02:00
yuyi
927df948ae
cgen: fix generic struct free() ( #12487 )
2021-11-17 08:18:46 +03:00
Khalyomede
11ce26b3f6
sqlite: make constants public ( #12485 )
2021-11-17 05:45:50 +03:00
Alexander Medvednikov
49a36515dc
checker, cgen: c2v fixes
2021-11-16 20:56:50 +03:00
yuyi
2984751a57
checker: fix the argument mismatch of fn call ( #12479 )
2021-11-16 17:19:02 +02:00
Delyan Angelov
3fab0a5d05
cgen: fix codegen for for k,v in map_of_pointers {
2021-11-16 17:03:58 +02:00
Delyan Angelov
045579fd8a
parser: use the [has_globals]
module attribute, remove the parser global_enabled_mods whitelist
(part 2)
2021-11-16 11:44:36 +02:00
Delyan Angelov
f0f5f97e9f
parser: support a [has_globals]
module attribute, to eliminate a parser whitelist (part 1)
2021-11-16 11:34:26 +02:00
kahsa
3f37ab2ef2
gg: fix system_font_path on Linux ( #12477 )
2021-11-16 12:14:35 +03:00
yuyi
bede0587ad
cgen: fix string interliteral of the comptime selector ( #12475 )
2021-11-16 08:45:47 +02:00
yuyi
9565adf597
checker: check invalid map variable name ( #12474 )
2021-11-16 08:42:49 +02:00
Larpon
2f75ce0d4c
toml: use json2
to encode output from .to_json() ( #12470 )
2021-11-16 08:41:37 +02:00
Larpon
7b9cca7524
toml: add convenience convertion of Doc to map[string]toml.Any ( #12473 )
2021-11-15 19:00:09 +02:00
yuyi
c28041cecc
all: cleanup/rename all comp_
names to be comptime_
( #12467 )
2021-11-15 15:47:29 +02:00
Charles WANG
1d003228cb
tests: update generics_method_str_overload_test.v to return a generic type, instead of Gen<G>
. ( #12465 )
2021-11-15 15:36:54 +02:00
Larpon
cbdb270d2f
toml: upgrade the module to 100% BurntSushi test suite parsing compatibility ( #12466 )
2021-11-15 15:36:14 +02:00
Larpon
78662c800c
toml: fix parsing formatting on Windows with crlf line endings ( #12468 )
2021-11-15 15:35:30 +02:00
playX
a8a1e9381f
strconv,js: f64_to_str works on JS backend now; Fix BigInt usage in infix expressions ( #12464 )
2021-11-15 14:13:44 +02:00
Delyan Angelov
1d2b16dde2
js: support [if userflag?]
fn tags
2021-11-15 13:23:27 +02:00
zakuro
5e75c89b71
checker: allow noreturn in if expr ( #12462 )
2021-11-15 10:29:58 +02:00
yuyi
d8479f107f
cgen: fix typeof comptime selector ( fix #12461 ) ( #12463 )
2021-11-15 10:23:49 +02:00
playX
e3d98b1b28
js,strconv: port some functions to JS backend, improve rune.str()
( #12460 )
2021-11-14 21:06:58 +02:00
yuyi
460f4523aa
checker: check array pop immutable ( #12458 )
2021-11-14 21:00:22 +02:00
yuyi
fb997eb5fe
cgen: fix comptime for in field selector ( #12457 )
2021-11-14 20:58:22 +02:00
Delyan Angelov
61b99e1915
vfmt: handle comments right after interface fields
2021-11-13 13:42:17 +02:00
Larpon
9c508237bd
toml: support for [a."b.c"]
quoted keys ( #12444 )
2021-11-13 11:17:35 +02:00
playX
6c32c544e1
js,parser: allow declaring methods on JS interfaces for easier FFI ( #12447 )
2021-11-13 11:08:17 +02:00
yuyi
3bb1c3f930
checker, cgen: fix for in iterator of generic struct ( #12441 )
2021-11-12 14:29:01 +02:00
Delyan Angelov
50a608aab3
os: remove unnecessary heap allocation from os.execute
2021-11-12 11:45:37 +02:00
Delyan Angelov
c6b8b0bb0a
ci: make test_execute in os_test.v more robust
2021-11-12 11:24:37 +02:00
Delyan Angelov
fcecf527ec
ci: fix failing os_test.v on the CI
2021-11-12 10:27:35 +02:00
Delyan Angelov
20d63de136
os: fix os.execute for command output that contains 0 bytes
2021-11-12 09:39:15 +02:00
Larpon
4b42dcad8e
toml: support complex array-tables-array constructs ( #12438 )
2021-11-11 18:30:34 +02:00
Delyan Angelov
9cb378bb6b
examples: reduce the memory usage of the clock example, without -autofree & -gc boehm
2021-11-11 17:39:02 +02:00
Larpon
c8cb1bf6b4
toml: check for single-key reassignment in inline tables ( #12436 )
2021-11-11 14:57:11 +02:00
Larpon
35f00c9f91
toml: check for text after comma in arrays ( #12435 )
2021-11-11 14:55:51 +02:00
yuyi
6f55439930
tests: supplement tests for different types of generic parameters ( #12432 )
2021-11-11 14:45:55 +02:00
playX
a4c57ba56e
js: support JS interfaces ( #12426 )
2021-11-11 14:36:32 +02:00
Larpon
015cfdb49f
toml: add excerpt to value parse errors ( #12429 )
2021-11-11 07:29:38 +02:00
Larpon
dbd5acd5ba
toml: small start -> end word use change ( #12428 )
2021-11-11 07:28:46 +02:00
Larpon
69fa87ad24
toml: add date and time checks ( #12427 )
2021-11-11 07:27:41 +02:00
zakuro
823a3ab838
fmt: fix removal of selective imported types used as type parameter ( #12431 )
2021-11-11 07:15:30 +02:00
yuyi
72a7d5a559
checker: minor cleanup in method_call ( #12430 )
2021-11-11 07:12:59 +02:00
Delyan Angelov
8a971c3bf7
ci,vweb: fix hard coded data in vweb_test.v
2021-11-10 18:41:25 +02:00
Delyan Angelov
3c6356ba36
ci: fix request_test.v (add missing \r to hardcoded post data)
2021-11-10 18:16:15 +02:00
Delyan Angelov
466ced2876
net.http: fix multipart/form-data file upload handling
2021-11-10 17:31:41 +02:00
Larpon
66e53279c2
toml: check for more wrong line ending cases ( #12424 )
2021-11-10 15:03:51 +02:00
yuyi
d5e767f389
checker, cgen: fix alias of map keys() ( #12422 )
2021-11-10 13:04:59 +02:00
playX
194b3647e2
js,checker: allow casting JS primitives to V primitives and vice-versa ( #12420 )
2021-11-10 11:37:16 +02:00
Delyan Angelov
6c244d3065
cgen: improve diagnostic for a v compiler panic in dicordv
2021-11-10 08:12:12 +02:00
yuyi
8f4180ea09
parser: check generic parameters error of generic struct declaration ( #12418 )
2021-11-09 09:25:57 +02:00
Delyan Angelov
3f841edec1
v.util: make get_vtmp_folder() return /tmp/v_{uid}
by default (see https://github.com/vlang/v/discussions/11796 )
2021-11-09 08:25:19 +02:00
yuyi
08667c5645
pref: allow running a .vsh script with just v build.vsh gcc
, instead of v run build.vsh gcc
( #12409 )
2021-11-08 15:18:11 +02:00
yuyi
758c18a906
cgen: fix for in mut val in array.index() ( #12410 )
2021-11-08 11:12:10 +02:00
yuyi
1211029926
cgen: avoid generating typedef generic array type ( #12407 )
2021-11-07 21:24:30 +02:00
yuyi
c8ff9e39b5
checker: cleanup generic struct init ( #12406 )
2021-11-07 18:47:38 +02:00
Delyan Angelov
bc98da9111
ast: speed up the frequently called methods .find_field, .find_method etc
2021-11-07 18:07:04 +02:00
yuyi
9ec1262734
ast: fix generic nested struct init ( #12405 )
2021-11-07 17:06:37 +02:00
Delyan Angelov
1c12186701
v.token,ast,scanner,parser: use a KeywordsMatcher lookup for builtin_type_names searches too
2021-11-07 16:39:40 +02:00
Delyan Angelov
80242c8041
builtin,ast: apply small performance improvements, suggested by hotspot
2021-11-07 13:30:44 +02:00
playX
d8f971ffb5
jsdom: add Path2D API, All CanvasRenderingContext2D methods (except image methods) ( #12404 )
2021-11-07 10:06:28 +02:00
Delyan Angelov
852d85b3a9
gg: cleanup the minimal gg program more
2021-11-07 09:16:49 +02:00
Delyan Angelov
32b74dd348
gg: simplify the minimal gg application even more with context.user_data = context
2021-11-06 18:24:19 +02:00
Delyan Angelov
8be64ef80e
gg: improve font loading diagnostics with -d debug_font
2021-11-06 17:15:17 +02:00
playX
5f3dcde358
jsdom,builtin: add all methods for DOMMatrix; add conversion methods to convet from/to JS types ( #12395 )
2021-11-06 15:52:24 +02:00
Larpon
d2d67e9f4d
toml: add new inline-table duplicate-key test to skip list ( #12399 )
2021-11-06 15:19:40 +02:00
Larpon
9b00564d98
toml: panic if access fails to a key that was checked ( #12384 )
2021-11-05 14:14:50 +02:00
Larpon
24cd619ff8
toml: fix parsing array of tables ( #12388 )
2021-11-05 12:08:40 +02:00
Larpon
db65b65f3c
toml: disallow spacing between (array of tables) key syntax ( #12382 )
2021-11-05 11:29:25 +02:00
Larpon
c3b389cde9
toml: rename sub_key -> dotted_key ( #12383 )
2021-11-05 11:28:54 +02:00
Alexander Medvednikov
7ea57bfa1e
builtin: make map.keys() public
2021-11-04 19:09:37 +03:00
Alexander Medvednikov
ace9444108
checker: more c2v fixes
2021-11-04 18:43:02 +03:00
Larpon
1999fb9a95
toml: remove some skipped tests related to recent formatting update ( #12380 )
2021-11-04 14:27:14 +02:00
Larpon
fc7f4c5b1f
toml: disallow multiline keys ( #12381 )
2021-11-04 14:26:25 +02:00
yuyi
59e21c2068
cgen: fix array of threads wait ( fix #12350 ) ( #12378 )
2021-11-04 14:24:58 +02:00
yuyi
73e25ccb3c
checker: check generic struct field fn args type mismatch ( #12379 )
2021-11-04 10:18:36 +02:00
Delyan Angelov
a27833ed0d
all: support volatile field Type
in struct declarations
2021-11-04 09:45:50 +02:00
Larpon
1a54817c81
toml: parse formatting ( #12374 )
2021-11-04 09:15:50 +02:00
playX
2b4154910c
jsdom, checker: add more methods for CanvasRenderingContext2D, fix interop check for JS methods ( #12372 )
2021-11-03 16:54:28 +02:00
Delyan Angelov
c4e282a0c8
parser: check fn args in declarations too with -Wimpure-v
...
`v -Wimpure-v examples/2048/` now passes cleanly.
2021-11-03 16:20:24 +02:00
yuyi
4bafc5042b
checker: check generic struct field fn args error ( #12373 )
2021-11-03 10:20:39 +02:00
Larpon
45c938bdec
toml: streamline scanner.at() return type, fixes #12344 ( #12370 )
2021-11-03 10:18:09 +02:00
Larpon
bd5e2db460
toml: add Parser.peek(n) method ( #12369 )
2021-11-03 10:15:40 +02:00
Larpon
99fd84dfe4
toml: fix hex values starting with a, e or E and comments ending with crlf ( #12367 )
2021-11-02 19:07:27 +02:00
yuyi
3fdbfca202
cgen: fix for in
with mutable structs ( #12368 )
2021-11-02 18:40:13 +03:00
yuyi
639cbfa0d1
checker: fix generics with assign nested generic fn call ( #12366 )
2021-11-02 10:12:26 +02:00
yuyi
0952af606c
checker: fix comptime if T is interface ( #12365 )
2021-11-02 09:35:01 +02:00
crthpl
1d1793ec34
fmt: correctly format segment offsets ( #12364 )
2021-11-02 08:04:41 +02:00
yuyi
dcf230ca24
checker: fix nested generic method call ( #12353 )
2021-11-01 15:41:54 +03:00
yuyi
da65680acf
checker: fix comptime if expr of sync.threads ( #12356 )
2021-11-01 09:41:04 +02:00
Lucas Jenß
51f5841b6e
checker: do not deref non-pointer types in fn_signature_using_aliases
( #12340 )
2021-11-01 02:26:15 +03:00
Delyan Angelov
6937074e7a
strings,builder: reduce V cgen and parser memory consumption, fix strings.Builder leak ( #12342 )
2021-10-31 12:58:55 +02:00
Delyan Angelov
579d5ae649
builtin,checker: add array.flags. Allow changing it in unsafe {}
blocks
2021-10-31 11:04:56 +02:00
Delyan Angelov
a7d4236337
sync,strings,cgen: reduce memory consumption in cgen
2021-10-29 22:29:56 +03:00
Delyan Angelov
1785b184b9
readline: improve README.md with working examples
2021-10-29 17:36:17 +03:00
Delyan Angelov
d1acca3e52
ci: fix ./v -cg -cstrict -o v cmd/v
job failures for clang
2021-10-29 17:21:53 +03:00
yuyi
d5642b6134
cgen: fix error of nested match expr ( #12334 )
2021-10-29 17:14:49 +03:00
Delyan Angelov
71392111f8
ci: fix cross compilation of vc/v.c
2021-10-29 17:12:05 +03:00
Delyan Angelov
4c67c01e72
parser,util: improve libleak false positive detection rate
2021-10-29 16:42:55 +03:00
Delyan Angelov
3d800b12e8
scanner: small optimisation of the ident_name hot loop
2021-10-29 16:18:34 +03:00
Delyan Angelov
b86c79329b
os, builtin: reduce leaks without -autofree
2021-10-29 15:49:30 +03:00
Lucas Jenß
f801ef5e17
checker: disallow mut
keyword in right-hand side of assignment ( #12318 )
2021-10-29 12:03:05 +03:00
playX
a32dae335a
js: fix interfaces behaviour & disable struct deep copy for now ( #12333 )
2021-10-29 11:23:40 +03:00
Louis Schmieder
d33f7d12f7
orm: fix time struct in sql stmt ( #12298 )
2021-10-28 22:31:41 +03:00
Larpon
5e4594a121
toml: isolate, fix and regress-test sumtype cast causing memory corruption ( #12329 )
2021-10-28 19:57:30 +03:00
playX
fa02418a55
js: copy variables passed to closures ( #12328 )
2021-10-28 19:31:56 +03:00
yuyi
0e95e4d7b4
ast, cgen: fix generic method str() overload ( #12330 )
2021-10-28 19:03:17 +03:00
Delyan Angelov
475a2f9b43
ci: fix failing vlib/orm/orm_test.v
2021-10-28 17:33:18 +03:00
Delyan Angelov
4d0f6767b1
builtin: use malloc instead of calloc for []Type{cap: size}
2021-10-28 17:18:03 +03:00
Delyan Angelov
2c3e44eb20
strings: use memdup_noscan in Builder.str()
2021-10-28 17:00:16 +03:00
Larpon
a987440e2f
toml: add UTF header support, add BOM tests ( #12326 )
2021-10-28 16:38:49 +03:00
Delyan Angelov
99e71d0868
scanner: preallocate space for tokens to reduce the number of allocations in the hot loop
2021-10-28 16:23:24 +03:00
Larpon
5ecaa160a7
toml: fix paths in skipped tests for Windows compatibility ( #12323 )
2021-10-28 15:56:56 +03:00
Delyan Angelov
8014235e0e
scanner: speed up text_scan by using a specialised keywords matcher, instead of a generic V map of keywords
2021-10-28 15:41:13 +03:00
Delyan Angelov
b1bb1d361a
ci: vfmt parser.v
2021-10-28 10:51:55 +03:00
Delyan Angelov
1b6cccaf6d
parser,checker: allow a goto label right after return
2021-10-28 10:40:31 +03:00
ChAoS_UnItY
8cd01e0eac
cgen: fix error caused by fixed size array init syntax with variable it ( #12314 )
2021-10-28 02:20:49 +03:00
playX
cfecb62299
js: DOM API. Part 1 ( #12296 )
2021-10-27 23:18:09 +03:00
Delyan Angelov
0ff23eeb74
ci: fix failing assign_expr_channel_push.out
2021-10-27 22:54:41 +03:00
Delyan Angelov
f79bc8619a
scanner: remove unused .line_ends field
2021-10-27 22:37:00 +03:00
Larpon
bc3827ae15
toml: improve array parsing ( #12322 )
2021-10-27 20:26:33 +03:00
Lucas Jenß
43fbc68f1e
checker: disallow <-
(channel push) on right-hand side of assignment ( fix #12309 ) ( #12321 )
2021-10-27 17:53:50 +03:00
Delyan Angelov
159a9c3070
markused: fix -skip-unused
on programs with generic methods ( fix #12306 )
2021-10-27 17:22:26 +03:00
Larpon
462d097bf5
toml: small clarification on utf8_max const ( #12320 )
2021-10-27 16:41:22 +03:00
yuyi
943a807d30
parser: implement generics method with auto multi generic types ( #12312 )
2021-10-27 15:41:13 +03:00
Larpon
d53bb54c0a
toml: implement checks for UTF-8 validity ( #12313 )
2021-10-27 15:28:46 +03:00
Wertzui123
ea6d2d53db
parser: disallow for mut in range
( fix #12234 ) ( #12277 )
2021-10-27 14:55:36 +03:00
Larpon
6eaacd3391
toml: improve checker documentation ( #12315 )
2021-10-27 14:31:29 +03:00
Lucas Jenß
d7fd4a563b
parser: remove commented out debug statement ( #12316 )
2021-10-27 14:30:22 +03:00
Larpon
1b9eef74aa
toml: improve inline-table parsing ( #12307 )
2021-10-26 17:00:41 +03:00
Larpon
c526752419
toml: remove unused enum ( #12304 )
2021-10-26 16:58:58 +03:00
Larpon
9a3967bd7d
toml: improve comment support ( #12305 )
2021-10-26 16:58:05 +03:00
Larpon
52df19ef61
toml: check for invalid placement of underscores around exponent ( #12303 )
2021-10-26 13:49:25 +03:00
Andreas Schoeller
f14dabc6bd
math.big: add a new greatest-common-divisor-algo for big.Integer, also add a benchmark for it ( #12261 )
2021-10-26 11:10:13 +03:00
yuyi
f62b2dcfa7
table: fix generic method with multi generic types ( #12297 )
2021-10-26 11:00:27 +03:00
Miccah
655b5c563a
net.http: use [params]
for Config structs ( #12299 )
2021-10-26 10:45:27 +03:00
Delyan Angelov
06796a6119
ci,toml: add the new float/trailing-us-exp.toml to the ignored skip list for now
2021-10-26 10:42:40 +03:00
yuyi
ac99007cab
table: fix generic sumtype instantiations ( #12288 )
2021-10-25 15:22:41 +03:00
kahsa
77a1e3dedb
gg: improve system_font_path on linux ( #12290 )
2021-10-25 15:16:29 +03:00
Bakul Shah
cc2847f6ff
builtin: fix compilation with -gc boehm
on some FreeBSD versions ( #12289 )
2021-10-25 10:24:08 +03:00
Delyan Angelov
45c1c1ab41
ci: fix import_symbol_private_err.vv and its .out file (time.since is no longer private)
2021-10-24 22:06:32 +03:00
Delyan Angelov
49ebba535e
time: implement pub fn since(t Time) Duration
2021-10-24 21:36:28 +03:00
Delyan Angelov
bb71089b70
os: make the os_test.v functions more robust on windows (normalise the returned paths before comparing them)
2021-10-24 19:54:00 +03:00
Delyan Angelov
e99b699ac6
os: make os.mkdir_all more robust (honor / on windows too), add a test for it
2021-10-24 19:16:46 +03:00
Delyan Angelov
f34daf9ff4
os: add os.walk_with_context/3 and a test for it
2021-10-24 19:12:14 +03:00
Delyan Angelov
e34046a0e1
os: remove pub
from impl_walk_ext
2021-10-24 18:48:54 +03:00
Delyan Angelov
d1c4b470bc
os: make os.ls('') return an error, make os.walk_ext more memory efficient on deep hierarchies, add tests for os.walk_ext
2021-10-24 18:44:13 +03:00
Delyan Angelov
d9c6c9a7df
http: cleanup download_file, remove unimplemented download_file_with_progress
2021-10-24 17:19:44 +03:00
playX
2eae4cf63e
js: fix optional error propagation ( #12283 )
2021-10-24 15:56:44 +03:00
Delyan Angelov
c340906280
cgen: cleanup vinit_string_literals, _vcleanup and reload_so declarations
2021-10-24 15:29:42 +03:00
zakuro
242b99340d
vfmt: fix bug where duplicated comma is placed before comment in array init ( #12281 )
2021-10-24 12:05:34 +03:00
penguindark
47a2301139
regex: add OR error, if sourounded by char classes, and a test ( #12278 )
2021-10-24 11:54:51 +03:00
Delyan Angelov
e45cd02029
mysql: always use #include <mysql.h>
, rely on pkgconfig to get the correct include folder
2021-10-23 21:22:10 +03:00
Delyan Angelov
008d15dcb5
builder,pref: add support for -no-builtin
(useful for writing Linux kernel modules)
2021-10-23 12:53:53 +03:00
Delyan Angelov
aa22751d26
vlib: remove unused glm
module ( #12274 )
2021-10-22 22:23:14 +03:00
playX
864d6eae6b
js: codegen & vlib fixes, replace the Game of Life CLI example ( #12272 )
2021-10-22 22:03:19 +03:00
Larpon
8a4756819a
toml: disallow unclosed arrays ( #12273 )
2021-10-22 20:30:29 +03:00
Larpon
8273c0582b
toml: check for illegal characters, fix all related skipped tests ( #12270 )
2021-10-22 19:57:32 +03:00
Larpon
eb364f0301
toml: check for exponents starting with an underscore ( #12271 )
2021-10-22 19:56:43 +03:00
Delyan Angelov
eed94c727c
os: move C struct declarations in their own _default.c.v files ( #12268 )
2021-10-22 17:08:08 +03:00
Delyan Angelov
0401b5ece0
mysql: fix compilation with libmariadb-dev, but no libmysqlclient-dev installed
2021-10-22 16:44:08 +03:00
Larpon
76ff708cf8
toml: squash recently fixed invalid tests ( #12266 )
2021-10-22 13:38:36 +03:00
Larpon
cc2ef4188d
toml: support parsing (+/-)nan and (+/-)inf ( #12256 )
2021-10-22 08:16:47 +03:00
ChAoS_UnItY
5b69593766
cgen,js: fix missing break in switch case, generated by match with range branches ( #12260 )
2021-10-21 22:30:05 +03:00
czkz
da7dad07a3
builder: fix sigint handling for v run
( #12246 )
2021-10-21 16:40:32 +03:00