v/vlib
ChAoS_UnItY d0c961ebc0
transformer: eliminate unreachable branches in IfExpr and fold more expressions and statements (#12135)
* v: fix using constant as length in fixed array

* format test file

* v/trasnformer: discard unreachable if branches

* transform more expressions and statements

* replace IfExpr with EmptyExpr when all branches were eliminated

* fix typo

* fix gens

* only allows branch elimination on if expression statement

* fix native gen

* fix handling of multi branch ifs in the native backend, also allow for `if true {}`

Co-authored-by: KyleLin921021 <43753315+KyleLin921021@users.noreply.github.com>
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2021-10-11 14:29:17 +03:00
..
arrays arrays: add binary_search, lower_bound, and upper_bound array operations (#12045) 2021-10-03 08:14:39 +03:00
benchmark tests: show the number of parallel jobs used while testing 2021-10-11 13:10:55 +03:00
bitfield vlib: remove deprecated map{} usages as well as deprecated functions (#11035) 2021-08-04 12:44:41 +03:00
builtin math: implement `pow` in pure V (#12105) 2021-10-08 17:44:55 +03:00
cli cli: fix bug that caused help to panic (#11157) 2021-08-12 09:25:28 +03:00
clipboard fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +03:00
context context: update ValueContext to handle Any value and more Key types, use closures (#11993) 2021-09-27 17:52:20 +03:00
crypto fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +03:00
darwin vlib: use `malloc_noscan()` where possible (#10465) 2021-06-15 14:47:11 +03:00
dl v.builder: remove default link flags -lm, -ldl, -lpthread (use module specific link flags instead) (#10099) 2021-05-14 14:28:53 +03:00
encoding encoding.utf8: add `pub fn is_letter(r rune) bool` (#11547) 2021-09-20 21:16:50 +03:00
eventbus v.parser: prohibit redeclaration of builtin types (#10563) 2021-06-25 13:08:56 +03:00
flag flag: switch panics to optionals (#11515) 2021-09-16 19:25:05 +03:00
fontstash gg,sokol,stbi,gx,fontstash: cleanup for -Wimpure-v 2021-08-12 22:42:42 +03:00
gg gg: use sgl.begin_points for pixels + improve pixels example (#12085) 2021-10-07 10:46:57 +03:00
glm v.fmt: fix fmt of 'fn(mut a &int)' (#12075) 2021-10-06 20:51:38 +03:00
gx checker: require `params` attribute to use struct as keyword arguments in function (#11135) 2021-09-14 00:05:30 +03:00
hash v.markused: remove `hash.init()` function (map fn usages are detected more precisely) 2021-09-23 12:24:02 +03:00
io io.util: simplify random number generation in util.v 2021-09-23 14:20:39 +03:00
json json: assert encoded struct with a sumtype (#11970) 2021-09-25 20:29:52 +03:00
log log: add temporary get_level() (#11946) 2021-09-23 12:05:11 +03:00
math math: add some benchmark tests (#12142) 2021-10-11 14:20:07 +03:00
mssql mssql: fix c function definition parameters (#11307) 2021-08-25 14:39:56 +03:00
mysql orm: fix time (#11026) 2021-08-03 05:17:00 +03:00
net ci: do not use htonll and ntohll on windows, use the portable versions instead. 2021-10-02 18:21:16 +03:00
orm orm: fix a typo (#12131) 2021-10-10 03:47:35 +03:00
os os: implement support for VOPEN_URI_CMD env override for os.open_uri 2021-10-06 06:33:04 +03:00
pg orm: postgres fixes 2021-09-30 20:00:27 +03:00
picoev ci: fix `v -cc gcc -cstrict examples/pico/pico.v` 2021-10-01 13:49:38 +03:00
picohttpparser ci: fix `v -cc gcc -cstrict examples/pico/pico.v` 2021-10-01 13:49:38 +03:00
rand js: fix `rand` build, properly use key values on map, add `rand.string` (#12020) 2021-10-01 21:23:49 +03:00
readline fmt: fix import with symbols (fix #12065) (#12069) 2021-10-05 11:44:48 +03:00
regex fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +03:00
runtime runtime: decrement default cpu amount in nr_jobs (#10841) 2021-07-17 17:07:59 +03:00
semver tests: fix `-cstrict` self compilation on m0 with clang 2021-06-07 18:23:18 +03:00
sokol sokol: add sg_isvalid wrapper to gfx (#12081) 2021-10-07 10:41:57 +03:00
sqlite all: introduce `isize` and `usize` (#11437) 2021-09-08 05:53:39 +03:00
stbi gg,sokol,stbi,gx,fontstash: cleanup for -Wimpure-v 2021-08-12 22:42:42 +03:00
strconv strconv: float memory leak fix (#11980) 2021-09-26 07:33:35 +03:00
strings js: comptime&assert improvements, more `byte` and `strings.Builder` methods ported (#12096) 2021-10-07 15:55:47 +03:00
sync ci: workaround linking on macos (missing sem_timedwait) 2021-09-28 11:27:47 +03:00
szip parser: deprecate `size_t` (#11443) 2021-09-08 13:09:32 +03:00
term fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +03:00
time time: sanity check parsed date/times 2021-10-09 11:05:49 +03:00
toml toml: fix error return in value parsing (#12097) 2021-10-07 15:51:18 +03:00
v transformer: eliminate unreachable branches in IfExpr and fold more expressions and statements (#12135) 2021-10-11 14:29:17 +03:00
vweb vweb: router refactor (#12041) 2021-10-03 16:26:44 +03:00
x fmt: format long sum-types with a line for each type (#11461) 2021-09-10 20:56:55 +03:00
.vdocignore vdoc: add v/preludes_js/ to .vdocignore (#11039) 2021-08-03 18:52:45 +03:00