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

192 Commits

Author SHA1 Message Date
yuyi
e310513a5f cgen: fix generics with generics fn type parameter (#10078) 2021-05-11 09:24:23 +03:00
yuyi
dcf4d73c87 cgen: format generated struct definition c codes (#10074) 2021-05-10 20:27:52 +03:00
El Koulali András
3e5a5754f3 cgen: fix constants with multi-statement C initializations (#10058) 2021-05-09 03:25:44 +03:00
Delyan Angelov
2eafea6308 v: reduce the memory usage of the compiler (analysed with heaptrack) 2021-05-06 11:44:48 +03:00
Delyan Angelov
d3f2d6f6df cgen: speed up c_name/1 by using a map lookup, instead of a linear search in []string{} 2021-05-03 12:58:40 +03:00
Delyan Angelov
4b818fa2be v: implement interface embedding (#9935) 2021-05-02 03:00:47 +03:00
yuyi
d236d6a473 parser, cgen: fix generics fn typeof name (fix #7357) (#9939) 2021-04-30 13:40:36 +03:00
Louis Schmieder
fb685eee18 orm: support arrays (#9936) 2021-04-30 09:13:26 +03:00
ka-weihe
6795b02e24 cgen: fix enum in map (#9912) 2021-04-28 22:11:32 +03:00
yuyi
9f1ac39770 checker: fix generics with anon generics fn argument (fix #9859) (#9897)
* checker: fix generics with anon generics fn argument

* cgen: fix typedef of generics anon fn

* fix check generics argument types
2021-04-27 15:25:42 +03:00
Don Park
aebb551e93 cgen: do full struct initialisation for V structs, fixes invalid data from map[string]Struct{}['unknown'] (#9878) 2021-04-27 08:18:48 +03:00
Uwe Krüger
787a63dab6 cgen: execute defer block *after* return expression is evaluated (#9893) 2021-04-27 01:42:16 +03:00
Delyan Angelov
5e0ff5c524 cgen: cleanup g.type_default 2021-04-26 11:55:29 +03:00
Uwe Krüger
3c0a368af3 all: automatically move (some) referenced objects to heap (#9873) 2021-04-25 21:40:38 +03:00
zakuro
a0835ac139 checker/cgen: implement in expression for alias of array/map (#9871) 2021-04-25 18:17:54 +03:00
yuyi
8ccdae6188 all: cleanup generics call_expr (#9856) 2021-04-24 09:44:15 +03:00
yuyi
dd2002cc57 cgen: fix generics with multi generics struct receiver (#9853) 2021-04-23 15:17:57 +03:00
yuyi
7b8957b25e cgen: minor simplification in cc_type() (#9833) 2021-04-21 12:23:21 +03:00
spaceface
73352583e7 ci: fix all -cstrict warnings with gcc and clang (#9792) 2021-04-19 15:38:48 +03:00
yuyi
75d1b54f7b cgen: fix empty struct init using macro (#9787) 2021-04-18 16:34:25 +03:00
Delyan Angelov
5817aa47d8 Revert "cgen: fix empty struct init (#9769)"
This reverts commit 0cc04850d7.
2021-04-17 19:19:25 +03:00
yuyi
0cc04850d7 cgen: fix empty struct init (#9769) 2021-04-17 02:39:52 +03:00
Delyan Angelov
0b3d1656f0 cgen: improve -g info for {...} and goto label 2021-04-16 19:13:40 +03:00
Uwe Krüger
80bd2974b4 cgen: fix iteration over shared map (#9763) 2021-04-16 14:49:14 +03:00
ka-weihe
25a9d30a70 channels: fix C warnings (#9732) 2021-04-15 01:44:39 +02:00
yuyi
1250ce4353 cgen: fix generics with embed generics (fix #8694) (#9724) 2021-04-15 01:44:11 +02:00
crthpl
0099458c0a all: small asm fixes and number labels (#9730) 2021-04-15 01:30:23 +02:00
crthpl
14434cc86a all: bare metal support (fix -freestanding) (#9624) 2021-04-14 07:50:50 +02:00
Uwe Krüger
10bf974cda all: gc: provide optimized mode (#9716) 2021-04-14 00:40:26 +02:00
Delyan Angelov
1ef718c1e1 cgen: fix return if cond { x,y } else { a,b } generation 2021-04-13 11:52:18 +03:00
Enzo
5a1a1b7c12 all: merge GoExpr and GoStmt (#9685) 2021-04-11 23:56:25 +02:00
Henrixounez
6cfd53bf57 cgen: generate interfaces after all other typedefs (#9680) 2021-04-12 00:43:19 +03:00
Uwe Krüger
954c436d28 checker/cgen: auto initialize shared elements of structs (#9669) 2021-04-11 10:30:23 +03:00
yuyi
a2a18ef92c v: simplify handling of function generic parameters (#9673) 2021-04-11 09:02:57 +03:00
Uwe Krüger
78c6e35bde checker/cgen: fix v := rlock m { m[key] or { default_val } } (#9666) 2021-04-10 16:57:18 +02:00
Louis Schmieder
64391efa4d orm: add mysql support (#9630)
* add mysql to orm

* fix got to big packet error

* format sql.v

* format example

* custom sql types

* add mysql table cration

* add documentation

* format sql.v

* fix markdown

* start implementing select_expr for mysql

* remove orm.c

* format sql.v

* finish mysql expr

* remove c

* remove unessecary files

* change to c implementation

* remove c

* added str interpolation for idents

* fix string insert

* fix compilation problems

* fix gitly compilation

* fix typing mistake

* add link to orm docs
2021-04-10 17:38:27 +03:00
yuyi
9f093203a4 cgen: fix generics struct_init (#9661) 2021-04-10 17:33:15 +03:00
yuyi
1bcc45f914 cgen: minor cleanup of return_stmt (#9664) 2021-04-10 11:55:34 +03:00
ka-weihe
5273214ec2 map: rename methods (#9657) 2021-04-10 04:00:29 +02:00
Uwe Krüger
b346dd9464 cgen: fix blank identifier in IfGard (if _ := <-ch { ... }, etc) (#9650) 2021-04-09 17:18:36 +02:00
Uwe Krüger
0c710ce470 cgen: register Option_void when used for chan <- x or {...} (#9648) 2021-04-09 17:18:02 +02:00
Delyan Angelov
820fe626e7 v.gen.c: reduce slightly the generated C lines with -skip-unused (3940 -> 3699 for hello_world.v) 2021-04-09 17:56:36 +03:00
spaceface
4feb09fa5b checker, cgen: add sumtype-like smartcasting capabilites to interfaces (#9256) 2021-04-09 11:00:05 +03:00
Alexander Medvednikov
dbaa91810f autofree: fix optional returns 2021-04-06 17:14:11 +03:00
Delyan Angelov
87a16bbfe9 ci: fix -autofree cmd/v compilation job regression 2021-04-06 15:21:18 +03:00
Delyan Angelov
4cde74f120 checker: make the compiler stricter when checking pointers 2021-04-05 10:02:47 +03:00
Alexander Medvednikov
92fa9bbea9 cgen: fix [packed] 2021-04-05 08:02:19 +03:00
Alexander Medvednikov
77d8336db9 cgen: [packed] struct attribute 2021-04-05 06:49:43 +03:00
Alexander Medvednikov
31f8d5542c cgen: remove a "return var" comment 2021-04-03 14:18:00 +03:00
Daniel Däschle
6a5f49afb1 all: support ?Type(none) (#9567) 2021-04-02 16:34:48 +02:00