Commit Graph

8795 Commits (bd9ac598f75b1576cb65d443faa4e783fd85ed60)

Author SHA1 Message Date
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