Commit Graph

8571 Commits (6c6bb085479338931ee2f1772504e05708674dc5)

Author SHA1 Message Date
playX 8d1ba52d0c
js: fix string.bytes codegen, readline, add tests for `strings` (#12060) 2021-10-04 18:28:30 +03:00
yuyi e94e08475d
cgen: format shared structs (#12062) 2021-10-04 18:27:38 +03:00
yuyi 03269f9854
cgen: fix error of reference struct str() (#12061) 2021-10-04 09:58:50 +03:00
Larpon a8c2c419cd
builtin: improve malloc panic messages (#12054) 2021-10-03 20:27:46 +03:00
Delyan Angelov bfb8116623
ci: let process_test.v repeatedly fail 3 times, before consider it failed 2021-10-03 20:26:38 +03:00
yuyi 82e6d6e51d
cgen: fix threads array wait without go calls (fix #12009) (#12050) 2021-10-03 18:24:44 +03:00
Larpon b62520af9e
os: fix rare crash in read_file. Fix #12052 (#12053) 2021-10-03 18:24:06 +03:00
Anton Zavodchikov 895daf297f
vweb: router refactor (#12041) 2021-10-03 16:26:44 +03:00
Ekopalypse 9be16eba63
v.gen.c: add tests to ensure the same calling convention is used on exported functions for -m32/-m64 (#11977) 2021-10-03 15:47:08 +03:00
spaceface 9b6e07e2a6
cgen: support `index` and `in` for sumtype/interface arrays (#12051) 2021-10-03 15:44:13 +03:00
yuyi 10caf4a84a
cgen: cleanup generated thread wait code (#12048) 2021-10-03 10:52:29 +03:00
playX 9145cd66ec
js: add more tests to builtin/js and implement more builtin functions (#12049) 2021-10-03 10:08:21 +03:00
05st 129c81f34d
cgen: implement eq operator for interfaces (#12047) 2021-10-03 09:04:05 +03:00
05st f282e64fe3
arrays: add binary_search, lower_bound, and upper_bound array operations (#12045) 2021-10-03 08:14:39 +03:00
Nicolas Sauzede 117091452b
os: workaround `_ = C.pipe(&pipeset[0])` gcc warning `warning: ignoring return value of pipe declared with attribute warn_unused_result` (#12046) 2021-10-03 08:09:08 +03:00
05st 86a5e72c74
v.checker: fix return type checking being skipped for mutable method receivers (#12043) 2021-10-02 23:26:46 +03:00
Delyan Angelov 02e4aa0f0e
v.checker: fix panic for `a, b, c = fn_returning_several_maps()` 2021-10-02 18:40:35 +03:00
Delyan Angelov 0916806350
ci: do not use htonll and ntohll on windows, use the portable versions instead. 2021-10-02 18:21:16 +03:00
Delyan Angelov 9a4dbc25ca
ci: fix failing conv_test.v on windows 2021-10-02 15:51:48 +03:00
Anton Zavodchikov 4c8094d0d9
net.http: make public errors and parse_form (#12038) 2021-10-02 15:28:35 +03:00
Anton Zavodchikov 600880660a
net.http: add a deprecated attribute for un/escape functions (#12037) 2021-10-02 15:19:32 +03:00
Delyan Angelov c86935309e
v.gen.c: fix compilation of `if c_struct_1 != c_struct_2 {` 2021-10-02 15:12:18 +03:00
05st cc4af235f3
cgen: fix if-expression code generation if it evaluates to propagating optional / or block (#12032) 2021-10-02 14:30:04 +03:00
Delyan Angelov d1d4877348
net.conv: add a test for the nth16/nth32/nth64/htn16/htn32/htn64 functions 2021-10-02 13:26:09 +03:00
playX 82f187e5e0
js: fix `rand` build, properly use key values on map, add `rand.string` (#12020) 2021-10-01 21:23:49 +03:00
05st 60ecbec8ea
cgen: fix closure code gen with if statement in definition (#12028) 2021-10-01 16:52:34 +03:00
Alexander Ivanov cb149bfa00
checker: show errors for index calls to values which are not functions, fixes #11539 (#12024) 2021-10-01 15:17:02 +03:00
zakuro ce0867f40c
vfmt: fix removal of selective imported type used in map (#12030) 2021-10-01 15:14:21 +03:00
Delyan Angelov 41de0c3c6a
ci: fix `v -cc gcc -cstrict examples/pico/pico.v` 2021-10-01 13:49:38 +03:00
Delyan Angelov 6f7c3a7cdf
ci: do `brew install openssl` on the macos job, reduce flakyness of tcp_test.v 2021-10-01 13:13:05 +03:00
Delyan Angelov 2bdba5ed73
net: fix declarations of C.htonl/C.htons/C.ntohl/C.ntohs in aasocket.c.v 2021-10-01 12:57:47 +03:00
Delyan Angelov 149517ced4
v.builder,v.gen: time Builder.front_stages.parse_files, Builder.resolve_deps, Gen.sort_structs 2021-09-30 20:49:19 +03:00
Alexander Medvednikov 4a6d161c08 orm: postgres fixes 2021-09-30 20:00:27 +03:00
Larpon 8705db5844
toml: fix scanner escape collecting in literal strings (#12022) 2021-09-30 16:04:21 +03:00
Alexander Medvednikov d4b3c65c45 cgen: a minor optimization; checker: a c2v fix 2021-09-30 12:51:53 +03:00
Wertzui123 e3d379a1eb
builtin: add byte.repeat() and rune.repeat() (#12007) 2021-09-30 09:32:20 +03:00
Louis Schmieder f9ceb12e22
checker: fix orm cast check (#12018) 2021-09-30 00:43:08 +03:00
Larpon e3d3727c0c
toml: fix 7 escape tests (#12017) 2021-09-29 19:28:09 +03:00
Alexander Medvednikov c2f535fee1 ci: run the gitly web server test 2021-09-29 19:26:49 +03:00
playX 4333a53f28
js: support running `.js.v` tests in `v test-self`, fixes for array methods & codegen (#12011) 2021-09-29 15:33:14 +03:00
Larpon 4ff061927b
toml: easier scanner configuration (#12016) 2021-09-29 14:53:06 +03:00
yuyi f2c710d306
cgen: fix fn mut args with interface type (#12012) 2021-09-29 13:54:23 +03:00
yuyi 8789cc422c
v.ast: fix fmt of 'bytestr' to '&byte' (#12014) 2021-09-29 13:53:46 +03:00
Larpon d39fec3479
toml: fix unbalanced quoted tests (#12006) 2021-09-29 10:19:49 +03:00
Delyan Angelov 24c1d552d7
ci: vfmt vlib/v/gen/c/cgen.v 2021-09-29 08:58:27 +03:00
André Diego Piske 8dde9d4a7b
cgen: fixes for ... in with index (#11995) 2021-09-28 19:35:07 +03:00
yuyi 5d3795e876
cgen: fix the C codegen error for '_ = map[key]' (fix #11999) (#12000) 2021-09-28 18:45:50 +03:00
Larpon bc4aad5fb4
toml: add quote details to ast.Quoted (#11997) 2021-09-28 17:40:03 +03:00
Delyan Angelov 87fe15e39f
ci: fix typo 2021-09-28 15:30:05 +03:00
Delyan Angelov 3467ab1551
ci: fix the `g++` build and the `alpine-musl` task 2021-09-28 15:29:00 +03:00
Delyan Angelov d07a96ede8
v.gen.c: fix `v examples/hello_world.v` on FreeBSD 2021-09-28 12:00:34 +03:00
Delyan Angelov 8f4fe61381 v.pref: only show the `disabling parallel cgen` message when -no-parallel was not given and -prealloc was 2021-09-28 11:52:27 +03:00
Delyan Angelov 97eb0fc74f ci: workaround linking on macos (missing sem_timedwait) 2021-09-28 11:27:47 +03:00
Delyan Angelov 9e2607db57
sync: rename sync_macos.c.v to sync_darwin.c.v 2021-09-28 11:12:03 +03:00
Delyan Angelov 6b40ead54d
fix `./v -cc g++ run examples/concurrency/concurrency_http.v` 2021-09-28 10:35:02 +03:00
crthpl 85b58b03a3
cgen: parallelize (#10844) 2021-09-28 10:28:04 +03:00
Ken a17b943e87
builtin: add method `byte()` for string (#11998) 2021-09-28 10:08:10 +03:00
Ulises Jeremias Cornejo Fandos c151e075e1
context: update ValueContext to handle Any value and more Key types, use closures (#11993) 2021-09-27 17:52:20 +03:00
yuyi d6a4bce2ef
checker: fix generic array.map with generic callback fn (#11991) 2021-09-27 17:50:15 +03:00
Larpon 2ee873d6ca
toml: fix invalid bad-multiline test (#11996) 2021-09-27 17:42:20 +03:00
Wertzui123 07d65b2aab
builtin: move byte methods from rune.v to int.v (#11987) 2021-09-26 22:34:25 +03:00
czkz 6967a47e07
net.openssl: fix typos in comments (#11988) 2021-09-26 22:33:10 +03:00
Delyan Angelov 6a2ef733de
v.parser: add a generated `.all(.flag1|.flag2)` method to `[flag]` enums
Unlike `.has(.flag1|.flag2)`, which is true, for any of `.flag1` or `.flag2`,
the new method `.all()` tests whether *all flags* are set at the same time.
2021-09-26 21:40:44 +03:00
Rémi 09dfc3f301
arrays: add a generic `arrays.concat(os.args,'abc','xyz')` function (#11985) 2021-09-26 19:41:50 +03:00
yuyi 4c01627e00
cgen: cleanup stmt_path_pos processing (#11983) 2021-09-26 15:51:18 +03:00
yuyi d93737dd34
cgen: fix assign map get to blank (fix #11508) (#11982) 2021-09-26 13:07:51 +03:00
Louis Schmieder 6391f3d2da
orm: fix other int types (#11981) 2021-09-26 11:17:56 +03:00
yuyi e09860731f
cgen: fix if expr with complex nested array call (#11979) 2021-09-26 07:35:48 +03:00
Larpon da47638f42
toml: correct documentation (#11976) 2021-09-26 07:34:47 +03:00
playX 863dd0b23e
js: array improvements (#11952) 2021-09-26 07:33:53 +03:00
penguindark f3757a7cd1
strconv: float memory leak fix (#11980) 2021-09-26 07:33:35 +03:00
yuyi d329e1decd
cgen: fix if expr with nested array calls (fix #11953) (#11973) 2021-09-25 20:38:33 +03:00
Larpon 13b2aa701c
toml: rename ast.Node -> ast.Value (#11974) 2021-09-25 20:31:02 +03:00
Anton Zavodchikov 80c15607da
json: assert encoded struct with a sumtype (#11970) 2021-09-25 20:29:52 +03:00
Larpon 970768288d
gg: expose sapp_desc.swap_interval via gg.Config (#11975) 2021-09-25 15:06:56 +03:00
Miccah 956fdffd96
net.http: allow custom headers in post_multipart_form (#11971) 2021-09-25 10:09:49 +03:00
Larpon 5541ec8670
vlib: add toml module + tests (#11964) 2021-09-24 21:13:52 +03:00
Ruofan XU 834cf40ab2
cgen, fmt, scanner: fix and use nested lambda in scanner (#11967) 2021-09-24 18:21:22 +03:00
Ekopalypse 400ab7876b
ast: fix fixed array typedef generation issue (#11962) 2021-09-24 17:01:42 +03:00
Anton Zavodchikov c75271fcb7
cgen: json sumtype inlining (#11961) 2021-09-24 16:49:00 +03:00
yuyi 430677a0c0
cgen: format generated C code of nested array call (#11955) 2021-09-23 19:56:12 +03:00
Delyan Angelov ad58fe8249
ci: mark cancel_test.v with `vtest retry: 3` 2021-09-23 14:55:10 +03:00
zakuro b354f9ae9a
cgen: fix c error of if-expression when debug mode (#11950) 2021-09-23 14:52:32 +03:00
Delyan Angelov 4a0d00fb30
io.util: simplify random number generation in util.v 2021-09-23 14:20:39 +03:00
Delyan Angelov afc3531945
ci: work around a failing g++ compilation (order of methods in an interface dispatching table matters for C++ compilers) 2021-09-23 14:08:50 +03:00
Delyan Angelov ece5fa183c
fast.v: freebsd fixes 2021-09-23 13:48:41 +03:00
Delyan Angelov 930b95f76c
v.gen.c: fix uninitialised value usages regression after e5fb4e4 2021-09-23 12:24:03 +03:00
Delyan Angelov 8837712f2b
rand: fix leaks with -autofree 2021-09-23 12:24:03 +03:00
Delyan Angelov 79e33d92f1
v.markused: remove `hash.init()` function (map fn usages are detected more precisely) 2021-09-23 12:24:02 +03:00
trollkarlen b52f79e137
log: add temporary get_level() (#11946) 2021-09-23 12:05:11 +03:00
Alexander Ivanov 4d0f835548
checker: fix detection of invalid insertions, fixes #3600 (#11945) 2021-09-23 11:59:43 +03:00
Alexander Medvednikov 27f5c35bde autofree: test returning optionals 2021-09-23 09:18:01 +03:00
yuyi b8935551f1
cgen: fix nested array call (#11948) 2021-09-23 08:50:37 +03:00
Alexander Medvednikov 7b60367512 autofree: free reference types with -experimental for now 2021-09-23 04:35:09 +03:00
Ruofan XU 52b53f17b2
scanner: clean up scanning of `>` (#11943) 2021-09-23 02:24:23 +03:00
Delyan Angelov bf2569a9a8
all: support `mut volatile x := 123` declarations (#11940) 2021-09-22 13:06:30 +03:00
yuyi 76e360ce86
cgen: format the generated C code for array map/filter/all/any methods (#11936) 2021-09-22 09:24:36 +03:00
yuyi e5fb4e4845
cgen: fix if expr with array call (fix #11557) (#11569) 2021-09-22 02:21:18 +03:00
Alexander Ivanov b9720f5d9e
cgen: fix struct init with multiple branches, fixes #11564 (#11570) 2021-09-22 00:46:07 +03:00
yuyi 2f3925a0cf
fmt: format vlib/v/token/token.v (#11568) 2021-09-21 23:29:53 +03:00