Commit Graph

12698 Commits (e3da3101f6ba8abc9fc523426e29f17e66a4026e)

Author SHA1 Message Date
Nick Treleaven 3a4bb09de2
doc: improve Arrays section (#13842) 2022-03-27 17:45:00 +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 d748529337
doc: add links to notable array related subheadings (#13838) 2022-03-27 14:29:20 +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
Nick Treleaven dc9fd2bd7e
doc: tweak array methods section (#13837) 2022-03-27 14:26:23 +03:00
Delyan Angelov a07d066e8f
tools: cleanup all temporary files on successfull `v check-md .` 2022-03-27 10:24:10 +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
Larpon 894080b844
ci: update sdl ci to compile shader example (#13805) 2022-03-22 17:36:23 +02:00
Ikko Ashimine 82120d02a8
tools: fix typo in vbug.v (#13802) 2022-03-22 15:47:03 +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 178afd006b
examples: avoid flash of unstyled content in the vweb_assets example 2022-03-21 19:13:53 +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
Delyan Angelov f2e0ab5912
docs: add formatting example for `"[${10.0000:.2f}]"` 2022-03-21 14:42: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 aaf87e04a2
tools: make the mini greeting text in the REPL more informative 2022-03-20 23:22:46 +02:00