Commit Graph

99 Commits (17bba712bd950294387220f87d3456f37b388161)

Author SHA1 Message Date
Vincenzo Palazzo 17bba712bd
checker: ban unsafe pointer/fn comparison (#14462) 2022-05-20 18:30:16 +03:00
StunxFS 11bdb04d0c
json: fix struct field default value support (#14304) 2022-05-20 11:22:17 +03:00
yuyi d59f4e9479
ast, cgen: fix generic method with variadic generic argument (#14404) 2022-05-16 12:26:38 +03:00
Daniel Däschle d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
spaceface 332e821518
checker, gen: add support for a [minify] struct attribute (#14247) 2022-05-02 01:59:17 +03:00
Daniel Däschle 08fd0ce0de
all: basic implementation of result type (#14140) 2022-04-30 01:59:14 +03:00
spaceface 14309594fe
ast: add a type_size() method (#14213) 2022-04-28 23:35:10 +03:00
Alexander Medvednikov 7dbfa86f25 all: atomic int fixes 2022-04-27 18:31:21 +03:00
yuyi 52ea0b8cc3
ast: minor cleanup of types.v (#14103) 2022-04-20 14:24:13 +03:00
yuyi fe371845da
ast, checker, cgen: fix aggregations type check (#14066) 2022-04-18 12:38:08 +03:00
Alexander Medvednikov 78cb6e2b41 all: handle fixed []u8 2022-04-15 18:35:56 +03:00
Alexander Medvednikov fbb9e65c0f all: ~500 more byte=>u8 2022-04-15 18:25:45 +03:00
Alexander Medvednikov 0527ac633e ast: remove .byte 2022-04-15 15:30:37 +03:00
Alexander Medvednikov e6ff1508d2 all: make u8 the primary type, byte the alias 2022-04-15 13:43:03 +03:00
Alexander Medvednikov 0dff050735 builtin: u8/byte clean up 2022-04-14 16:43:34 +03:00
Nick Treleaven c780de6282
checker: disallow 'small_unsigned == signed' (#13967) 2022-04-12 19:37:30 +03:00
Vincenzo Palazzo 2d867a2766
ast: fix reported errors, when arrays of types defined in modules are involved (#13952) 2022-04-08 17:38:34 +03:00
yuyi 78d9975798
ast, cgen: restore Type.str() and fix error for it (#13815) 2022-03-24 11:45:06 +02:00
yuyi 35cd8112a5
ast, checker, cgen: fix error for printing alias that has str method (#13809) 2022-03-23 11:52:48 +02:00
Vincenzo Palazzo 8b072aa962
checker: check if generic values have the same types (#13718) 2022-03-23 09:13:10 +02:00
Delyan Angelov 4dd68d3965
ast: small cleanup of using simple string interpolation in a string builder .write_string/1 parameter 2022-03-19 17:25:53 +02:00
yuyi ea3c0166c0
ast: fix error for typeof aggregate (#13735) 2022-03-14 18:42:47 +02:00
yuyi 10ab758aa7
ast: minor cleanup in pref_arch_to_table_language() (#13714) 2022-03-11 14:56:48 +02:00
yuyi dd06698ee3
ast: rename TypeSymbol.is_public to TypeSymbol.is_pub (#13710) 2022-03-10 22:18:57 +02:00
Alexander Medvednikov 36ec47cd20 all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
yuyi 0d9792bdf2
ast: cleanup in find_method_with_generic_parent() (#13600) 2022-02-26 02:11:56 +03:00
yuyi a28249c119
ast: fix for in iterator of generic struct (fix #13579) (#13585) 2022-02-24 10:48:52 +02:00
yuyi f9fc136c24
all: rename InterfaceDecl.ifaces to InterfaceDecl.embeds (#13475) 2022-02-15 11:17:39 +02:00
yuyi ffb263c2e1
ast: minor cleanup of commented struct Field (#13231) 2022-01-21 15:00:21 +02:00
yuyi 05ff8f516d
ast: fix error for generic sumtype init in generic fn call (#13238) 2022-01-21 14:46:55 +02:00
yuyi ba3308296b
ast: rename register_type_symbol to register_sym (#13217) 2022-01-19 20:16:23 +02:00
yuyi 6c1ae4f689
ast: simplify mktyp() (#13028) 2022-01-04 18:37:18 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
Delyan Angelov bf9f684c59
ast: improve support for type aliases, in TypeSymbol.xyz_info methods 2021-12-30 13:17:10 +02:00
Daniel Däschle 35282396ec
all: inline sum types (#12912) 2021-12-25 18:26:40 +03:00
yuyi cd0b581445
ast: rename 'table.get_type_symbol()' to 'table.sym()' and more related calls (#12898) 2021-12-19 18:25:18 +02:00
zakuro 7379488cee
fmt: fix bug that adds unnecessary module name to generic types (#12758) 2021-12-08 22:33:58 +02:00
Delyan Angelov 6d97b0a407
checker: improve checking of a << b, when a and b are numbers (#12589) 2021-11-29 03:48:49 +03:00
playX 243e66a106
js,jsdom: Canvas & context API; Added TypeSymbol.is_js_compatible & temporary hacks for JS ifaces (#12526) 2021-11-20 21:28:11 +02:00
Delyan Angelov bc98da9111
ast: speed up the frequently called methods .find_field, .find_method etc 2021-11-07 18:07:04 +02:00
Delyan Angelov 1c12186701
v.token,ast,scanner,parser: use a KeywordsMatcher lookup for builtin_type_names searches too 2021-11-07 16:39:40 +02:00
Delyan Angelov 80242c8041
builtin,ast: apply small performance improvements, suggested by `hotspot` 2021-11-07 13:30:44 +02:00
Lucas Jenß 51f5841b6e
checker: do not deref non-pointer types in `fn_signature_using_aliases` (#12340) 2021-11-01 02:26:15 +03:00
yuyi 0e95e4d7b4
ast, cgen: fix generic method str() overload (#12330) 2021-10-28 19:03:17 +03:00
playX c1aa782a6c
js,checker: fix some modules build for `v -b js self`, fix `or block` check in ast.CallExpr (#12231) 2021-10-19 12:11:54 +03:00
yuyi f1742a6f62
v.ast: change 'type.to_ptr()' to 'type.ref()' (#12086) 2021-10-06 20:49:39 +03:00
yuyi 8789cc422c
v.ast: fix fmt of 'bytestr' to '&byte' (#12014) 2021-09-29 13:53:46 +03:00
crthpl 85b58b03a3
cgen: parallelize (#10844) 2021-09-28 10:28:04 +03:00
yuyi 108a01d65f
fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +03:00
Enzo b2ecca3966
all: remove `size_t` (#11478) 2021-09-21 02:12:38 +03:00