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

129 Commits

Author SHA1 Message Date
Uwe Krüger
076089d3c5
checker: apply stricter type checks to function args and return types 2020-06-01 21:15:59 +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
ka-weihe
64173c792f
builtin: map: fix memory leak 2020-05-26 17:59:52 +02:00
ka-weihe
8ea0c812a2
builtin: map.clone() 2020-05-26 01:52:06 +02:00
yuyi
7f4cf08516
parser: check (mut f Foo) syntax 2020-05-17 13:51:18 +02:00
ka-weihe
85763d0539
map: faster get and exists 2020-05-09 12:42:01 +02:00
Delyan Angelov
f638caef39 compiler: v -autofree can now compile itself 2020-05-06 19:03:51 +03:00
ka-weihe
f27fd63f8c
builtin: map: one voidptr for all values 2020-05-04 14:56:19 +02:00
Henrixounez
f6d74c8a37
checker: error on ternary if type mismatch 2020-04-30 09:32:29 +02:00
ka-weihe
18faaefe82
map: get: remove malloc and memcpy 2020-04-27 13:27:33 +02:00
Delyan Angelov
620fc962d7 builtin: use single line imports, to make analysis easier 2020-04-26 08:06:39 +03:00
Kris Cherven
b288ecb795
cgen: add map string generation 2020-04-22 04:00:38 +02:00
ka-weihe
e247690fe1
map: fast_string_eq and improved comments
* improved comments and fast_string_eq
* make it pass CI
* enumerate traits
* Add parameter back
* remove space
* remove parameter
* Allow bootstrap compilation in one step with old vc (add new_map/2 shim).
2020-04-12 15:10:06 +03:00
yuyi
bf20b01586
map: fix map_test.v error 2020-04-09 03:57:08 +02:00
ka-weihe
7406abe3b6
map: use strcmp and update wyhash 2020-04-08 00:02:15 +02:00
ka-weihe
a30d292385
map: fix leaksfree fix (#4254) 2020-04-05 23:31:53 +02:00
ka-weihe
307daacf67
depgraph/map: fix memory bug 2020-04-05 22:09:52 +02:00
Alexander Medvednikov
440f1cf4c6 map: remove old get methods 2020-04-04 14:22:39 +02:00
Alexey
01aa2b86f5
array, map: cast voidptr to byteptr 2020-04-02 15:31:44 +02:00
joe-conigliaro
718819eb7a
map/scope/checker: update just var type & ret zero in map.get3 2020-03-29 00:00:28 +11:00
Alexander Medvednikov
2e29e09b1b cgen: fix map_get: use zero value if the key was not found 2020-03-23 20:02:09 +01:00
ka-weihe
bf97afb9ed
map: small cleanup 2020-03-21 13:55:07 +01:00
Alexander Medvednikov
66639924a4 map: make compilable with V2 2020-03-19 07:05:20 +01:00
ka-weihe
bd0548548a
map: new memory layout and map.get2() 2020-03-19 06:52:34 +01:00
Alexander Medvednikov
a011b8951a cgen: if/match expressions and other fixes 2020-03-18 08:41:49 +01:00
Joe Conigliaro
d456cc479c builtin: revert map to version before 35dd785 until bug is fixed 2020-03-16 23:01:31 +11:00
Alexander Medvednikov
b43ac2783d map: make compilable with the new compiler 2020-03-12 20:26:29 +01:00
ka-weihe
35dd7855a0
map: new memory layout and optimizations 2020-03-12 19:36:05 +01:00
Joe Conigliaro
b750f1d1bb compiler: prerequisite changes for upcoming map update 2020-03-12 22:19:13 +11:00
Alexander Medvednikov
75db3e4416 cgen: fix ptr indexing 2020-03-11 05:25:15 +01:00
Alexander Medvednikov
f27f832ede cgen: definitions + other fixes; calloc fix 2020-03-04 17:08:28 +01:00
Nicolas Sauzede
becd87141c
fix linux warnings in generated C code 2020-03-01 13:26:09 +01:00
Alexander Medvednikov
e56bf42270 v2: xor, for x = ... 2020-02-20 21:28:08 +01:00
Alexander Medvednikov
7705281459 map: use hashmap instead of b-tree 2020-02-20 20:05:06 +01:00
Alexander Medvednikov
f413b2fa49 Revert "map: use hashmap instead of b-tree"
This reverts commit 34d926350b.
2020-02-20 17:58:17 +01:00
ka-weihe
34d926350b
map: use hashmap instead of b-tree 2020-02-20 17:28:20 +01:00
Alexander Medvednikov
ec3d67c19f checker: print multiple errors; none 2020-02-19 19:54:42 +01:00
Alexander Medvednikov
082acfad49 v2: fix more ast positions 2020-02-19 11:31:33 +01:00
Alexander Medvednikov
80daaff874 v2: scopes, or, in, hex 2020-02-04 17:44:39 +01:00
Alexander Medvednikov
9b60a50d07 v2: maps, <<, >>, method calls 2020-02-04 12:50:58 +01:00
joe-conigliaro
7f709c3285
update copyright years 2020-02-03 05:00:36 +01:00
Alexander Medvednikov
9f4661391d v2: simplify the type system; an initial version of the V interpreter 2020-02-02 07:56:18 +01:00
ka-weihe
7d797090ff map: bring back b-tree 2020-01-24 20:13:59 +01:00
Alexander Medvednikov
907254b9e8 Revert "B-tree map "
This reverts commit 8a4bce667c.
2019-12-31 12:46:56 +01:00
ka-weihe
8a4bce667c B-tree map 2019-12-30 06:57:56 +01:00
Alexander Medvednikov
d082b3f4b9 run vfmt on vlib/builtin 2019-12-20 00:12:29 +03:00
Alexander Medvednikov
2096018b00 map: another fix + test 2019-12-19 21:17:12 +03:00
Alexander Medvednikov
26f5d34e64 map: fix a bug with an incorrect size after delete() 2019-12-19 21:11:42 +03:00
Alexander Medvednikov
57fbf0b8a9 map: fix in for deleted keys 2019-11-22 20:05:43 +03:00
Amal Shaji
e8d34002e1 map: fixed deletion of non-existent keys 2019-10-30 20:19:59 +03:00
Alexander Medvednikov
4a88a28a3b make all necessary structs public 2019-10-24 12:51:00 +03:00
Alexander Medvednikov
af46bf515f glfw: bring back 64 bit glfw3.dll 2019-10-11 13:47:56 +03:00
Alexander Medvednikov
52c2fa44b8 runtime: nr_cpus() 2019-10-11 13:47:56 +03:00
Alexander Medvednikov
e1dd4c19b5 compiler: cache modules if they are not built yet 2019-10-10 22:53:59 +03:00
Alexander Medvednikov
1f6535afb0 array/map: remove _get(), _push() etc 2019-10-10 01:15:19 +03:00
Alexander Medvednikov
2411b8d1e7 module cache fixes; do not allow function names starting with _ 2019-10-10 00:44:26 +03:00
Alexander Medvednikov
ab52b453cb
map: make .keys() pure 2019-09-25 05:56:10 +03:00
Alexander Medvednikov
a94c1556ce array: remove temporary repeat2() 2019-09-19 05:22:24 +03:00
Alexander Medvednikov
d1500511e6 "none" keyword for optionals + more memory fixes 2019-09-18 14:15:10 +03:00
Alexander Medvednikov
849bef987c more C warnings fixed 2019-09-15 15:53:57 +03:00
Alexander Medvednikov
5cc81b91cb JavaSript backend (early stage) 2019-09-15 03:49:57 +03:00
Alexander Medvednikov
9dd86f6fb8 compiler: more memory logic + replace "cur_fn &Fn" with "cur_fn Fn" 2019-09-13 15:47:31 +03:00
Alexander Medvednikov
76a89c832e parser: small optimizations 2019-08-26 01:19:39 +03:00
Alexander Medvednikov
0e2c41e0f9 replace *Foo with &Foo everywhere 2019-09-01 22:51:16 +03:00
Alexander Medvednikov
2fe20cd092 compiler: fix struct order bug 2019-08-29 23:46:12 +03:00
Nick Treleaven
ea30ba4555 map: remove temporary fields _keys, key_i 2019-08-11 19:43:21 +02:00
Julian Schurhammer
1864e92ff4 parser: disallow statements after a return, branch check $if, $else, switch, and loops correctly 2019-08-10 10:26:42 +02:00
Alexander Medvednikov
7a7b5040e2 http: fix response headers and status code; clean up ft and gg 2019-08-06 03:06:27 +02:00
Joe Conigliaro
2fab73983b add builtin import pass + use builder in map 2019-08-05 06:01:53 +02:00
Alexander Medvednikov
5ed338dc2e bring back map.str() 2019-08-05 04:34:12 +02:00
Alexander Medvednikov
a5f5b52204 map := { 'foo': 'bar' } syntax 2019-08-03 10:20:04 +02:00
Alexander Medvednikov
ddb4f45b02 another map bug fix + fix some warnings 2019-07-31 10:47:58 +02:00
Alexander Medvednikov
a80f32254e map: fix delete() 2019-07-31 09:56:14 +02:00
Alexander Medvednikov
17e8c1d628 map.delete(key) 2019-07-30 21:27:31 +02:00
Alexander Medvednikov
527b9e13fa key in map syntax 2019-07-23 23:00:09 +02:00
Alexander Medvednikov
3b1964e9df migrate remaining code to the new maps 2019-07-14 22:26:21 +02:00
Alexander Medvednikov
f7dbbf5810 re-write map.v and update the compiler 2019-07-14 22:08:17 +02:00
Alexander Medvednikov
5936ab16c8 fix maps; use maps for storing functions; verify struct initialization 2019-07-01 02:24:39 +02:00
Alexander Medvednikov
4594d78bd6 move all vlib modules to vlib/ 2019-06-29 12:00:31 +02:00