Commit Graph

51 Commits (6176ce9f03ee52e0818e5382b3d38cd7b83e0acb)

Author SHA1 Message Date
Alexander Medvednikov 6176ce9f03 all: c2v fixes 2021-12-28 08:00:56 +03:00
Daniel Däschle be0c54caf9
checker: require or block for sumtype map (#11089) 2021-09-10 16:07:39 +03:00
Enzo da53f818df
all: initial support for closures (x64 / linux-only) (#11114) 2021-08-10 21:27:15 +03:00
Uwe Krüger 6068777e03
parser/checker: deduce type of global from initialization expression (#11005) 2021-07-31 16:35:19 +03:00
Alexander Medvednikov 41e88423aa Revert "builtin: use == 0 instead of isnil()"
This reverts commit 8650ec6916.
2021-07-01 06:21:03 +03:00
Delyan Angelov 8650ec6916
builtin: use == 0 instead of isnil()
Do not rely on C inlining that may not happen for a *very* frequently
called fn in lower level code.
2021-06-28 10:59:14 +03:00
Alexander Medvednikov 7458927593 checker: fix global fn calls 2021-06-25 20:26:24 +03:00
yuyi 2298063129
checker: fix nested if smartcast selector exprs (fix #10372 #10379) (#10502) 2021-06-18 14:49:15 +03:00
crthpl 8361f714dd
cgen: fix deadlock when returning/breaking in `lock` (#10079) 2021-05-12 11:44:47 +03:00
Uwe Krüger d26ac5692e
all: various fixes for [heap]/auto-heap handling (#10033) 2021-05-07 15:58:48 +03:00
Delyan Angelov cfcecf898b
v.ast: add .free() methods, so vls can be more decoupled 2021-04-18 10:24:51 +03:00
Delyan Angelov 69ba93f954
ast: remove redundant `import v.ast` 2021-04-02 08:31:29 +03:00
Alexander Medvednikov 7385f8e56b all: a massive merge of ast and table modules 2021-04-02 01:57:09 +03:00
zakuro 522d875489
checker: make it an error, to use ident outside of anon fn (#8232) 2021-01-22 09:24:49 +02:00
Lukas Neubert ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
Lukas Neubert e9affe33ce
ast: fix C error for scope's .str() method (#7561) 2020-12-25 19:03:03 +02:00
Lukas Neubert 2691163a7e
scope: remove redundant name arg from register() (#7077) 2020-12-02 14:40:25 +01:00
Daniel Däschle 966b95ca4e
parser: move mut in if/match to expr (#6973) 2020-11-27 03:08:42 +01:00
Daniel Däschle 7d6f97259f
all: refactor UnionSumType to SumType (#6944) 2020-11-25 13:09:40 +02:00
Daniel Däschle aa6303f0b2
all: use the new types with old syntax (#6922) 2020-11-24 13:58:29 +01:00
Daniel Däschle 838ad16296
all: refactor ast.Expr to use the new sum type implementation (#6792) 2020-11-21 00:05:57 +01:00
Daniel Däschle 20bec81678
checker: smartcast only if type is not mut (#6841) 2020-11-15 16:53:51 +02:00
Daniel Däschle 6271798ce3
cgen: union sum types implementation (#6745) 2020-11-11 09:18:15 +01:00
Alexander Medvednikov 7da1afa140 all: switch to the new fn arg syntax everywhere; add lots of vfmt -verify tests 2020-10-15 12:32:28 +02:00
Alexander Medvednikov 624f22e27e all: mutability check (part 1); enable mutable sumtype args 2020-09-22 05:28:29 +02:00
Alexander Medvednikov dbcb23ddc8 ci: run v vet on cgen and ast 2020-07-01 19:07:19 +02:00
yuyi 7f4cf08516
parser: check `(mut f Foo)` syntax 2020-05-17 13:51:18 +02:00
yuyi 6d0b791ac8
parser: warning about unused imports 2020-05-14 17:14:24 +02:00
joe-conigliaro 2a40665919
ast/checker: cast no longer needed & use auto deref 2020-05-11 20:02:28 +10:00
Alexander Medvednikov c64f8b0d1f parser/checker: pub: struct fields 2020-05-09 15:16:48 +02:00
joe-conigliaro 483f0f408c
ast: allow scope var shadowing 2020-05-02 23:46:53 +10:00
Tanel Liiv 68ca8ab8a4
array: nested map() 2020-05-02 15:26:58 +02:00
joe-conigliaro 9f76a7b250
parser: simplify unused vars & add loop/if vars etc 2020-04-27 23:16:31 +10:00
Alexander Medvednikov 3ab8dc0092 parser: array init: `[]string` => `[]string{}` 2020-04-26 09:17:17 +02:00
Enzo Baldisserri 7e400124e8
parser: allow blank ident in nested loops 2020-04-23 12:00:51 +02:00
Kris Cherven 155891a4e0
parser: add unused variable warning 2020-04-22 01:52:56 +02:00
Delyan Angelov 217e6f3b8e checker/parser: allow for fixed array with sizes defined with a const 2020-04-10 22:01:22 +03:00
Alexander Medvednikov b40fdd9089 scope: find_const 2020-04-08 19:47:20 +02:00
joe-conigliaro bf59828897
ast: const impl & global scope & objects 2020-04-04 14:14:40 +11:00
joe-conigliaro 602bc06bee
ast: use multi return optional for find_scope_and_var 2020-03-31 15:39:14 +11: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 c71d36356b v2: optionals fixes 2020-03-26 14:58:11 +01:00
Joe Conigliaro c9d30f78b7 v: no optional for scope.innermost & more blank_ident 2020-03-10 23:35:25 +11:00
Joe Conigliaro f7a93a69f6 v: fix/gen multi return/assign + merge VarDecl & AssignStmt 2020-03-10 22:01:37 +11:00
Joe Conigliaro 49f3ce0571 v2: add method call receiver to cgen & check method args 2020-03-06 20:52:03 +11:00
Joe Conigliaro c4b9ef388f v2: handle var decl & assign stmt together 1st step combining 2020-02-28 23:29:04 +11:00
Joe Conigliaro 237d83b2ee v2: more work on AssignStmt & multi ret & initial blank ident 2020-02-27 21:12:30 +11:00
joe-conigliaro fcd97f513a v2: module/type/fn name fixes, compile fixes 2020-02-20 21:13:18 +11:00
Alexander Medvednikov 092c09d81f vdoc using the new parser 2020-02-19 16:13:34 +01:00
joe-conigliaro d7f74ecf52
v2: move more type handling to checker + some clean up 2020-02-17 12:25:18 +01:00