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

201 Commits

Author SHA1 Message Date
Alexander Medvednikov
e5e31f7210 sort: handle .sort(a.field > b.field) 2020-08-12 06:11:40 +02:00
Alexander Medvednikov
4bc0dde413 all: new .sort(a < b) syntax 2020-08-12 05:54:51 +02:00
Nick Treleaven
2dd90de993
parser: error on [unsafe_fn] (#6090) 2020-08-09 12:22:11 +03:00
Nick Treleaven
a74cbf55c7
checker: warn if C.m* or C.s* functions are called outside unsafe blocks (#5869) 2020-07-20 20:06:41 +03:00
Nick Treleaven
105a0e015e
checker: warn if unsafe method called outside unsafe block (#5863) 2020-07-17 19:14:12 +02:00
Nick Treleaven
f5e6a83a05
builtin: unsafe vlib pointer indexing (#5836) 2020-07-15 21:56:50 +02:00
Delyan Angelov
cf7d03bda6 builtin: implement array.pop() 2020-07-14 20:01:39 +03:00
Alexander Medvednikov
ab3c1f2a08 prealloc: skip frees for now 2020-07-11 13:22:18 +02:00
yuyi
fae601fe39
array: add reverse_in_place for performance (#5798) 2020-07-11 13:17:11 +02:00
Alexander Medvednikov
649821be4c all: use v_realloc 2020-07-11 12:37:54 +02:00
Nick Treleaven
0b49e4db1c
v/checker.v: disallow pointer arithmetic for InfixExpr outside unsafe {} (#5640) 2020-07-03 18:10:10 +02:00
yuyi
dc8b82e9a4
array: fix multiple array clone 2020-06-19 13:32:55 +02:00
yuyi
930c3d73c1
cgen: fix arr.insert(0, [1,2,3]) and arr.prepend([1,2,3]) 2020-06-18 12:08:11 +02:00
yuyi
b4ad174b7f
array: fix multiple array.repeat index error 2020-06-12 11:42:26 +02:00
yuyi
ff1437fc5a
cgen: fix multi_array index issue 2020-06-12 01:24:25 +02:00
Ned Palacios
8f9f426479
vdoc: plaintext fixes 2020-06-10 11:14:03 +02:00
Uwe Krüger
013fdb8a4b
checker: restrict numeric promotions to cases where no data is lost 2020-05-27 05:42:48 +02:00
Delyan Angelov
2adfbfc830 builtin: fix a bug in array_delete 2020-05-24 11:10:41 +03:00
Uwe Krüger
2635be511f
all: re-apply C++ support 2020-05-18 21:38:06 +02:00
Alexander Medvednikov
07a78b2843 Revert "all: C++ compiler support"
This reverts commit 9a237c3e82.
2020-05-18 17:05:48 +02:00
Uwe Krüger
9a237c3e82
all: C++ compiler support 2020-05-18 15:51:36 +02:00
yuyi
7f4cf08516
parser: check (mut f Foo) syntax 2020-05-17 13:51:18 +02:00
yuyi
9b6ee8e77d
cgen: array_init_with_default 2020-05-16 15:21:37 +02:00
Uwe Krüger
722a2c71c3
builtin: new_array: cap should not be less than len 2020-05-07 22:41:41 +02:00
Delyan Angelov
f638caef39 compiler: v -autofree can now compile itself 2020-05-06 19:03:51 +03:00
Enzo Baldisserri
682838a0cf
checker: check array and fields mutability 2020-04-27 22:53:26 +02:00
yuyi
e9f764db4f
cgen: uniform string output format 2020-04-27 14:48:28 +02:00
Alexander Medvednikov
3256d060f7 array: inline ensure_cap 2020-04-27 07:39:33 +02:00
Alexander Medvednikov
83552a0d58 array: replace make() with the new init syntax 2020-04-26 17:52:27 +02:00
Alexander Medvednikov
3ab8dc0092 parser: array init: []string => []string{} 2020-04-26 09:17:17 +02:00
Delyan Angelov
620fc962d7 builtin: use single line imports, to make analysis easier 2020-04-26 08:06:39 +03:00
Alexander Medvednikov
d54b48b300 table: interface cast fix 2020-04-25 09:18:10 +02:00
Alexander Medvednikov
9229a963ed array: use __new_array everywhere 2020-04-25 09:10:54 +02:00
Alexander Medvednikov
48857090fc runtime as type check: part 2 2020-04-25 08:42:23 +02:00
yuyi
27e04748ed
cgen:gen_str_for_array 2020-04-19 10:42:34 +02:00
Kris Cherven
a3ab5df2ed
cgen: prepend __ to new_array 2020-04-15 20:12:06 +02:00
Alexander Medvednikov
f91d527154 deprecate import module 2020-04-14 18:27:30 +02:00
yuyi
682c619456
array: fix array_byte.str error 2020-04-14 05:55:53 +02:00
Alexander Medvednikov
f748390172 parser: do no allow var names with __; cgen: use __argc 2020-04-04 14:55:40 +02:00
Alexey
01aa2b86f5
array, map: cast voidptr to byteptr 2020-04-02 15:31:44 +02:00
Alexander Medvednikov
d4df916581 array: cast data to byteptr 2020-04-02 14:58:45 +02:00
Alexander Medvednikov
507f4ce87a array: handle "0" strings 2020-04-02 01:47:32 +02:00
Alexander Medvednikov
1cfe44d9c6 fix windows build 2020-04-02 01:15:00 +02:00
Alexander Medvednikov
db59c621e8 v2: minor fixes 2020-03-27 08:47:02 +01:00
Alexander Medvednikov
e5f6a0949f cgen: autofree: first step 2020-03-21 19:52:19 +01:00
Alexander Medvednikov
4fac09bcb4 array: simplify reverse() memcpy call 2020-03-20 16:51:36 +01:00
Alexander Medvednikov
ca0bae0fcd array: fix reverse() 2020-03-18 18:54:11 +01:00
Alexander Medvednikov
fe6707b26d cgen: minor fixes 2020-03-18 16:47:37 +01:00
Delyan Angelov
de7fed45dc
builtin: implement []int.str() 2020-03-11 18:48:59 +01:00
penguindark
630913d872
builtin: new str(), hex() functions without C.printf 2020-03-11 00:38:11 +01:00
Alexander Medvednikov
de55a26cfe cgen: lots of fixes 2020-03-10 23:21:29 +01:00
Alexander Medvednikov
e3687dc257 checker: check C args 2020-03-08 22:11:56 +01:00
Alexander Medvednikov
b0ece3a9d8
sync: implement pool.work_on_items to process a list of items in parallel 2020-03-04 20:28:42 +01:00
Alexander Medvednikov
f27f832ede cgen: definitions + other fixes; calloc fix 2020-03-04 17:08:28 +01:00
Alexey
cbffbf3438
array: reverse empty arrays correctly 2020-02-29 20:44:02 +01:00
Alexey
99cbc58db8
array: update array.repeat 2020-02-29 15:25:49 +01:00
spaceface777
ef8c1203b4
cleanup: replace C for loops with range 2020-02-24 17:55:16 +01:00
Alexander Medvednikov
c314ab7b60 fix cmdline_test.v 2020-02-18 20:31:15 +01:00
Alexander Medvednikov
480af3f381 v2: checker fixes 2020-02-18 20:06:01 +01:00
prime31
a2838ae6f3
array: add array.trim() 2020-02-17 20:31:40 +01:00
Delyan Angelov
195f3f465b
option to disable bounds checking; examples/path_tracing.v: optimizations 2020-02-16 16:13:45 +01:00
Alexander Medvednikov
d9cf98f772 v2: imports 2020-02-12 01:16:38 +01:00
Alexander Medvednikov
17212f816c v2: high order functions 2020-02-11 13:21:41 +01:00
Alexander Medvednikov
f782388148 v2: minor fixes 2020-02-07 21:29:28 +01:00
Alexander Medvednikov
18a3961992 array.v: use as cast 2020-02-07 09:38:28 +01:00
Alexander Medvednikov
b23854b2ab array.v: fix the build 2020-02-07 09:22:52 +01:00
Alexander Medvednikov
f241945d70 v2: as cast 2020-02-07 09:19:45 +01:00
Alexander Medvednikov
bb60b3081f v2: parse builtin successfully 2020-02-07 07:34:18 +01:00
Alexander Medvednikov
432ee93916 v2: break, continue, for in fixes, fixed size array, | 2020-02-04 08:29:50 +01:00
Alexander Medvednikov
1ac7a95f9b fix array_test.v 2020-02-03 10:27:06 +01:00
Alexander Medvednikov
34e9eb32bb sum types: allow modification in match 2020-02-03 09:11:10 +01:00
Alexander Medvednikov
71653273f6 v2: range, *, function object 2020-02-02 14:32:12 +01:00
prime31
08d3401092 array: clear() 2020-01-27 22:31:48 +01:00
Shun Sakai
c8c43a2475 update copyright year 2020-01-23 21:04:46 +01:00
Charles WANG
136c469ef7 array: more eq functions 2020-01-21 18:49:30 +01:00
Alexander Medvednikov
cf1fd6e950 array: fix arr << arr bug 2020-01-19 12:11:58 +00:00
Alexander Medvednikov
4c7df98ac9 make private struct warning an error 2020-01-12 19:59:57 +01:00
Alexander Medvednikov
e70ef5334a fix array copy; ci: test prebuilt Windows package 2020-01-08 11:33:09 +01:00
Alexander Medvednikov
3c0fca9258 register methods (wip) 2020-01-08 10:19:18 +01:00
Alexander Medvednikov
d823d82207 array type fix; method registration 2020-01-07 13:10:09 +01:00
Alexander Medvednikov
706c6066d5 index expression 2020-01-07 12:18:13 +01:00
Alexander Medvednikov
48ea1153a5 for ;; syntax 2020-01-07 00:14:19 +01:00
Alexander Medvednikov
3344111a03 minor fixes and cleaning up 2020-01-04 00:06:06 +01:00
Alexander Medvednikov
492dfebd15 SelectorExpr; receivers; struct field check; if expression 2020-01-02 20:09:23 +01:00
Alexander Medvednikov
4d31d5882d x64, v2 backends 2019-12-31 19:42:16 +01:00
Alexander Medvednikov
da5fb5dcbd Revert "x64, v2 backends"
This reverts commit 81ae54d9bd.
2019-12-31 13:23:12 +01:00
Alexander Medvednikov
81ae54d9bd x64, v2 backends 2019-12-31 13:21:22 +01:00
Steve Phillips
6e9493887d builtin/array.v: Fixed typo in new_array (cap -> cap_) 2019-12-20 23:09:59 +03:00
Alexander Medvednikov
d082b3f4b9 run vfmt on vlib/builtin 2019-12-20 00:12:29 +03:00
Alexander Medvednikov
76c800ffb6 bring back array.eq 2019-12-19 23:49:40 +03:00
Alexander Medvednikov
d38687f893 run vfmt on cc, cgen, comptime, if_match 2019-12-19 23:43:23 +03:00
Alexander Medvednikov
1cef83aea4 run vfmt on array.v 2019-12-18 21:20:41 +03:00
Alexander Medvednikov
ea781a557f array: slice_clone() 2019-12-17 01:29:40 +03:00
Alexander Medvednikov
562f24336d add ./v2 to gitignore 2019-12-17 01:21:18 +03:00
Alexander Medvednikov
54707ff81d do not allow calloc(0) 2019-12-16 22:48:55 +03:00
Alexander Medvednikov
3fea8f3de5 *char => charptr everywhere 2019-12-01 10:33:26 +03:00
Alexander Medvednikov
7e4799334f array: make left/right/slice private 2019-11-30 12:37:34 +03:00
Alexander Medvednikov
c98db8c437 array: fix sort() for ints 2019-11-19 00:27:35 +03:00
Jiten Palaparthi
32fbc2bdf3 remove pub for a private function in array.v 2019-11-18 00:43:23 +03:00
Don Alfons Nisnoni
d732be64f6 array: update docs 2019-11-12 19:26:04 +03:00